Inherits from NSObject
Declared in MDLCategory.h
MDLCategory.m

Overview

MDLCategory represents a category, as described by Mendeley.

Tasks

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

name

The category name.

@property (copy, nonatomic) NSString *name

Discussion

The category name.

Declared In

MDLCategory.h

slug

The category slug.

@property (copy, nonatomic) NSString *slug

Discussion

The category slug.

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.

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.

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