KMMTMDBAPIClient 1.5

KMMTMDBAPIClient 1.5

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2015

Maintained by Kerr Marin Miller.



  • By
  • Kerr Marin Miller

Features

A TMDB API client that allows users to easily query movie and cast information.

  • Get movie details, including similar movies.
  • Get cast details.
  • Get company details.
  • Search for cast and crew.
  • Search for movies.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

This project has a dependency on AFNetworking.

Other requirements:

  • iOS 7.0 or greater
  • ARC

Installation

Examples

In your app delegate, set your API key:

Code:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[KMMTMDBAPIClient client] setAPIKey:@"MY API KEY"];
    return YES;
}

In your view controller, query the API:

Code:

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [[KMMTMDBAPIClient client] popularMoviesInPage:1 complete:^(id results, NSError *error) {
        NSDictionary *firstMovie = results[@"results"][0];
        self.titleLabel.text = firstMovie[@"original_title"];
        self.releaseDateLabel.text = firstMovie[@"release_date"];
        self.popularityLabel.text = [@"Popularity: " stringByAppendingFormat: @"%f", [firstMovie[@"popularity"] doubleValue] ];
    }];
}

Author

KMMTMDBAPIClient was developed by Kerr Marin Miller (@kerrmarin) in the development of Dejavu.

License

KMMTMDBAPIClient is available under the MIT license. See the LICENSE file for more info.