MDLFolder Class Reference
| Inherits from | NSObject |
| Declared in | MDLFolder.h MDLFolder.m |
Tasks
-
identifierThe folder identifier.
property -
nameThe folder name.
property -
parentThe folder parent.
property -
parentIdentifierThe folder parent identifier.
property -
subfoldersThe folder subfolders.
property -
numberOfDocumentsThe folder number of documents.
property -
documentsThe folder documents.
property -
+ createFolderWithName:parent:success:failure:Creates a
MDLFolderand sends an API creation request using the shared client. -
+ fetchFoldersInUserLibrarySuccess:failure:Sends a folder API request using the shared client.
-
– fetchDocumentsAtPage:count:success:failure:Sends a folders documents API request for the current document using the shared client.
-
– addDocument:success:failure:Sends a add document to folder API request using the shared client.
-
– deleteSuccess:failure:Sends a delete folder API request using the shared client.
-
– removeDocument:success:failure:Sends a delete document from folder API request using the shared client.
Properties
documents
The folder documents.
@property (strong, nonatomic) NSArray *documentsDiscussion
The folder documents.
Declared In
MDLFolder.hidentifier
The folder identifier.
@property (copy, nonatomic) NSString *identifierDiscussion
The folder identifier.
Declared In
MDLFolder.hname
The folder name.
@property (copy, nonatomic) NSString *nameDiscussion
The folder name.
Declared In
MDLFolder.hnumberOfDocuments
The folder number of documents.
@property (strong, nonatomic) NSNumber *numberOfDocumentsDiscussion
The folder number of documents.
Declared In
MDLFolder.hparent
The folder parent.
@property (weak, nonatomic) MDLFolder *parentDiscussion
The folder parent.
Declared In
MDLFolder.hparentIdentifier
The folder parent identifier.
@property (copy, nonatomic) NSString *parentIdentifierDiscussion
The folder parent identifier.
Declared In
MDLFolder.hClass Methods
createFolderWithName:parent:success:failure:
Creates a MDLFolder and sends an API creation request using the shared client.
+ (MDLFolder *)createFolderWithName:(NSString *)name parent:(MDLFolder *)parent success:(void ( ^ ) ( MDLFolder *))success failure:(void ( ^ ) ( NSError *))failureParameters
- name
The name of the folder.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: the created
MDLFolderwith its newly assigned folder identifier.
- 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
NSErrorobject describing the network or parsing error that occurred.
Return Value
The newly-initialized folder, with folder identifier = nil.
Discussion
Creates a MDLFolder and sends an API creation request using the shared client.
See Also
Declared In
MDLFolder.hfetchFoldersInUserLibrarySuccess:failure:
Sends a folder API request using the shared client.
+ (void)fetchFoldersInUserLibrarySuccess:(void ( ^ ) ( NSArray *))success failure:(void ( ^ ) ( NSError *))failureParameters
- 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
MDLFolderobjects.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a folder API request using the shared client.
See Also
Declared In
MDLFolder.hInstance Methods
addDocument:success:failure:
Sends a add document to folder API request using the shared client.
- (void)addDocument:(MDLDocument *)document success:(void ( ^ ) ( ))success failure:(void ( ^ ) ( NSError *))failureParameters
- document
A
MDLDocmuentto add to the current folder.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes no argument.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a add document to folder API request using the shared client.
Declared In
MDLFolder.hdeleteSuccess:failure:
Sends a delete folder API request using the shared client.
- (void)deleteSuccess:(void ( ^ ) ( ))success failure:(void ( ^ ) ( NSError *))failureParameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes no argument.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a delete folder API request using the shared client.
See Also
Declared In
MDLFolder.hfetchDocumentsAtPage:count:success:failure:
Sends a folders documents API request for the current document using the shared client.
- (void)fetchDocumentsAtPage:(NSUInteger)pageIndex count:(NSUInteger)count success:(void ( ^ ) ( NSArray *, NSUInteger , NSUInteger , NSUInteger , NSUInteger ))success failure:(void ( ^ ) ( NSError *))failureParameters
- pageIndex
The page index.
Ois first page.
- count
The number of items returned per page.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes five arguments: an array of
MDLDocumentobjects, the total number of results, the total number of pages, the index of the current page, and the number of items per page.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a folders documents API request for the current document using the shared client.
Declared In
MDLFolder.hremoveDocument:success:failure:
Sends a delete document from folder API request using the shared client.
- (void)removeDocument:(MDLDocument *)document success:(void ( ^ ) ( ))success failure:(void ( ^ ) ( NSError *))failureParameters
- document
The document to remove.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes no argument.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a delete document from folder API request using the shared client.
Declared In
MDLFolder.h