Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrisnharvey/codeigniter-tmdb-library
A The Movie Database (TMDb) library
https://github.com/chrisnharvey/codeigniter-tmdb-library
Last synced: about 4 hours ago
JSON representation
A The Movie Database (TMDb) library
- Host: GitHub
- URL: https://github.com/chrisnharvey/codeigniter-tmdb-library
- Owner: chrisnharvey
- Created: 2011-02-17T00:00:40.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2015-05-28T20:23:35.000Z (over 9 years ago)
- Last Synced: 2024-05-01T23:29:58.062Z (7 months ago)
- Language: PHP
- Homepage: http://www.b2tm.com/
- Size: 106 KB
- Stars: 4
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
_Deprecated: Looking for a new maintainer for this package. Open an issue if interested._
This is the first library I have released which is a TMDb (The Movie Database) Library that I wrote that allows easy access to most of the methods in the TMDb API and returns the response in an array. It still needs a lot of work, but please let me know what you think and give me some feedback and suggestions.
First, you must set your TMDb API key in the tmdb.php config file.
Loading the library is simple and works in the usual way (no need to load the config file, this will be loaded as part of the library.
$this->load->library('TMDb');
So now the library is loaded, you will want to make your first call. Usually you would call the TMDb API URL such as http://api.themoviedb.org/2.1/Movie.getInfo/en/json/APIKEY/187 but to call this same method using this library its as simple as.
$data = $this->tmdb->call('Movie.getInfo', '187');
You can then use this $data array to show any of the nodes that would usually appear in the TMDb response. For example, if you wanted to show the name of the movie, you would write
echo $data->name;
Thats a short example on how you can use this library, a more detailed documentation is coming soon.
Enjoy!