MDLCategory Class Reference
Inherits from | NSObject |
Declared in | MDLCategory.h MDLCategory.m |
Tasks
-
identifier
The category identifier, as generated by Mendeley.
property -
name
The category name.
property -
slug
The category slug.
property -
+ categoryWithIdentifier:name:slug:
Creates a
MDLCategory
and initializes its identifier, name, and slug properties. -
+ fetchCategoriesSuccess:failure:
Sends a categories API request using the shared client and fetches the response as an array of
MDLCategory
. -
– fetchSubcategoriesSuccess:failure:
Sends a subcategories API request using the shared client and fetches the response as an array of
MDLSubcategory
. -
– fetchLastTagsInPublicLibrarySuccess:failure:
Sends a last tags API request using the shared client and fetches the response as an array of
MDLTag
.
Properties
identifier
The category identifier, as generated by Mendeley.
@property (copy, nonatomic) NSString *identifier
Discussion
The category identifier, as generated by Mendeley.
Declared In
MDLCategory.h
Class Methods
categoryWithIdentifier:name:slug:
Creates a MDLCategory
and initializes its identifier, name, and slug properties.
+ (MDLCategory *)categoryWithIdentifier:(NSString *)identifier name:(NSString *)name slug:(NSString *)slug
Parameters
- identifier
The identifier of the category.
- name
The name of the category.
- slug
The slug of the category.
Return Value
The newly-initialized category.
Discussion
Creates a MDLCategory
and initializes its identifier, name, and slug properties.
Declared In
MDLCategory.h
fetchCategoriesSuccess:failure:
Sends a categories API request using the shared client and fetches the response as an array of MDLCategory
.
+ (void)fetchCategoriesSuccess:(void ( ^ ) ( NSArray *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: an array of
MDLCategory
objects.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a categories API request using the shared client and fetches the response as an array of MDLCategory
.
See Also
Declared In
MDLCategory.h
Instance Methods
fetchLastTagsInPublicLibrarySuccess:failure:
Sends a last tags API request using the shared client and fetches the response as an array of MDLTag
.
- (void)fetchLastTagsInPublicLibrarySuccess:(void ( ^ ) ( NSArray *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: an array of
MDLTag
objects.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a last tags API request using the shared client and fetches the response as an array of MDLTag
.
See Also
Declared In
MDLCategory.h
fetchSubcategoriesSuccess:failure:
Sends a subcategories API request using the shared client and fetches the response as an array of MDLSubcategory
.
- (void)fetchSubcategoriesSuccess:(void ( ^ ) ( NSArray *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: an array of
MDLSubcategory
objects.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a subcategories API request using the shared client and fetches the response as an array of MDLSubcategory
.
Declared In
MDLCategory.h