Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.box.androidsdk.content;
 
Represents the API of the collections endpoint on Box. This class can be used to generate request objects for each of the APIs exposed endpoints
 
public class BoxApiCollection extends BoxApi {

    
Constructs a BoxApiCollection with the provided BoxSession

Parameters:
session authenticated session to use with the BoxApiCollection
    public BoxApiCollection(BoxSession session) {
        super(session);
    }

    
Gets the URL for getting the available collections

Returns:
the URL string for getting the available collections
    protected String getCollectionsUrl() {
        return String.format("%s/collections"getBaseUri());
    }

    
Gets the URL for getting the items of a collection

Returns:
the URL string for getting a collections items
    protected String getCollectionItemsUrl(String id) {
        return String.format("%s/%s/items"getCollectionsUrl(), id);
    }

    
Gets a request that gets the collections belonging to the user

Returns:
request to get collections belonging to the user
        return request;
    }

    
Gets a request that gets the items of a collection

Parameters:
id id of collection to retrieve items of
Returns:
request to get a collections items
        return request;
    }
New to GrepCode? Check out our FAQ X