Skip to content

Commit

Permalink
add an optional host parameter. more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
reiddraper committed Mar 11, 2011
1 parent dd8718e commit e5c4193
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/nest.js
@@ -1,4 +1,3 @@
// #nest.js
// nest.js is a javascript wrapper to the Echo Nest
// [developer api](http://developer.echonest.com).

Expand All @@ -7,10 +6,19 @@
var nest = {
// This is the main object that is used
// to call the api
nest: function(api_key) {
nest: function(api_key, host) {
// optionaly take in another host,
// for testing purposes
host = host || "developer.echonest.com";
return {
// return the read-only `api_key`
get_api_key: function(){
return api_key;
},

// return the read-only `host` name
get_host: function(){
return host;
}
};
}
Expand Down

0 comments on commit e5c4193

Please sign in to comment.