Skip to content

dulta/feel-subs-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Feel-Subtitles REST API

RESTfull API provides access to the following resources:

  • Video
  • Subtitles
  • Applications

API endpoints

Application resource

All requests to video and subtitles resources must be signed with application token. Application token is a string that must be obtained via the following API.

Get application token

GET /api/v1/app/<application-key>/token?video=<video-id>

Parameters

URL parameter:

  • <application-key> is a secret key generated by feel-subtitles admin via admin interface. Please contact us to obtain the key.
  • <video-id> - (optional) video id to allow access to. If video id is provided, access with this token will be limited to playing this video only (GET request to /api/v1/videos//subtitles) If video id is not provided, this token will allow all operations.
Response (JSON)
{
  apptoken: 'application-token'
}

The token is valid for 24 hours. Please note that each subsequent request can return a different application token. Multiple tokens obtained this way can be valid at the same time as long as they are not expired.

For security reason, to avoid application key exposure we recommend to perform such requests from server side only, not from the client side.

Application Groups

Each application belongs to a group. Each group can contain one or more applications.

Videos and subtitles created by one group are not visible by applications of any other group.

Please contact the platform administrator if you need several applicaitons to be grouped.

Video resource

Get a list of all videos

GET /api/v1/videos?apptoken=<apptoken>

Parameters
  • apptoken - application token
Response JSON
{
  "total_pages": 1,
  "objects": [
    {
      "subtitles_count": 2,
      "created": "2016-01-12T15:48:15.633558",
      "external_id": "video-id",
      "name": "",
      "description": null
    },
    {
      "subtitles_count": 0,
      "created": "2016-01-14T14:41:00.870006",
      "external_id": "another video",
      "name": "another video",
      "description": null
    },
  ],
  "num_results": 2,
  "page": 1
}

Subtitles resource

Get all subtitles for video

GET /api/v1/videos/<video-id>/subtitles?apptoken=<apptoken>

URL parameters
  • video-id - video ID
  • apptoken - application token
Response

Returns a new subtitle object in JSON format. Example:

[
  {
    "description": "Subs description,\ncan be multiline",
    "created": "2016-01-13T14:47:00.368874",
    "text": "{0:0, 1:1}",
    "video_external_id": "video-id",
    "type": "penetration",
    "id": 28,
    "name": "Subs name"
  },
  {
    "description": "Subs description,\ncan be multiline",
    "created": "2016-01-13T14:50:06.239584",
    "text": "{0:0, 1:1}",
    "video_external_id": "video-id",
    "type": "penetration",
    "id": 29,
    "name": "Subs name"
  }
]

About

Feel Subtitles REST API documentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published