TMDBPerson Class Reference

Inherits from NSObject
Declared in TMDBPerson.h
TMDBPerson.m

Overview

A TMDBPerson object contains information about a person associated with a TMDBMovie object.

By default Person objects contain only basic information. To fetch more information use the update: and update:completion: metods.

Batch Processing

+ personsWithMovie:personsInfo:

Returns an array of TMDBPerson objects with the information provided in the personsInfo array.

+ (NSArray *)personsWithMovie:(TMDBMovie *)movie personsInfo:(NSArray *)d

Parameters

movie

The movie with which the persons should be associated.

personInfo

An array of NSDictionary objects with information about the persons for which objects are to be created.

Return Value

An array of TMDBPerson objects.

Discussion

Returns an array of TMDBPerson objects with the information provided in the personsInfo array.

Declared In

TMDBPerson.h

Creating an Instance

– initWithID:

Returns a person object populated only with the provided ID. Fetch person information by calling update:.

- (instancetype)initWithID:(NSUInteger)personID

Parameters

personID

The ID of the person.

Discussion

Returns a person object populated only with the provided ID. Fetch person information by calling update:.

Declared In

TMDBPerson.h

– initWithMovie:personInfo:

Returns a person object populated with the provided person information.

- (instancetype)initWithMovie:(TMDBMovie *)movie personInfo:(NSDictionary *)d

Parameters

movie

The movie object with which the person should be associated.

personInfo

A dictionary containing information about the person.

Return Value

An immutable person object populated with the provided person information.

Discussion

Returns a person object populated with the provided person information.

Declared In

TMDBPerson.h

Basic Information

  id

The TMDb ID of the person.

@property (nonatomic, readonly) NSUInteger id

Discussion

The TMDb ID of the person.

Declared In

TMDBPerson.h

  name

The name of the person.

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

Discussion

The name of the person.

Declared In

TMDBPerson.h

  character

The name of the character the person played in the movie.

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

Discussion

The name of the character the person played in the movie.

Declared In

TMDBPerson.h

  movie

The movie in which the person played a character or was part of a crew.

@property (nonatomic, strong, readonly) TMDBMovie *movie

Discussion

The movie in which the person played a character or was part of a crew.

Declared In

TMDBPerson.h

  job

The job position of the person in this movie.

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

Discussion

The job position of the person in this movie.

Declared In

TMDBPerson.h

  department

The person’s job department.

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

Discussion

The person’s job department.

Declared In

TMDBPerson.h

  order

The order in which the person should be listed in the Cast and Crew list for the movie.

@property (nonatomic, readonly) NSUInteger order

Discussion

The order in which the person should be listed in the Cast and Crew list for the movie.

Declared In

TMDBPerson.h

  castID

The

@property (nonatomic, readonly) NSInteger castID

Discussion

The

Declared In

TMDBPerson.h

External Resources

  url

A URL to an official website of this person.

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

Discussion

A URL to an official website of this person.

Declared In

TMDBPerson.h

  imageURL

A URL fragment pointing to the TMDb profile image of this person.

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

Discussion

A URL fragment pointing to the TMDb profile image of this person.

Declared In

TMDBPerson.h

Updating

– update:

Updates the Person with the basic information.

- (void)update:(TMDBPersonUpdateCompletionBlock)completionBlock

Parameters

completionBlock

A block called when the update succeeds or fails.

Discussion

Updates the Person with the basic information.

Declared In

TMDBPerson.h

– update:completion:

Updates the Person with the specified information.

- (void)update:(TMDBPersonUpdateOptions)options completion:(TMDBPersonUpdateCompletionBlock)completionBlock

Parameters

options

The information to be fetched.

completionBlock

A block called when the update succeeds or fails.

Discussion

Updates the Person with the specified information.

Declared In

TMDBPerson.h