foursquarevenues
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -170,2 +170,40 @@ // Generated by CoffeeScript 1.3.3 | ||
}); | ||
}, | ||
getVenue: function(params, callback) { | ||
var urlString; | ||
urlString = "https://api.foursquare.com/v2/venues/"; | ||
urlString += params.venue_id != null; | ||
if (client_id != null) { | ||
urlString += "&client_id=" + client_id; | ||
} | ||
if (client_secret != null) { | ||
urlString += "&client_secret=" + client_secret; | ||
} | ||
urlString += "&v=" + date; | ||
return request(urlString, function(error, response, body) { | ||
if (!error && response.statusCode === 200) { | ||
callback(null, JSON.parse(body)); | ||
} | ||
if (response.statusCode === 400) { | ||
callback("400", null); | ||
} | ||
if (response.statusCode === 401) { | ||
callback("401", null); | ||
} | ||
if (response.statusCode === 403) { | ||
callback("403", null); | ||
} | ||
if (response.statusCode === 404) { | ||
callback("404", null); | ||
} | ||
if (response.statusCode === 405) { | ||
callback("405", null); | ||
} | ||
if (response.statusCode === 409) { | ||
callback("409", null); | ||
} | ||
if (response.statusCode === 500) { | ||
return callback("500", null); | ||
} | ||
}); | ||
} | ||
@@ -172,0 +210,0 @@ }; |
{ | ||
"name": "foursquarevenues", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Simple query to 4square venue's api", | ||
@@ -17,3 +17,4 @@ "main": "./foursquarevenues", | ||
"search", | ||
"explore" | ||
"explore", | ||
"venue" | ||
], | ||
@@ -20,0 +21,0 @@ "author": "Yamil Asusta (elbuo8)", |
@@ -10,3 +10,3 @@ # Foursquare Venues API | ||
```js | ||
var foursquare = (require('./foursquarevenues'))("CLIENTIDKEY", "CLIENTSECRETKEY"); | ||
var foursquare = (require('/foursquarevenues'))("CLIENTIDKEY", "CLIENTSECRETKEY"); | ||
@@ -13,0 +13,0 @@ var params = { |
Sorry, the diff of this file is not supported yet
13264
7
227