Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LHTMDbClient

  • LHTMDbClient is an iOS wrapper on top of AFNetworking to interact with themoviedb.org API.
  • This project is forked from Javi Lorbada - JLTMDbClient

Installation:

  • The best way to get LHTMDbClient is by using CocoaPods.
    (currently only via pod and the point to git availible because: "[!] Push access is currently disabled while we allow for owners to claim their Pods.")
pod 'LHTMDbClient, git: => https://github.com/HerbstLukas/LHTMDbClient.git'

Demo App:


Not done yet. Will follow.

Usage:

  1. 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"

  1. Add LHTMDbClient to your application, and set up your API KEY in the AppDelegate - didFinishLaunchingWithOptions.
#import <LHTMDbClient.h>
[[LHTMDbClient sharedAPIInstance] setAPIKey:@"API_KEY"];
  1. Call a service to get the response from the server *, i.e:
[[LHTMDbClient sharedAPIInstance] GET:kLHTMDbMoviePopular withParameters:nil andResponseBlock:^(id response, NSError *error) {
    if(!error){
        fetchedData = response;
        NSLog(@"Popular Movies: %@",fetchedData);
    }
}];
  • When you want to get a specifik episode of an season you can do it like this:
    [[LHTMDbClient sharedAPIInstance] GET:kLHTMDbTV withParameters:@{@"id":self.showId ,@"season_number":self.seasonNr, @"episode_number":self.episodeNr} andResponseBlock:^(id response, NSError *error)
    {
        if (!error)
        {
            self.tvShwoData = response;
            NSLog(@"%@", self.tvShwoData);
        } else
        {
            NSLog(@"%@", error);
        }
    }];

Options have to be NSStrings - and you have to use the IDs @"id", @"season_number" and @"episode_number".
See the Table of contents which request require which options.
If there are any questions please contact me.

Compatibility:

  • Compatible with iOS 7.0.
  • Does require ARC.

Dependencies:

License:

Credits:

Contact:

About

LHTMDbClient is an iOS wrapper on top of AFNetworking to interact with themoviedb.org API.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages