Giter Club home page Giter Club logo

themoviedb-api's People

Contributors

aasnaghi avatar alejandroperea avatar brenda avatar davidruizrodri avatar dependabot[bot] avatar druzn3k avatar olleolleolle avatar samuelebistoletti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

themoviedb-api's Issues

not working with ruby 2.7.0

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.

Endpoint returning TV episodes for TV season searches and vice versa

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

Movie search issue / question

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

Cache Configuration

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.

Any example using themoviedb-api

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

Use the append_to_response capability of the API?

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:

  • Should this be implemented?
  • Should it grab all data by default?
  • Should it grab all data optionally?
  • Should it be grab some data (videos, images, ...) optionally?

I'll happily try and implement it myself and make a PR if you'd decide on the above.

Get Movies By Release Date Range

Hi,

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

People search sometimes fails

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>'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.