Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

In some countries there are local television channels that need to be made available to people living within a particular locality.

Operators are required to:

  1. Make local channels available to local residents
  2. Ensure that local channels from other areas are not available

Table of Contents


Amino implementation

Amino models local channels by including a boolean flag that indicates whether the channel is local or not.

Users are licensed by the customer to view particular local channels;  Amino does not store information about where the user lives and cannot determine what channels they need to be able to view.

Therefore, when displaying a list of local channels to a user, the client should:

  1. Obtain a general list of channels and find the ones which are local by examining the flag
  2. Filter out channels from this list that the user does not have a license fo

Use case examples

Determining what channels to display to an authenticated user

With the legacy endpoints

Call the API documented at Channel#/Channel/indexUserSpecificChannels

Display channels that have a value of "true" in the "isUserAuthorized" field

With the REST based endpoints

See "what channels should I display to the user" at /wiki/spaces/MAPI/pages/49676405

Getting a list of local channels

With the legacy endpoints

Our legacy endpoint is user specific and performs the license checks required in step 2. 

The API is documented at Channel#/Channel/indexUserSpecificChannels

We use the "isUserAuthorized" field to indicate whether the user is able to view the channel or not.

Therefore, in order to get a list of the local channels the client should:

  1. Call the GET method on the index of user specific channels
  2. Iterate through the list and remove any channel that either:
    1. Does not have the local flag set
    2. Has a value of "false" for "isUserAuthorized"


Warning

There may be a further requirement from the customer that local channels appear with a sequential lcn.   Amino does not guarantee that local channels will be ordered as such in the API output and the client may need to perform further processing in order to meet customer requirements.

With the REST based endpoints

(warning) The REST based API has not yet been released.

Tip
This is a special case of the more general approach described in detail on the page for the /wiki/spaces/MAPI/pages/49676405.

Step 1 - Obtain a list of channels

Fetch an index of the Channel resource.  This API is documented at Metadata: Channels#/Channels/GetChannelIndex

Note that this endpoint is not filtered for the individual user in order to make it publicly cacheable and reduce load on the API.

Step 2 - Filter out channels

The frontend should filter out channels by removing:

  • Channels whose availability window does not include the current time
    • See Channel.availability_window.time_limited_event
    • If this field is true then compare the current time to the "not before" and "not after" definitions
  • Demo channels, unless the user is a demo user
  • Channels that do not have the local flag

This is documented in detail here and only the last bullet point is different from the general approach to managing channels.

Step 3 - Obtain the user licenses

Fetch the channel licenses that are related to a user by calling the API documented at License

Step 4 - Remove channels that the user has no license for

Please see the documentation on Channels at /wiki/spaces/MAPI/pages/49676405