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 |
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
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