Skip to end of banner
Go to start of banner

Working with metadata

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 21 Current »

Introduction

This page lists some sample use cases working with metadata and the endpoints in the service that support them

(info) The base url is https://demo.aminocom.com/api/metadata/v1/

Examples

As a subscriber, I would like to choose which language to use for UI and detail of an asset

The system supports multiple languages. 

The system determines what language is desired using the following order of precedence.  The system will pick the first available option from this list, going downwards until reaching the default.

  1. The `language` parameter supplied in the request url,
  2. The `Accept-Language` header supplied in the HTTP request, 
  3. The configured default language for the installation

If the language that is desired is not available then the system will use the first available language that it finds.

(info) Note that language availability is considered "per field" rather than for the whole response.  For example, If the desired language is Finnish but there is no Finnish title for the program description then an alternative language description might be used (if it is available) for the description, but all the other fields will remain in Finnish.




As a subscriber, I would like to see series images, episode images, episode number, season number

Use caseEndpointFieldsComments
I would like to see series images/series/{series_id}data.attributes.imagesThe properties of all the images associated with the series are available
I would like to see episode images/programs/{program_id}(included episode).attributes.imagesAll episodes related to the program will be included following the JSON api specification. You'll need to loop through the `included` key until you match the episode (by checking the `type` and `id` fields) and then look in the `attributes.images` key
I would like to see the episode number/programs/{program_id}(included episode).attributes.episode_number
I would like to see the season number/seasons/{season_id}attributes.titleWe don't limit seasons to having an integer number but rather allow a string format title. For series that have seasons which are numbered then the title will just be the season number
Clarifying example of an episode resource
    {
      "type": "Episode",
      "id": "63bbc7de-d394-4252-abf9-701f35310b1e",
      "attributes": {
        "episode_number": 2,
        "images": [
          {
            "id": "63bbc7de-d394-4252-abf9-701f35310b1e",
            "image_type": "Thumbnail",
            "alternate_access_description": "Bruce Willis shooting a big gun at some bad guys, pew pew pew",
            "width_pixels": 320,
            "height_pixels": 200,
            "iso_639-2_lang": "fin",
            "url": "https://www.demo.com/assets/img/thumbnails/movies/diehard.png"
          }
        ],
        "relationships": {
          "program": {
            "data": {
              "id": "d0de0088-3141-439e-8455-839bdb8f6cec",
              "type": "Program"
            }
          }
        }
      }
    }




As a subscriber, I would like to see related information

Use caseEndpointFieldsComments
see related information of a program/programs/{program_id}included This endpoint will *always* include related [Series|Episode|Season|Genre|CreditedPerson] resources
see quality of the stream (HD, SD, UHD)https://demo.aminocom.com/api/v1//media/{channel_id}/relationships/streamsdata.attributes.bitrate
see related information of a series/series/{series_id}includedThis endpoint will *always* include [Season|Genre|CreditedPerson] relationships















As a subscriber, I would like to know if a programme belong to a series or a season

Use caseEndpointFieldsComments
know if a programme belong to a series or a season/programs/{program_id}includedThis endpoint will *always* include [Series|Episode|Season|Genre|CreditedPerson] 
If the resource is not included it means that there is no relationship (in other words the programme does not belong to a series or to a season, depending on which resource is missing).
Clarifying example of a series resource
  {
    "type": "Series",
    "id": "f9df1401-9d25-48e0-b5d6-0745a86bd975",
    "attributes": {
      "id": "f9df1401-9d25-48e0-b5d6-0745a86bd975",
      "title": "Friends",
      "descriptions": {
        "short": "Follows the personal and professional lives of six 20 to 30-something-year-old friends living in Manhattan.",
        "long": "Rachel Green, Ross Geller, Monica Geller, Joey Tribbiani, Chandler Bing and Phoebe Buffay are six 20 something year-olds, living off of one another in the heart of New York City. Over the course of ten years, this average group of buddies goes through massive mayhem, family trouble, past and future romances, fights, laughs, tears and surprises as they learn what it really means to be a friend.",
        "extended": "string"
      },
      "year_released": 1993,
      "content_flags": [
        {
          "content_rating_authority": "fi",
          "content_rating_flag": "13",
          "is_adult_rated": 1,
          "images": [
            {
              "id": "63bbc7de-d394-4252-abf9-701f35310b1e",
              "image_type": "Thumbnail",
              "alternate_access_description": "Bruce Willis shooting a big gun at some bad guys, pew pew pew",
              "width_pixels": 320,
              "height_pixels": 200,
              "iso_639-2_lang": "fin",
              "url": "https://www.demo.com/assets/img/thumbnails/movies/diehard.png"
            }
          ]
        }
      ],
      "images": [
        {
          "id": "63bbc7de-d394-4252-abf9-701f35310b1e",
          "image_type": "Thumbnail",
          "alternate_access_description": "Bruce Willis shooting a big gun at some bad guys, pew pew pew",
          "width_pixels": 320,
          "height_pixels": 200,
          "iso_639-2_lang": "fin",
          "url": "https://www.demo.com/assets/img/thumbnails/movies/diehard.png"
        }
      ]
    }
  }
Clarifying example of a season resource
  {
    "type": "Season",
    "id": "e00adc12-6fcb-4176-832f-45a0b84aa908",
    "attributes": {
      "id": "feaf803a-3ca9-4d2e-b86b-9d217183efc5",
      "title": "Season 1 (1994)",
      "descriptions": {
        "short": "string",
        "long": "string",
        "extended": "string"
      },
      "images": [
        {
          "id": "63bbc7de-d394-4252-abf9-701f35310b1e",
          "image_type": "Thumbnail",
          "alternate_access_description": "Bruce Willis shooting a big gun at some bad guys, pew pew pew",
          "width_pixels": 320,
          "height_pixels": 200,
          "iso_639-2_lang": "fin",
          "url": "https://www.demo.com/assets/img/thumbnails/movies/diehard.png"
        }
      ]
    }
  }




As a subscriber, I would like to have single view that combine both VOD and TV Programme, so that I could choose title and decide where and when to watch

VOD is not currently supported as part of this metadata system.

  • No labels