TMDBMovie Class Reference

Inherits from NSObject
Declared in TMDBMovie.h
TMDBMovie.m

Overview

A TMDBMovie object represents information about a movie from the TMDb website. It is responsible for updating itself.

All properties are readonly, as the iTMDb framework does not support editing the TMDb website. Your application should fetch movie information using the TMDBMovie class and then use or copy the results to your own model objects.

Creating an Instance

– initWithID:

Creates an empty movie object ready to be loaded, based on the provided TMDb ID.

- (instancetype)initWithID:(NSUInteger)tmdbID

Parameters

tmdbID

The TMDb ID of the movie to be looked up.

Return Value

An empty movie object ready to be loaded.

Discussion

Creates an empty movie object ready to be loaded, based on the provided TMDb ID.

You must call either -load or populate: to populate the object with data.

Declared In

TMDBMovie.h

Basic Information

  tmdbID

The TMDb ID of the movie.

@property (nonatomic, readonly) NSInteger tmdbID

Discussion

The TMDb ID of the movie.

Declared In

TMDBMovie.h

  title

The title of the movie.

@property (nonatomic, copy, readonly) NSString *title

Discussion

The title of the movie.

Declared In

TMDBMovie.h

  originalTitle

The original title of the movie.

@property (nonatomic, copy, readonly) NSString *originalTitle

Discussion

The original title of the movie.

Declared In

TMDBMovie.h

  overview

A description of the movie.

@property (nonatomic, copy, readonly) NSString *overview

Discussion

A description of the movie.

Declared In

TMDBMovie.h

  tagline

The tagline of the movie.

@property (nonatomic, copy, readonly) NSString *tagline

Discussion

The tagline of the movie.

Declared In

TMDBMovie.h

  categories

An array of NSStrings representing the categories of the movie.

@property (nonatomic, strong, readonly) NSArray *categories

Discussion

An array of NSStrings representing the categories of the movie.

Declared In

TMDBMovie.h

  keywords

An array of NSStrings representing the keywords of the movie.

@property (nonatomic, strong, readonly) NSArray *keywords

Discussion

An array of NSStrings representing the keywords of the movie.

Declared In

TMDBMovie.h

Times and Dates

  released

The release date of the movie.

@property (nonatomic, copy, readonly) NSDate *released

Discussion

The release date of the movie.

Declared In

TMDBMovie.h

  year

The year in which the movie was released.

@property (nonatomic, readonly) NSUInteger year

Discussion

The year in which the movie was released.

This is simply a convenience property that uses the released date property.

Declared In

TMDBMovie.h

  runtime

The runtime of the movie in minutes.

@property (nonatomic, readonly) NSUInteger runtime

Discussion

The runtime of the movie in minutes.

Declared In

TMDBMovie.h

Other Information

  adult

A Boolean value indicating if the movie is an adult movie.

@property (nonatomic, readonly, getter=isAdult) BOOL adult

Discussion

A Boolean value indicating if the movie is an adult movie.

Declared In

TMDBMovie.h

  votes

The number of votes for this movie from users on the TMDb website.

@property (nonatomic, readonly) NSInteger votes

Discussion

The number of votes for this movie from users on the TMDb website.

Declared In

TMDBMovie.h

  rawResults

The raw contents from the API itself.

@property (nonatomic, strong, readonly) id rawResults

Discussion

The raw contents from the API itself.

You can use this property to extract values that iTMDb does not already wrap in the TMDBMovie object.

Declared In

TMDBMovie.h

Imagery

  posters

An array of TMDBImage objects that represent the posters used for this movie.

@property (nonatomic, strong, readonly) NSArray *posters

Discussion

An array of TMDBImage objects that represent the posters used for this movie.

Declared In

TMDBMovie.h

  backdrops

An array of TMDBImage objects that represent the backdrops used on the TMDb website.

@property (nonatomic, strong, readonly) NSArray *backdrops

