Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.
/ KMMTMDBAPIClient Public archive

A client to interact with the TMDB API and perform queries.

License

Notifications You must be signed in to change notification settings

kerrmarin/KMMTMDBAPIClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KMMTMDBAPIClient

CI Status Version License Platform

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

KMMTMDBAPIClient is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "KMMTMDBAPIClient"

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.

About

A client to interact with the TMDB API and perform queries.

Resources

License

Stars

Watchers

Forks

Packages

No packages published