OlapicMediaList Class Reference
| Inherits from | NSObject |
| Declared in | OlapicMediaList.h |
Tasks
Other Methods
-
delegateproperty -
initialURLproperty -
currentURLproperty -
prevURLproperty -
nextURLproperty -
sortingproperty -
mediaPerPageproperty -
currentOffsetproperty -
pagesproperty -
extraParametersproperty
Utils
Initializer
Connection
Pagination
Extras
Properties
currentOffset
The list pagination current offset
@property (nonatomic) NSInteger currentOffsetDeclared In
OlapicMediaList.hcurrentURL
The API URL of the last request. This may change depending on the pagination
@property (nonatomic, strong) NSMutableString *currentURLDeclared In
OlapicMediaList.hdelegate
The delegate object
@property (nonatomic, weak) id<OlapicMediaListDelegate> __weak delegateDeclared In
OlapicMediaList.hextraParameters
Lists specific parameters to be included on every requrest
@property (nonatomic, strong) NSMutableDictionary *extraParametersDeclared In
OlapicMediaList.hinitialURL
The initial API URL from where the list will get the media objects
@property (nonatomic, strong) NSString *initialURLDeclared In
OlapicMediaList.hmediaPerPage
How many media objects per page will be loaded
@property (nonatomic) NSInteger mediaPerPageDeclared In
OlapicMediaList.hnextURL
The API URL to the next page
@property (nonatomic, strong) NSMutableString *nextURLDeclared In
OlapicMediaList.hpages
A list with the pages from the API Each item will be a dictionary with the follwing keys: - links: The API pagination links - media: An array with all the media objects for that page
@property (nonatomic, strong) NSMutableArray *pagesDeclared In
OlapicMediaList.hClass Methods
getKeyForSortingType:
Get string key for a sorting type
+ (NSString *)getKeyForSortingType:(OlapicMediaListSortingType)stypeParameters
Return Value
The string with the key
Availability
v1.0
Discussion
The returned key will be used to call the get
method of a OlapicEntity, so if you send
OlapicMediaListSortingTypeShuffled, you’ll get “media/shuffled”
Declared In
OlapicMediaList.hInstance Methods
canLoadNextPage
Check if there’s a new page that can be loaded
- (BOOL)canLoadNextPageReturn Value
If a new page can be loaded
Availability
v1.0
Declared In
OlapicMediaList.hcanLoadPreviousPage
Check if there’s a previous page that can be loaded
- (BOOL)canLoadPreviousPageReturn Value
If a previous page exists
Availability
v1.0
Declared In
OlapicMediaList.hfetching
Check if the list is currenly downloading media
- (BOOL)fetchingReturn Value
If the list is downloading
Availability
v1.0
Declared In
OlapicMediaList.hgetCurrentPage
Get the current page information. A dictionary with the following keys: - links: The API pagination links - media: An array with all the media objects for that page
- (NSDictionary *)getCurrentPageReturn Value
The page information
Availability
v1.0
Declared In
OlapicMediaList.hgetCurrentPageMedia
Get the current page’s media objects
- (NSArray *)getCurrentPageMediaReturn Value
An array of OlapicMediaEntity objects
Availability
v1.0
Declared In
OlapicMediaList.hgetMedia
Get all the media currently saved on the list
- (NSArray *)getMediaReturn Value
An array of OlapicMediaEntity objects
Availability
v1.0
Declared In
OlapicMediaList.hgetSDK
Get the OlapicSDK reference
- (OlapicSDK *)getSDKReturn Value
The OlapicSDK
Availability
v1.0
Declared In
OlapicMediaList.hinitFromConnectionData:
When the SDK is initialized using a specific endpoint, this method will take care of reading the JSON and create the list based on that information
- (id)initFromConnectionData:(NSDictionary *)dataParameters
- data
The received information
Return Value
An OlapicMediaList subclass instance (in this base class, it will return nil)
Discussion
This method has its own implementation for each subclass
Declared In
OlapicMediaList.h