Skip to content
This repository

Node.js and NPM support #17

Open
wants to merge 2 commits into from

1 participant

Sean Hess
Sean Hess

I couldn't get any other libs working with the netflix API. I added npm/node support as well as some documentation.

I can hand publish rights over to you if you want to maintain the npm module. (incrementing the version number and npm publish is all it takes).

It's published to npm as "oauthsimple"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Sep 17, 2012
Sean Hess Node.js Compatibility 3e90a10
Sean Hess fixed readme f076171
This page is out of date. Refresh to see the latest.
20  README.pod
Source Rendered
@@ -33,6 +33,26 @@ If you wish to use a more optimized version, please consult
33 33
 Anton Byrna's fork
34 34
 L<http://github.com/itrelease/oauthsimple> 
35 35
 
  36
+=head1 EXAMPLES
  37
+
  38
+Node.js Installation
  39
+
  40
+    > npm install oauthsimple
  41
+
  42
+Node.js Example
  43
+
  44
+    OAuthSimple = require('OAuthSimple')
  45
+    oauth = new OAuthSimple("token", "secret")
  46
+    request = oauth.sign({
  47
+      action: "GET",
  48
+      path: "http://api.netflix.com/catalog/people",
  49
+      parameters: { term: 'DeNiro' }
  50
+    })
  51
+
  52
+    // then use any library to request the following url
  53
+    request.signed_url
  54
+
  55
+
36 56
 =head1 LICENSE
37 57
 
38 58
 Code is released under a BSD licence.
6  js/OAuthSimple.js
@@ -475,3 +475,9 @@ if (OAuthSimple === undefined)
475 475
     return self;
476 476
     };
477 477
 }
  478
+
  479
+
  480
+// CommonJS Support
  481
+if (module && exports) {
  482
+    module.exports = OAuthSimple;
  483
+}
14  package.json
... ...
@@ -0,0 +1,14 @@
  1
+{
  2
+  "name": "oauthsimple",
  3
+  "version": "0.0.1",
  4
+  "description": "git://github.com/idottv/oauthsimple.git",
  5
+  "main": "js/OAuthSimple.js",
  6
+  "scripts": {
  7
+  },
  8
+  "repository": {
  9
+    "type": "git",
  10
+    "url": "git://github.com/idottv/oauthsimple.git"
  11
+  },
  12
+  "author": "jrconlin",
  13
+  "license": "BSD"
  14
+}
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.