Interface FavoriteResources


  • public interface FavoriteResources
    • Method Detail

      • addFavorites

        java.util.List<Favorite> addFavorites​(java.util.List<Favorite> favorites)
                                       throws SmartsheetException

        Adds one or more items to the user’s list of Favorite items.

        It mirrors to the following Smartsheet REST API method: POST /favorites

        Exceptions: IllegalArgumentException : if any argument is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ResourceNotFoundException : if the resource can not be found ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation

        Parameters:
        favorites - the list of favorites object limited to the following attributes: * objectId * type
        Returns:
        a single Favorite object or an array of Favorite objects
        Throws:
        SmartsheetException - the smartsheet exception
      • listFavorites

        PagedResult<Favorite> listFavorites​(PaginationParameters parameters)
                                     throws SmartsheetException

        Gets a list of all of the user’s Favorite items.

        It mirrors to the following Smartsheet REST API method: GET /favorites

        Exceptions: IllegalArgumentException : if any argument is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ResourceNotFoundException : if the resource can not be found ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation

        Parameters:
        parameters - pagination parameters
        Returns:
        a single Favorite object or an array of Favorite objects
        Throws:
        SmartsheetException - the smartsheet exception
      • removeFavorites

        void removeFavorites​(FavoriteType favoriteType,
                             java.util.Set<java.lang.Long> objectIds)
                      throws SmartsheetException

        Deletes a list of favorites (all of the same type)

        It mirrors to the following Smartsheet REST API method: DELETE /favorites

        Exceptions: IllegalArgumentException : if any argument is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ResourceNotFoundException : if the resource can not be found ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation

        Parameters:
        favoriteType - the favorite type
        objectIds - a single Favorite object ID or an array of Favorite object IDs
        Throws:
        SmartsheetException - the smartsheet exception