Class ContentAssetRequest<T extends ContentAssetRequest,C extends Asset>

Direct Known Subclasses:
GetContentItemRequest, GetCustomContentItemRequest, GetDigitalAssetRequest

public abstract class ContentAssetRequest<T extends ContentAssetRequest,C extends Asset> extends ContentRequestById<T,C>
  • Field Details

  • Constructor Details

  • Method Details

    • expand

      public T expand(String field)
      Specify whether to expand fields in the content item. Can be a value such as "fields.field_name" to expand a specific item reference. Note that by default this is not set. See also expandAll()
      Parameters:
      field - expand field value (e.g. "all") or null to not expand references
      Returns:
      Builder object
    • expand

      public T expand(List<String> expandFields)
      Specifies a list of fields to expand when requesting the item.
      Parameters:
      expandFields - list of string fields to expand
      Returns:
      Builder object
    • expandAll

      public T expandAll()
      Just like calling expand with "all" as the parameter. Will expand all item reference fields.
      Returns:
      Builder object.
    • deserializeContentBaseItem

      public static Asset deserializeContentBaseItem(com.google.gson.JsonElement jsonElement)
      Utility method to deserialize response to a Asset. If this is a digital asset, it will deserialize into a DigitalAsset, otherwise a ContentItem
      Parameters:
      jsonElement - Root json element for content item
      Returns:
      Either a ContentItem or DigitalAsset depending on the type
    • getExpand

      public String getExpand()
    • getCall

      public retrofit2.Call<com.google.gson.JsonElement> getCall()
      Description copied from class: ContentRequest
      Get the retrofit call to make for this request..
      Specified by:
      getCall in class ContentRequest<T extends ContentAssetRequest,C extends Asset>
      Returns:
      return the retrofit call object to use for this request