18months / themoviedb-api Goto Github PK
View Code? Open in Web Editor NEWProvides a simple and intuitive interface for the Movie Database API making use of OpenStruct.
License: MIT License
Provides a simple and intuitive interface for the Movie Database API making use of OpenStruct.
License: MIT License
Hi, I created a PR request for this some time ago, but I think the project has changed hands a few times. There's a simple bug where it's returning episode results for season searches and vice versa. It's a two line change in lib/tmdb/find.rb. The old PR is here: #19
Current master branch has them the wrong way around like this:
def self.tv_season(id, filters={})
result = Resource.new("/find/#{id}", filters).get
result['tv_episode_results'].map do |entry|
TV.new(entry)
end
end
def self.tv_episode(id, filters={})
result = Resource.new("/find/#{id}", filters).get
result['tv_season_results'].map do |entry|
TV.new(entry)
end
end
Hi @druzn3k !
Could you please update the gem version to 1.3.0 en Rubygems?
It would be great to have the updated version there.
Thanks!!
Great gem, really useful! Can you tell me how I could receive more than 20 results when using popular, upcoming etc? I assume I need to paginate, but I can't find where to do that in your gem. Thanks!
if I use release_date.lte and release_date.gte at the same time that means it return the movies or tv shows between release date range but it returns all the movies that is greater then and less then the date that I provide. Please check and fix this
Just a suggestion, but from the docs is wasn't clear to me that getting the configuration goes over the net.
So i was using it to get image path and was surprised how slow that was and found out.
As the config is unlikely to change during program execution i think it would be save to cache it.
And if the library doesn't it means every user has to.
Hi,
I've just found that people search sometimes fails.
For example:
> Tmdb::Search.person("Julian Beck")
NoMethodError: undefined method `media_type' for nil:NilClass
from .../shared/bundle/ruby/2.3.0/gems/themoviedb-api-1.2.0/lib/tmdb/person.rb:80:in `known_person_reference'
from .../shared/bundle/ruby/2.3.0/gems/themoviedb-api-1.2.0/lib/tmdb/person.rb:65:in `block in convert_known_for!'
from .../shared/bundle/ruby/2.3.0/gems/themoviedb-api-1.2.0/lib/tmdb/person.rb:64:in `map!'
from .../shared/bundle/ruby/2.3.0/gems/themoviedb-api-1.2.0/lib/tmdb/person.rb:64:in `convert_known_for!'
from .../shared/bundle/ruby/2.3.0/gems/themoviedb-api-1.2.0/lib/tmdb/search.rb:90:in `block in person'
from .../shared/bundle/ruby/2.3.0/gems/themoviedb-api-1.2.0/lib/tmdb/search.rb:88:in `map'
from .../shared/bundle/ruby/2.3.0/gems/themoviedb-api-1.2.0/lib/tmdb/search.rb:88:in `person'
from (irb):9
from .../shared/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/console.rb:65:in `start'
from .../shared/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/console_helper.rb:9:in `start'
from .../shared/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:78:in `console'
from .../shared/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from .../shared/bundle/ruby/2.3.0/gems/railties-5.0.6/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:14:in `require'
from bin/rails:14:in `<main>'
Hi,
i've been looking at the tmdb gems and this one seems very good. I mean docs in place, coverage and according to my dabbling working very well.
But i was wondering, when i do a Search.movie("awakens") i get back a Movie object.
But that movie object nevertheless looks nothing like a normal movie object, instead it has pages and result instances
This is somewhat confusing, maybe the search should return a Result object or something similar?
Tosten
Hi,
Is there any example using themoviedb-api ?
How to set how to set the API and config? , I have created tmdb.rb in initializers folder and testing with irb and geting error:
Tmdb::Error (Invalid API key: You must be granted a valid key.)
Thanks
Hi,
The current version is not working with ruby 2.7.0
and it's giving the following error:
undefined method `new_ostruct_member'
Because the new_ostruct_member
was removed from 2.7.0
.
is there any way to return all the tv shows in tmdb at once?
The tmdb API has a neat feature called append_to_response.
It allows us to grab more information about an object in 1 request.
I think it would be beneficial to use this in for example the Movie.detail
method.
For example, the video method would be "fixed":
Tmdb::Movie.detail(550).video #=> false
But if we use the &append_to_response=videos
we get the real list, which doesn't lie!
curl https://api.themoviedb.org/3/movie/550\?api_key\=API_KEY\&append_to_response\=videos
{
"adult": false,
"backdrop_path": "/87hTDiay2N2qWyX4Ds7ybXi9h8I.jpg",
"belongs_to_collection": null,
"budget": 63000000,
"genres": [{
"id": 18,
"name": "Drama"
}],
"homepage": "http://www.foxmovies.com/movies/fight-club",
"id": 550,
"imdb_id": "tt0137523",
"original_language": "en",
"original_title": "Fight Club",
"overview": "A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground \"fight clubs\" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.",
"popularity": 6.341339,
"poster_path": "/adw6Lq9FiC9zjYEpOqfq03ituwp.jpg",
"production_companies": [{
"name": "Regency Enterprises",
"id": 508
}, {
"name": "Fox 2000 Pictures",
"id": 711
}, {
"name": "Taurus Film",
"id": 20555
}, {
"name": "Linson Films",
"id": 54050
}, {
"name": "Atman Entertainment",
"id": 54051
}, {
"name": "Knickerbocker Films",
"id": 54052
}],
"production_countries": [{
"iso_3166_1": "DE",
"name": "Germany"
}, {
"iso_3166_1": "US",
"name": "United States of America"
}],
"release_date": "1999-10-15",
"revenue": 100853753,
"runtime": 139,
"spoken_languages": [{
"iso_639_1": "en",
"name": "English"
}],
"status": "Released",
"tagline": "How much can you know about yourself if you've never been in a fight?",
"title": "Fight Club",
"video": false,
"vote_average": 8.199999999999999,
"vote_count": 7692,
"videos": {
"results": [{
"id": "58f730779251415dfe009fc7",
"iso_639_1": "en",
"iso_3166_1": "US",
"key": "BdJKm16Co6M",
"name": "Official #TBT Trailer",
"site": "YouTube",
"size": 360,
"type": "Trailer"
}]
}
}
My question is:
I'll happily try and implement it myself and make a PR if you'd decide on the above.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.