Browse files

some documentation

  • Loading branch information...
1 parent 93783d8 commit e1140f5a6caca5602c89f2fce00e909b47ebbb84 @Swizec committed Mar 1, 2011
Showing with 27 additions and 0 deletions.
  1. +27 −0
@@ -5,6 +5,33 @@ This project started because I wanted to use instagram's API in node.js and ther
Since everything is so fresh spanking new, forks/pull-requests much appreciated.
+# Usage
+The library is intended to be used as a thin wrapper over the basic Instagram API, so the
+idea is to keep everything as similar to the original as possible.
+Every method should be passed some parameters if needed and a callback function. The callback
+should accept a result and an error argument.
+The convention being that when the error is null, the result contains media as returnd from the API,
+and when something goes wrong error is the status code as returned by the API and the result is the
+meta info the API returned.
+For example:
+ var instagram = require('instagram').createClient('<client_id>', '<client_secret>');
+ // fetch media by id
+'<id>', function (images, error) { ... });
+ // fetch popular media
+ (images, error) { ... });
+ // search media
+{lat: <some latitude>,
+ lng: <some longitude>},
+ function (images, error) { ... });
# License
Some sort of BSD or MIT license, the general idea being:

0 comments on commit e1140f5

Please sign in to comment.