MDLGroup Class Reference
| Inherits from | NSObject |
| Declared in | MDLGroup.h MDLGroup.m |
Tasks
-
identifierThe group identifier.
property -
nameThe group name.
property -
ownerThe group owner.
property -
categoryThe group category.
property -
mendeleyURLThe group Mendeley URL.
property -
numberOfDocumentsThe group number of documents.
property -
documentsThe group documents.
property -
numberOfAdminsThe group number of admins.
property -
adminsThe group admins.
property -
numberOfMembersThe group number of members.
property -
membersThe group members.
property -
numberOfFollowersThe group number of followers.
property -
followersThe group followers.
property -
typeThe group type (can be ‘private’, ‘invite’, or ‘open’)
property -
+ createGroupWithName:type:success:failure:Creates a
MDLGroupand sends an API creation request using the shared client. -
+ fetchTopGroupsInPublicLibraryForCategory:atPage:count:success:failure:Sends a public group overview API request using the shared client and fetches the response as an array of
MDLGroup. -
+ fetchGroupsInUserLibrarySuccess:failure:Sends a user library groups API request using the shared client and fetches the response as an array of
MDLGroup. -
– fetchDetailsSuccess:failure:Sends a public groups details API request for the current document using the shared client.
-
– fetchPeopleSuccess:failure:Sends a groups people API request for the current document using the shared client.
-
– fetchDocumentsAtPage:count:success:failure:Sends a groups documents API request for the current document using the shared client.
-
– deleteSuccess:failure:Sends a delete group API request using the shared client (you need to be a owner of the group).
-
– leaveSuccess:failure:Sends a leave group API request using the shared client (you need to be an administrator or a member of the group).
-
– unfollowSuccess:failure:Sends a unfollow group API request using the shared client (you need to be a follower of the group).
Properties
admins
The group admins.
@property (strong, nonatomic) NSArray *adminsDiscussion
The group admins.
Declared In
MDLGroup.hcategory
The group category.
@property (strong, nonatomic) MDLCategory *categoryDiscussion
The group category.
Declared In
MDLGroup.hdocuments
The group documents.
@property (strong, nonatomic) NSArray *documentsDiscussion
The group documents.
Declared In
MDLGroup.hfollowers
The group followers.
@property (strong, nonatomic) NSArray *followersDiscussion
The group followers.
Declared In
MDLGroup.hidentifier
The group identifier.
@property (copy, nonatomic) NSString *identifierDiscussion
The group identifier.
Declared In
MDLGroup.hmembers
The group members.
@property (strong, nonatomic) NSArray *membersDiscussion
The group members.
Declared In
MDLGroup.hmendeleyURL
The group Mendeley URL.
@property (strong, nonatomic) NSURL *mendeleyURLDiscussion
The group Mendeley URL.
Declared In
MDLGroup.hname
The group name.
@property (copy, nonatomic) NSString *nameDiscussion
The group name.
Declared In
MDLGroup.hnumberOfAdmins
The group number of admins.
@property (strong, nonatomic) NSNumber *numberOfAdminsDiscussion
The group number of admins.
Declared In
MDLGroup.hnumberOfDocuments
The group number of documents.
@property (strong, nonatomic) NSNumber *numberOfDocumentsDiscussion
The group number of documents.
Declared In
MDLGroup.hnumberOfFollowers
The group number of followers.
@property (strong, nonatomic) NSNumber *numberOfFollowersDiscussion
The group number of followers.
Declared In
MDLGroup.hnumberOfMembers
The group number of members.
@property (strong, nonatomic) NSNumber *numberOfMembersDiscussion
The group number of members.
Declared In
MDLGroup.hClass Methods
createGroupWithName:type:success:failure:
Creates a MDLGroup and sends an API creation request using the shared client.
+ (MDLGroup *)createGroupWithName:(NSString *)name type:(MDLGroupType)type success:(void ( ^ ) ( MDLGroup *))success failure:(void ( ^ ) ( NSError *))failureParameters
- name
The name of the group.
- type
The type of the group.
- 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
MDLGroupwith its newly assigned group 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 group, with group identifier = nil.
Discussion
Creates a MDLGroup and sends an API creation request using the shared client.
Declared In
MDLGroup.hfetchGroupsInUserLibrarySuccess:failure:
Sends a user library groups API request using the shared client and fetches the response as an array of MDLGroup.
+ (void)fetchGroupsInUserLibrarySuccess:(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
MDLGroupobjects.
- 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 user library groups API request using the shared client and fetches the response as an array of MDLGroup.
Declared In
MDLGroup.hfetchTopGroupsInPublicLibraryForCategory:atPage:count:success:failure:
Sends a public group overview API request using the shared client and fetches the response as an array of MDLGroup.
+ (void)fetchTopGroupsInPublicLibraryForCategory:(NSString *)categoryIdentifier atPage:(NSUInteger)pageIndex count:(NSUInteger)count success:(void ( ^ ) ( NSArray *, NSUInteger , NSUInteger , NSUInteger , NSUInteger ))success failure:(void ( ^ ) ( NSError *))failureParameters
- categoryIdentifier
The identifier of the category.
- pageIndex
The page index.
Ois first page.
- count
The number of items returned per page. Maximum is
1000.
- 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
MDLGroupobjects, 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 public group overview API request using the shared client and fetches the response as an array of MDLGroup.
Declared In
MDLGroup.hInstance Methods
deleteSuccess:failure:
Sends a delete group API request using the shared client (you need to be a owner of the group).
- (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 group API request using the shared client (you need to be a owner of the group).
See Also
Declared In
MDLGroup.hfetchDetailsSuccess:failure:
Sends a public groups details API request for the current document using the shared client.
- (void)fetchDetailsSuccess:(void ( ^ ) ( MDLGroup *))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: the current group with its newly assigned details.
- 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 public groups details API request for the current document using the shared client.
Declared In
MDLGroup.hfetchDocumentsAtPage:count:success:failure:
Sends a groups 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 groups documents API request for the current document using the shared client.
Declared In
MDLGroup.hfetchPeopleSuccess:failure:
Sends a groups people API request for the current document using the shared client.
- (void)fetchPeopleSuccess:(void ( ^ ) ( MDLGroup *))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: the current group with its newly assigned people.
- 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 groups people API request for the current document using the shared client.
Declared In
MDLGroup.hleaveSuccess:failure:
Sends a leave group API request using the shared client (you need to be an administrator or a member of the group).
- (void)leaveSuccess:(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 leave group API request using the shared client (you need to be an administrator or a member of the group).
See Also
Declared In
MDLGroup.hunfollowSuccess:failure:
Sends a unfollow group API request using the shared client (you need to be a follower of the group).
- (void)unfollowSuccess:(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 unfollow group API request using the shared client (you need to be a follower of the group).
See Also
Declared In
MDLGroup.h