Skip to content
Browse files

Merge pull request #5 from vitorleal/master

Wrong latest url
  • Loading branch information...
2 parents f6e7fb2 + e21d7e9 commit d71e911b047ec37b634fac29d19a13ddec2d6818 @raqqa committed
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/tmdb.js
View
12 lib/tmdb.js
@@ -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 d71e911

Please sign in to comment.
Something went wrong with that request. Please try again.