#%RAML 0.8
title: WWST Media Track Info
version: v1.0.0-20170911
schemas:
- Mode: |
    {
      "id": "http://www.samsung.com/schemas/x.com.st.audiotrackdata.json#",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "description" : "Copyright (c) 2016, 2017 Open Connectivity Foundation, Inc. All rights reserved.",
      "title": "WWST Media Track Info",
      "definitions": {
        "x.com.st.audiotrackdata": {
          "type": "object",
          "properties": {
            "station": {
              "type": "string",
              "description": "Specifies the station of media"
            },
            "title": {
              "type": "string",
              "description": "Specifies the title of media track"
            },
            "artist": {
              "type": "string",
              "description": "Specifies the artist of media track"
            },
            "album": {
              "type": "string",
              "description": "Specifies the album of media track"
            },
            "trackNumber": {
              "type": "integer",
              "description": "Specifies the trackNumber of media track"
            },
            "trackUri": {
              "type": "string",
              "description": "Specifies the trackUri of media track"
            },
            "trackDescription": {
              "type": "string",
              "description": "Specifies the trackDescription of media track"
            },
            "thumbnail": {
              "type": "string",
              "description": "url of the thumbnail"
            }
          }
        }
      },
      "type": "object",
      "allOf": [
      {"$ref": "oic.baseResource.json#/definitions/oic.r.baseresource"},
      {"$ref": "#/definitions/x.com.st.audiotrackdata"}]
    }

traits:
  - interface:
      queryParameters:
        if:
          enum: ["oic.if.s","oic.if.baseline"]

/WWSTMediaTrackInfoResURI:
  description: |
        Media infomation
  displayName: WWST Media Track Info
  is: [ interface ]

  get:
    description: |
      Retrieves the current media track info
    responses:
      200:
        body:
          application/json:
            schema: Mode
            example: |
              {
                "rt": ["x.com.st.audiotrackdata"],
                "id": "unique_example_id",
                "station": "",
                "title": "Example title",
                "artist": "Example title",
                "album": "",
                "trackNumber": "",
                "trackUri": "",
                "trackDescription": "",
                "thumbnail": ""
              }
