Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Wrong latest url #5

Merged
merged 1 commit into from

2 participants

@vitorleal

the latest function was not working properly because the url was wrong

@vitorleal vitorleal Changed the latest URL
the latest function was not working properly because the url was wrong
e21d7e9
@raqqa raqqa merged commit d71e911 into from
@raqqa
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 26, 2012
  1. @vitorleal

    Changed the latest URL

    vitorleal authored
    the latest function was not working properly because the url was wrong
This page is out of date. Refresh to see the latest.
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);
},
};
Something went wrong with that request. Please try again.