Permalink
Browse files

Bump version

  • Loading branch information...
1 parent 7d9dbf8 commit 050d643df561f1dc8044de8beae28507e253182c @meritt committed Apr 22, 2012
Showing with 30 additions and 9 deletions.
  1. +28 −7 lib/gisty.js
  2. +1 −1 package.json
  3. +1 −1 src/gisty.coffee
View
@@ -1,54 +1,71 @@
+// Generated by CoffeeScript 1.3.1
+
+/*
+ node-gisty 0.0.3
+ (c) 2011-2012 Alexey Simonenko, Serenity LLC
+ For all details and documentation:
+ http://github.com/meritt/node-gisty
+*/
+
+
(function() {
- /*
- gisty 0.0.2
- (c) 2011 Alexey Simonenko, Serenity LLC.
- For all details and documentation:
- http://github.com/meritt/node-gisty
- */
var Gisty, xhr;
+
xhr = require('request');
+
Gisty = (function() {
var api, request;
+
+ Gisty.name = 'Gisty';
+
api = 'https://api.github.com';
+
function Gisty(options) {
if (options == null) {
options = {};
}
this.setOptions(options);
}
+
Gisty.prototype.setOptions = function(options) {
this.options = options;
if ((this.options.login != null) && !(this.options.username != null)) {
this.options.username = this.options.login;
}
return this;
};
+
Gisty.prototype.fetch = function(id, fn) {
if (id == null) {
throw new Error('You should specify gist id for fetch information');
}
this.scheme = '/gists/' + id;
return request(this, fn);
};
+
Gisty.prototype.comments = function(id, fn) {
if (id == null) {
throw new Error('You should specify gist id for fetch comments');
}
this.scheme = '/gists/' + id + '/comments';
return request(this, fn);
};
+
Gisty.prototype.all = function(fn) {
this.scheme = this.options.username != null ? '/users/' + this.options.username + '/gists' : '/gists';
return request(this, fn);
};
- Gisty.prototype.public = function(fn) {
+
+ Gisty.prototype["public"] = function(fn) {
this.scheme = '/gists/public';
return request(this, fn);
};
+
Gisty.prototype.starred = function(fn) {
this.scheme = '/gists/starred';
return request(this, fn);
};
+
request = function(self, fn) {
var options;
if (fn == null) {
@@ -81,7 +98,11 @@
return fn.call(self, error, body);
});
};
+
return Gisty;
+
})();
+
module.exports = Gisty;
+
}).call(this);
View
@@ -1,6 +1,6 @@
{
"name": "gisty"
- , "version": "0.0.2"
+ , "version": "0.0.3"
, "description": "Wrapper for the GitHub gist API v3"
, "keywords": ["github", "gist", "api", "wrapper"]
, "author": "Alexey Simonenko <alexey@simonenko.su>"
View
@@ -1,5 +1,5 @@
###
- node-gisty 0.0.2
+ node-gisty 0.0.3
(c) 2011-2012 Alexey Simonenko, Serenity LLC
For all details and documentation:
http://github.com/meritt/node-gisty

0 comments on commit 050d643

Please sign in to comment.