io.clarify.api
Class BundleMetadata

java.lang.Object
  extended by io.clarify.api.ClarifyModel
      extended by io.clarify.api.BundleMetadata

public class BundleMetadata
extends ClarifyModel

Provides details on the stored Metadata for a specific media Bundle. Metadata may also contain user data within the data field as any JSON payload


Field Summary
protected  ClarifyClient client
           
 
Fields inherited from class io.clarify.api.ClarifyModel
response
 
Constructor Summary
BundleMetadata(ClarifyClient client, ClarifyResponse response)
           
 
Method Summary
 String getBundleId()
           
 boolean resetData()
          Delete the metadata of a bundle and set data to {} (empty object.) This is functionally equivalent to an update metadata request with data set to {}.
 BundleMetadata updateData(String json)
          Updates the user-defined data property of the Bundle's Metadata with the supplied JSON string, then return a refreshed copy (resulting in 2 API calls)
 
Methods inherited from class io.clarify.api.ClarifyModel
getClarifyClient, getClarifyResponse, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

client

protected ClarifyClient client
Constructor Detail

BundleMetadata

public BundleMetadata(ClarifyClient client,
                      ClarifyResponse response)
Method Detail

resetData

public boolean resetData()
                  throws IOException
Delete the metadata of a bundle and set data to {} (empty object.) This is functionally equivalent to an update metadata request with data set to {}.

Returns:
true if the operation succeeded
Throws:
IOException - if a failure occurred during the API, typically a 4xx HTTP error code + JSON payload with the error message and details

updateData

public BundleMetadata updateData(String json)
                          throws IOException
Updates the user-defined data property of the Bundle's Metadata with the supplied JSON string, then return a refreshed copy (resulting in 2 API calls)

Parameters:
json - a String containing valid JSON, or null. If null is passed, then the data is reset to a JSON equiv of {}
Returns:
a refreshed Metadata instance for the media bundle
Throws:
IOException - if a failure occurred during the API, typically a 4xx HTTP error code + JSON payload with the error message and details

getBundleId

public String getBundleId()


Copyright © 2015 Clarify Inc. All Rights Reserved.