Implementation
In order to maintain performance AminoTV is careful not to provide client-specific API responses unless absolutely necessary.
The API will not take the account blocking status or the client blocking status into account.
The client should determine the user preferences and filter information out of the API response.
Responsibility | Actor |
---|---|
Authenticating the PIN code | API |
Hiding adult content in EPG | Client |
Preventing the user from playing adult content | Client |
First time usage
Step 1: Enable or disable channel locking on the account
By default adult channels will be blocked and the account holder will need to unlock them.
Initially, the account will have a default PIN code set on it.
The client should ask the user if the account should have channel locking enabled or not and then call
PUT /users/{user_id}/channel_lock
to specify whether the `account_channel_lock_status` should be set or not.
If the "account_channel_lock_status" key of the request body is set to false then adult channels will be unblocked.
Step 2: Change the PIN code
If the user decides to leave channel blocking enabled then the client should prompt the user to change their PIN code.
Once the client has obtained the new PIN code from the user it should call
PUT /users/{user_id}/pin_code
in order to change the value.
The first time that the PIN is changed the client may automatically supply the default PIN code to make the user experience more friendly. In any other event the existing PIN code must be supplied in order to change the PIN.
Locking or unlocking adult channels
Account wide setting
If the user wants to allow adult channels to be played without the need for any authorization they are able to disable channel locking on the account.
This setting will affect all devices and persist over multiple login sessions. In other words, if the user logs out on one device and then logs in on another then they will still be able to play adult channels.
In order to set the status of channel locking for the account the client should call
PUT /users/{user_id}/channel_lock
to specify whether the `account_channel_lock_status` should be set or not. If the "account_channel_lock_status" key of the request body is set to false then adult channels will be unblocked.
Per-session setting
The user is able to temporarily disable channel blocking and allow adult channels to be displayed. This will allow them to watch adult channels on their current device for the duration of their login session.
In order to do this, the client should:
- Call PUT /users/{user_id}/channel_lock and set "session_channel_lock_status" to false
- Locally store the time at which the PIN code was authenticated
- Allow the user to view adult content for the time window specified by the operator
Managing the PIN
The client is able to change the PIN for the user by calling
PUT /users/{user_id}/pin_code
The request body must include the correct PIN as it is currently set in order to change the PIN.