CollectionsModule
public class CollectionsModule
Management of collections of files and folders. The only collection available is the Favorites
.
-
Retrieves the collections for the given user.
Declaration
Swift
public func list( offset: Int? = nil, limit: Int? = nil, fields: [String]? = nil ) -> OffsetPaginationIterator<BoxCollection>Parameters
offsetThe offset of the item at which to begin the response. See offset-based paging for details. This parameter cannot be used simultaneously with the ‘marker’ parameter.
limitThe maximum number of items to return. The default is 100 and the maximum is 1,000.
-
Retrieve the favorites collection
Declaration
Swift
public func getFavorites(fields: [String]? = nil, completion: @escaping Callback<BoxCollection>)Parameters
fieldsThe set of fields to retrieve on the resulting collection object
completionPassed the favorites collection, or an error if the API call fails
-
Gets all of the files, folders, or web links contained within a collection.
Declaration
Swift
public func listItems( collectionId: String, offset: Int? = nil, limit: Int? = nil, fields: [String]? = nil ) -> OffsetPaginationIterator<FolderItem>Parameters
collectionIdThe ID of the collection on which to retrieve information.
offsetThe offset of the item at which to begin the response. See offset-based paging for details. This parameter cannot be used simultaneously with the ‘marker’ parameter.
limitThe maximum number of items to return. The default is 100 and the maximum is 1,000.
fieldsComma-separated list of fields to include in the response. Any attribute in the full file or folder objects can be passed in with the fields parameter to get specific attributes, and only those specific attributes back; otherwise, the mini format is returned for each item by default. Multiple attributes can be passed in separated by commas e.g. fields=name,created_at.
CollectionsModule Class Reference