Permalink
Browse files

Changed the latest URL

the latest function was not working properly because the url was wrong
  • Loading branch information...
1 parent f6e7fb2 commit e21d7e9cb05b7a7d7c5a18265e919b4f50494cf4 @vitorleal vitorleal committed Nov 26, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/tmdb.js
View
@@ -4,7 +4,7 @@ String.prototype.format = function() {
for (var i=0; i < arguments.length; i++)
{
var replacement = '{' + i + '}';
- content = content.replace(replacement, arguments[i]);
+ content = content.replace(replacement, arguments[i]);
}
return content;
};
@@ -14,11 +14,11 @@ var tmdb = function(api_key) {
me = this;
this.api_key = api_key;
this.config = null;
- this.base = 'http://api.themoviedb.org/3';
+ this.base = 'http://api.themoviedb.org/3';
this.api_urls =
{
configuration: this.base+'/configuration?api_key='+this.api_key,
- misc_latest: this.base+'/latest/movie?api_key='+this.api_key,
+ misc_latest: this.base+'/movie/latest?api_key='+this.api_key,
misc_upcoming: this.base+'/movie/upcoming?page={0}&api_key='+this.api_key,
misc_now_playing: this.base+'/movie/now-playing?page={0}&api_key='+this.api_key,
misc_popular: this.base+'/movie/popular?page={0}&api_key='+this.api_key,
@@ -130,7 +130,7 @@ tmdb.prototype.genre = {
var url = me.api_urls.genre_list;
executeQuery({url:url}, callback);
},
-
+
movies: function(q, p, callback) {
if(arguments.length === 2) {
callback = p;
@@ -249,11 +249,11 @@ tmdb.prototype.person = {
},
credits: function(id, callback) {
var url = me.api_urls.person_credits.format(id);
- executeQuery({url:url}, callback);
+ executeQuery({url:url}, callback);
},
images: function(id, callback) {
var url = me.api_urls.person_images.format(id);
- executeQuery({url:url}, callback);
+ executeQuery({url:url}, callback);
},
};

0 comments on commit e21d7e9

Please sign in to comment.