Permalink
Browse files

fixed API issues

  • Loading branch information...
1 parent 63e3467 commit 775c60cb39c742a849d8682e2a3224c501f12777 @vdemedes committed Feb 13, 2012
Showing with 7 additions and 7 deletions.
  1. +3 −3 lib/gumroad.coffee
  2. +3 −3 lib/gumroad.js
  3. +1 −1 package.json
View
6 lib/gumroad.coffee
@@ -100,7 +100,7 @@ class Gumroad
throw new Error 'You should authenticate before querying Gumroad\'s API' if not @token
that = @
request
- method: 'POST'
+ method: 'PUT'
uri: @endpoint + '/links/' + link.id
headers:
Authorization: 'Basic ' + @token
@@ -126,8 +126,8 @@ class Gumroad
deleteLink: (id, callback) ->
throw new Error 'You should authenticate before querying Gumroad\'s API' if not @token
request
- method: 'POST'
- uri: @endpoint + '/links/' + link.id
+ method: 'DELETE'
+ uri: @endpoint + '/links/' + id
headers:
Authorization: 'Basic ' + @token
, (err, res, body) ->
View
6 lib/gumroad.js
@@ -147,7 +147,7 @@ Gumroad = (function() {
}
that = this;
return request({
- method: 'POST',
+ method: 'PUT',
uri: this.endpoint + '/links/' + link.id,
headers: {
Authorization: 'Basic ' + this.token
@@ -184,8 +184,8 @@ Gumroad = (function() {
throw new Error('You should authenticate before querying Gumroad\'s API');
}
return request({
- method: 'POST',
- uri: this.endpoint + '/links/' + link.id,
+ method: 'DELETE',
+ uri: this.endpoint + '/links/' + id,
headers: {
Authorization: 'Basic ' + this.token
}
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "gumroad"
- , "version": "0.9.2"
+ , "version": "0.9.3"
, "description": "API client for Gumroad."
, "keywords": ["gumroad"]
, "author": "Vadim Demedes <sbioko@gmail.com>"

0 comments on commit 775c60c

Please sign in to comment.