Resource: Shows

Topics:

Actions

  • - (Object) index(method = GET, url = '/rest/v1/shows')

Url:

  • [GET] /rest/v1/shows
  • [GET] /rest/v1/channels/:id/shows (shows linked to a specific channel)
  • [GET] /rest/v1/categories/:id/shows (shows linked to a specific category)
  • [GET] /rest/v1/channels/:id/categories/:id/shows (shows linked to a channel and category)
Note:

This action does not require a cookie session. If there is no cookie session then the device id parameter is required.

Note:

By default this request will only return shows with a active value of true, you need to explicitly request inactive shows in the url to receive them.

Note:

Any show linked to a channel which is inactive will itself be considered inactive therefore if you wish to view shows of an inactive channel you should use the channel_include_inactive param

Returns all shows on the service or shows linked to a particular channel / category

Arguments:

  • (String) device

    (optional, required if no cookie session) the id of the service device

  • (Any) channel_include_inactive

    (optional) the value of this can be anything. This will only have an effect on urls /rest/v1/channels/:id/shows and /rest/v1/channels/:id/categories/:id/shows. The presence of this param will signal that you wish to receive all shows active and inactive that are linked to a channel which can be active or inactive. This will override the active param if that is present with this param

  • (Boolean) active

    (optional) value of "true" will only return active shows, value of "false" will only return inactive shows, if not provided then only active shows will be returned

  • (String) sort

    (optional) values can be "promotion" or "popularity"

  • (Number) limit

    (optional) limit number of results to return

Example Request:

Requesting all active shows on the service
https://service_name.synctv.com/rest/v1/shows?device=urn:synctv:devices:web:11223344

Example Response:

<scbp>
<shows>
<show>
  <id>1551</id>
  <name>My Show</name>
  <active>true</active>
  <advisory></advisory>
  <copyright></copyright>
  <sku></sku>
  <episodes_count>0</episodes_count>
  <volumes_count>0</volumes_count>
  <type>seasonal_series</type>
  <description></description>
  <channel>
    <id>999</id>
    <name>My Channel</name>
  </channel>
  <images>
    <image>
      <format>image_format-1</format>
      <url>/image-1.png</url>
    </image>
  </images>
  <links>
    <category>/rest/v1/categories/1140/shows</category>
    <channel>/rest/v1/channels/999/shows</channel>
    <metadata>/rest/v1/shows/1551</metadata>
    <collections>/rest/v1/shows/1551/seasons</collections>
  </links>
</show>
</shows>
</scbp>
  • - (Object) show(method = GET, url = '/rest/v1/shows/:id')

Url:

  • [GET] /rest/v1/shows/:id
Note:

This action does not require a cookie session. If there is no cookie session then the device id parameter is required.

Note:

By default this url will not return a inactive show, if you wish to access inactive shows you will to use the include_inactive param

Note:

Any show linked to a channel which is inactive will itself be considered inactive

Returns details of a specific show

Arguments:

  • (String) device

    (optional, required if no cookie session) the id of the service device

  • (Any) include_inactive

    (optional) the value of this can be anything. The presence of this will signal that you wish to receive details of a show regardless of whether it is active or inactive

Example Request:

https://service_name.synctv.com/rest/v1/shows/100?device=urn:synctv:devices:web:11223344

Example Response:

<scbp>
<show>
  <id>1554</id>
  <name>Another Show</name>
  <active>true</active>
  <advisory></advisory>
  <copyright></copyright>
  <sku></sku>
  <episodes_count>0</episodes_count>
  <volumes_count>0</volumes_count>
  <type>seasonal_series</type>
  <description></description>
  <channel>
    <id>1000</id>
    <name>My Channel</name>
  </channel>
  <images>
    <image>
      <format>image_format-2</format>
      <url>/image-2.png</url>
    </image>
  </images>
  <links>
    <category>/rest/v1/categories/1141/shows</category>
    <channel>/rest/v1/channels/1000/shows</channel>
    <collections>/rest/v1/shows/1554/seasons</collections>
  </links>
</show>
</scbp>
  • - (Object) update(method = PUT, url = '/rest/v1/shows/:id')

Url:

  • [PUT] /rest/v1/shows/:id
Note:

This request requires admin access.

Updates an show’s metadata

Arguments:

  • (Boolean) show[active]

    (optional) sets the show to active or inactive, accepts only "true" or "false"

  • (String) show[name]

    (optional) sets the show name

  • (String) show[advisory]

    (optional) sets the show advisory rating, accepts any string, max of 20 characters

  • (String) show[copyright]

    (optional) sets the show copyright

  • (String) show[sku]

    (optional) sets the show stock keeping unit, accepts any string

  • (String) show[type]

    (optional) sets the show type, can only be "volume_series" or "seasonal_series", any other value will result in a error

  • (String) show[description]

    (optional) sets the show description

Example Request:

Request changing an show name
https://service_name.synctv.com/rest/v1/shows/100?show[name]=new_name

Example Response:

<scbp>
  <show>
    <type>seasonal_series</type>
    <description nil="true"></description>
    <copyright nil="true"></copyright>
    <advisory nil="true"></advisory>
    <volumes_count type="integer">0</volumes_count>
    <sku nil="true"></sku>
    <channel>
      <name>My Channel</name>
      <id type="integer">1002</id>
    </channel>
    <name>My Show</name>
    <active type="boolean">true</active>
    <episodes_count type="integer">0</episodes_count>
    <id type="integer">1556</id>
  </show>
  <version>0.5</version>
</scbp>
  • - (Object) search(method = GET, url = '/rest/v1/search/shows')

Url:

  • [GET] /rest/v1/search/shows
Note:

This action does not require a cookie session. If there is no cookie session then the device id parameter is required.

Note:

By default this request will only return shows with a active value of true, you need to explicitly request inactive shows in the url to receive them.

Note:

Any show linked to a channel which is inactive will itself be considered inactive

Returns all active shows on the service which match the search criteria provided

Arguments:

  • (String) device

    (optional, required if no cookie session) the id of the service device

  • (String) name

    (optional) the search term used to find all shows with a name which partially or fully matches this parameter

  • (Boolean) active

    (optional) value of "true" will only return active shows, value of "false" will only return inactive shows, if not provided then only active shows will be returned

  • (String) sort

    (optional) values can be "promotion" or "popularity"

  • (Number) limit

    (optional) limit number of results to return

Example Request:

Requesting all active shows on the service who have a name partially or fully matching "Alfie"
https://service_name.synctv.com/rest/v1/search/shows?name=Alfie&device=urn:synctv:devices:web:11223344

Example Response:

<scbp>
<shows>
<show>
  <id>1557</id>
  <name>My Show</name>
  <active>true</active>
  <advisory></advisory>
  <copyright></copyright>
  <sku></sku>
  <episodes_count>1</episodes_count>
  <volumes_count>1</volumes_count>
  <type>seasonal_series</type>
  <description></description>
  <channel>
    <id>1003</id>
    <name>My Channel</name>
  </channel>
  <images>
  </images>
  <links>
    <category>/rest/v1/categories/1144/shows</category>
    <channel>/rest/v1/channels/1003/shows</channel>
    <metadata>/rest/v1/shows/1557</metadata>
    <collections>/rest/v1/shows/1557/seasons</collections>
  </links>
</show>
</shows>
</scbp>