Discussion

An array of TMDBImage objects that represent the backdrops used on the TMDb website.

Declared In

TMDBMovie.h

External Resources

  homepage

The URL of an official website of the movie.

@property (nonatomic, copy, readonly) NSURL *homepage

Discussion

The URL of an official website of the movie.

Declared In

TMDBMovie.h

  url

The URL of the movie’s page on the TMDb website.

@property (nonatomic, copy, readonly) NSURL *url

Discussion

The URL of the movie’s page on the TMDb website.

Declared In

TMDBMovie.h

  imdbID

The ID of the movie on IMDb.

@property (nonatomic, copy, readonly) NSString *imdbID

Discussion

The ID of the movie on IMDb.

The value of this string includes the tt prefix used by IMDb.

Declared In

TMDBMovie.h

Localization

  languagesSpoken

An array of TMDBLanguage objects representing the languages spoken in the movie.

@property (nonatomic, strong, readonly) NSArray *languagesSpoken

Discussion

An array of TMDBLanguage objects representing the languages spoken in the movie.

Declared In

TMDBMovie.h

  countries

An array of NSStrings representing the countries that have either co-produced the movie or the countries in which the movie was shot.

@property (nonatomic, strong, readonly) NSArray *countries

Discussion

An array of NSStrings representing the countries that have either co-produced the movie or the countries in which the movie was shot.

Declared In

TMDBMovie.h

Getting the Cast and Crew

  cast

An array of TMDBPerson objects representing the cast and crew of the movie.

@property (nonatomic, strong, readonly) NSArray *cast

Discussion

An array of TMDBPerson objects representing the cast and crew of the movie.

Declared In

TMDBMovie.h

UnavailableMethods Methods

+ movieWithID:options:context:

Creates a fetch request for the movie with the provided TMDb ID, and returns an object representing that movie.

+ (instancetype)movieWithID:(NSUInteger)anID options:(TMDBMovieFetchOptions)options context:(TMDB *)context

Parameters

anID

The TMDb ID of the movie to be looked up.

context

The IMDb context from which the lookup should be made.

Return Value

An object representing the movie.

Discussion

Creates a fetch request for the movie with the provided TMDb ID, and returns an object representing that movie.

The context gets notified using [TMDB movieDidFinishLoading:] when the movie object has finished loading.

Declared In

TMDBMovie.h

+ movieWithName:options:context:

Creates a fetch request for the movie with the provided name, and returns an object representing that movie.

+ (instancetype)movieWithName:(NSString *)name options:(TMDBMovieFetchOptions)options context:(TMDB *)context

Parameters

context

The IMDb context from which the lookup should be made.

aName

The name of the movie to be looked up.

Return Value

An object representing the movie.

Discussion

Creates a fetch request for the movie with the provided name, and returns an object representing that movie.

The context gets notified using [TMDB movieDidFinishLoading:] when the movie object has finished loading.

Declared In

TMDBMovie.h

+ movieWithName:year:options:context:

Creates a fetch request for the movie with the provided name, and returns an object representing that movie.

+ (instancetype)movieWithName:(NSString *)name year:(NSUInteger)year options:(TMDBMovieFetchOptions)options context:(TMDB *)context

Parameters

context

The IMDb context from which the lookup should be made.

aName

The name of the movie to be looked up.

aYear

The year the movie was released. This is only a hint and not a requirement for the returned movie.

Return Value

An object representing the movie.

Discussion

Creates a fetch request for the movie with the provided name, and returns an object representing that movie.

The context gets notified using [TMDB movieDidFinishLoading:] when the movie object has finished loading.

Declared In

TMDBMovie.h

  UNAVAILABLE_ATTRIBUTE

The original language of the movie.

@property (nonatomic, copy, readonly) NSString *UNAVAILABLE_ATTRIBUTE

Discussion

The original language of the movie.

Declared In

TMDBMovie.h