Search in sources :

Example 1 with GetMediaMetadataResponse

use of com.sonos.services._1.GetMediaMetadataResponse in project SonosOneDriveServer by bertique.

the class SonosService method getMediaMetadata.

@Override
public GetMediaMetadataResponse getMediaMetadata(GetMediaMetadata parameters) throws CustomFault {
    logger.debug("getMediaMetadata id:" + parameters.getId());
    GraphAuth auth = getGraphAuth();
    String json = graphApiGetRequest("me/drive/items/" + parameters.getId(), 1, null, auth);
    JsonElement element = JsonParser.parseString(json);
    Item m = new Item(element.getAsJsonObject());
    GetMediaMetadataResponse response = new GetMediaMetadataResponse();
    response.setGetMediaMetadataResult(buildMMD(m));
    return response;
}
Also used : Item(me.michaeldick.sonosonedrive.model.Item) RateItem(com.sonos.services._1.RateItem) GraphAuth(me.michaeldick.sonosonedrive.model.GraphAuth) GetMediaMetadataResponse(com.sonos.services._1.GetMediaMetadataResponse) JsonElement(com.google.gson.JsonElement)

Aggregations

JsonElement (com.google.gson.JsonElement)1 GetMediaMetadataResponse (com.sonos.services._1.GetMediaMetadataResponse)1 RateItem (com.sonos.services._1.RateItem)1 GraphAuth (me.michaeldick.sonosonedrive.model.GraphAuth)1 Item (me.michaeldick.sonosonedrive.model.Item)1