Permalink
Browse files

full tags api wrapped

  • Loading branch information...
1 parent b513dcb commit 5d717d9d4551132b98a419204a3e4005a1073b3a @Swizec committed Mar 2, 2011
Showing with 15 additions and 0 deletions.
  1. +4 −0 index.js
  2. +11 −0 tests.js
View
@@ -79,6 +79,10 @@ InstagramTagsClient.prototype.media = function (tag, params, callback) {
callback);
}
+InstagramTagsClient.prototype.tag = function (tag, callback) {
+ this.parent.fetch('/v1/tags/'+tag, callback);
+}
+
exports.createClient = function (client_id, client_secret) {
var instagram_client = new InstagramClient(client_id, client_secret);
View
@@ -81,4 +81,15 @@ exports.testTagsMedia = function (test) {
callback(media, error);
test.done();
});
+}
+
+exports.testTagsTag = function (test) {
+ test.expect(2);
+
+ instagram.tags.tag('snow', function (tag, error) {
+ test.ok(tag.media_count);
+ test.equal(error, null);
+
+ test.done();
+ });
}

0 comments on commit 5d717d9

Please sign in to comment.