- JLTMDbClient is an iOS wrapper on top of AFNetworking to interact with themoviedb.org API.
- The best way to get JLTMDbClient is by using CocoaPods.
- How to install CocoaPods
- Clone the repository:
$ git clone git@github.com:JaviLorbada/JLTMDbClient.git
- Open the
.xcworkspace
file to see the example:
$ open JLTMDbClient.xcworkspace
- Run JLTMDbClient target to see a simple visual example.
- Run JLTMDbClientTests target to see different cases on how to use the API.
- Get your API KEY from themoviedb.org
"A TMDb user account is required to request an API key. Commercial users are approved on a per application basis. As always, you must attribute TMDb as the source of your data. Please be sure to read the API FAQ"
- Add JLTMDbClient to your application, and set up your API KEY.
#import <JLTMDbClient.h>
[[JLTMDbClient sharedAPIInstance] setAPIKey:@"API_KEY"];
- Call a service to get the response from the server *, i.e:
[[JLTMDbClient sharedAPIInstance] GET:kJLTMDbMoviePopular withParameters:nil andResponseBlock:^(id response, NSError *error) {
if(!error){
fetchedData = response;
NSLog(@"Popular Movies: %@",fetchedData);
}
}];
- JLTMDbClient includes unit tests. In order to run the unit tests, you need to add your API_KEY. Then you can execute the tests using JLTMDbClientTests scheme within Xcode.
- Tests can also be run from the command line or within a continuous integration environment with
xctool
, which can be installed with Homebrew:
$ brew update
$ brew install xctool --HEAD
"JLTMDBClientTests requires xctool 0.1.14 or above"
- Once
xctool
is installed, you can execute the tests viarake test
.
- Tests can also be run from the command line or within a continuous integration environment with
XCPretty
, which can be installed:
$ gem install xcpretty
"XCPretty requires Ruby 1.8.7 or above."
- Once
XCPretty
is installed, you can execute the tests viamake test
ormake ci
.
- Compatible with iOS 7.0.
- Does require ARC.
- AFNetworking 3.0.0 or superior.
- JLTMDbClient is released under a MIT-License. See License file for more info.
- Javi Lorbada
- Follow @javi_lorbada on twitter
- http://javilorbada.me/