Skip to content

Netflix API

Version: 1.0.0

Status: ⚫⚪⚪

Netflix interface for Thunder framework.

(Defined by Netflix.json)

Table of Contents

Introduction

Scope

This document describes purpose and functionality of the Netflix interface (version 1.0.0). It includes detailed specification about its methods and properties as well as sent notifications.

Case Sensitivity

All identifiers of the interfaces described in this document are case-sensitive. Thus, unless stated otherwise, all keywords, entities, properties, relations and actions should be treated as such.

Acronyms, Abbreviations and Terms

The table below provides and overview of acronyms used in this document and their definitions.

Acronym Description
API Application Programming Interface
HTTP Hypertext Transfer Protocol
JSON JavaScript Object Notation; a data interchange format
JSON-RPC A remote procedure call protocol encoded in JSON

The table below provides and overview of terms and abbreviations used in this document and their definitions.

Term Description
callsign The name given to an instance of a plugin. One plugin can be instantiated multiple times, but each instance the instance name, callsign, must be unique.

References

Ref ID Description
HTTP HTTP specification
JSON-RPC JSON-RPC 2.0 specification
JSON JSON specification
Thunder Thunder API Reference

Description

Netflix JSON-RPC interface.

Methods

The following methods are provided by the Netflix interface:

Netflix interface methods:

Method Description
factoryreset deprecated Performs a reset to factory defaults
systemcommand Sends a system command to Netflix

factoryreset method

Performs a reset to factory defaults.

factoryreset is an alternative name for this method. This name is deprecated and may be removed in the future. It is not recommended for use in new implementations.

Parameters

This method takes no parameters.

Result

Name Type M/O Description
result null mandatory Always null (default: None)

Errors

Message Description
ERROR_UNAVAILABLE Netflix is unavailable

Example

Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.factoryreset"
}

Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": null
}

systemcommand method

Sends a system command to Netflix.

Parameters

Name Type M/O Description
params object mandatory ...
params.command string mandatory Command to send to Netflix

Result

Name Type M/O Description
result null mandatory Always null (default: None)

Errors

Message Description
ERROR_UNAVAILABLE Netflix is unavailable
ERROR_UNKNOWN_KEY Unknown command

Example

Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.systemcommand",
  "params": {
    "command": "exit"
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": null
}

Properties

The following properties are provided by the Netflix interface:

Netflix interface properties:

Property R/W Description
esn deprecated read-only ESN value
visibility deprecated write-only Current Netflix visibility

StateControl interface properties:

Property R/W Description
state read/write Running state of the service

esn property

Provides access to the ESN value.

This property is read-only.

esn is an alternative name for this property. This name is deprecated and may be removed in the future. It is not recommended for use in new implementations.

Value

Name Type M/O Description
(property) string mandatory ESN value

Errors

Message Description
ERROR_UNAVAILABLE Netflix is unavailable

Example

Get Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.esn"
}

Get Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": "DADDAUFV2=00000000000000000000000000000001"
}

visibility property

Provides access to the current Netflix visibility.

This property is write-only.

visibility is an alternative name for this property. This name is deprecated and may be removed in the future. It is not recommended for use in new implementations.

Also see: visibilitychange

Value

Name Type M/O Description
(property) string mandatory Current Netflix visibility (must be one of the following: hidden, visible)

Example

Set Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.visibility",
  "params": "hidden"
}

Set Response

{
    "jsonrpc": "2.0",
    "id": 42,
    "result": "null"
}

state property

Provides access to the running state of the service.

Also see: statechange

Value

Name Type M/O Description
(property) string mandatory Running state of the service (must be one of the following: resumed, suspended)
Name Type M/O Description
(property) string mandatory Running state of the service (must be one of the following: resumed, suspended)

Example

Get Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.state"
}

Get Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": "suspended"
}

Set Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.state",
  "params": "suspended"
}

Set Response

{
    "jsonrpc": "2.0",
    "id": 42,
    "result": "null"
}

Notifications

Notifications are autonomous events triggered by the internals of the implementation and broadcasted via JSON-RPC to all registered observers. Refer to [Thunder] for information on how to register for a notification.

The following events are provided by the Netflix interface:

Netflix interface events:

Notification Description
playbackchange Signals playback status change

StateControl interface events:

Notification Description
statechange Signals a state change of the service

playbackchange notification

Signals playback status change.

Notification Parameters

Name Type M/O Description
params object mandatory ...
params.playing boolean mandatory Determines if the Netflix is in playing mode (true) or not playing (false)

Example

Registration

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.register",
  "params": {
    "event": "playbackchange",
    "id": "myid"
  }
}

Notification

{
  "jsonrpc": "2.0",
  "method": "myid.playbackchange",
  "params": {
    "playing": true
  }
}

The client ID parameter is passed within the notification designator, i.e. <client-id>.playbackchange.

statechange notification

Signals a state change of the service.

Notification Parameters

Name Type M/O Description
params object mandatory ...
params.suspended boolean mandatory Determines if the service has entered suspended state (true) or resumed state (false)

Example

Registration

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "<callsign>.1.register",
  "params": {
    "event": "statechange",
    "id": "myid"
  }
}

Notification

{
  "jsonrpc": "2.0",
  "method": "myid.statechange",
  "params": {
    "suspended": false
  }
}

The client ID parameter is passed within the notification designator, i.e. <client-id>.statechange.