Home Reference Source Repository
import Version1 from 'livecoding/src/Version1.js'
public class | source

Version1

Api version 1 client

Constructor Summary

Public Constructor
public

Create a new instance

Member Summary

Public Members
public

Method Summary

Public Methods
public

Get a list of coding categories

public

Get a single coding category

public

get(endpoint: String, query: Object): Promise

Perform a GET request

public

Get a spoken language by its name

public

Get a list of spoken languages

public

Get the current/latest livestream for a user

public

Get a list of livestreams

public

Get a list of on-air livestreams

public

me(): Promise

Get the authenticated user

public

Get the chat account for the currently authenticated user

public

Get the followers of the currently authenticated user

public

Get the users that the currently authenticated user is following

public

Get the latest videos for the currently authenticated user

public

Get the current/latest livestream for the currently authenticated user

public

Get a list of videos for the currently authenticated user

public

request(method: String, endpoint: String, options: Object): Promise

Perform a request

public

Get a single scheduled broadcast by its ID

public

Get a list of the scheduled broadcasts

public

user(slug: String): Promise

Get a user by their slug

public

video(slug: String): Promise

Get a single video by its

public

Get a list of videos

Public Constructors

public constructor(token: String): Object source

Create a new instance

Params:

NameTypeAttributeDescription
token String

Access token

Return:

Object

API version 1 client

Public Members

public token: String source

Public Methods

public codingCategories(): Promise source

Get a list of coding categories

Return:

Promise

Response

public codingCategory(name: String): Promise source

Get a single coding category

Params:

NameTypeAttributeDescription
name String

Category name eg. Javascript

Return:

Promise

Response

public get(endpoint: String, query: Object): Promise source

Perform a GET request

Params:

NameTypeAttributeDescription
endpoint String

Resource endpoint

query Object

Request query params

Return:

Promise

Response

public language(name: String): Promise source

Get a spoken language by its name

Params:

NameTypeAttributeDescription
name String

Language name

Return:

Promise

Response

public languages(): Promise source

Get a list of spoken languages

Return:

Promise

Response

public livestreamForUser(slug: String): Promise source

Get the current/latest livestream for a user

Params:

NameTypeAttributeDescription
slug String

User's slug (username)

Return:

Promise

Response

public livestreams(): Promise source

Get a list of livestreams

Return:

Promise

Response

public livestreamsOnAir(): Promise source

Get a list of on-air livestreams

Return:

Promise

Response

public me(): Promise source

Get the authenticated user

Return:

Promise

Response

public myChatAccount(): Promise source

Get the chat account for the currently authenticated user

Return:

Promise

Response

public myFollowers(): Promise source

Get the followers of the currently authenticated user

Return:

Promise

Response

public myFollows(): Promise source

Get the users that the currently authenticated user is following

Return:

Promise

Response

public myLatestVideos(): Promise source

Get the latest videos for the currently authenticated user

Return:

Promise

Response

public myLivestream(): Promise source

Get the current/latest livestream for the currently authenticated user

Return:

Promise

Response

public myVideos(): Promise source

Get a list of videos for the currently authenticated user

Return:

Promise

Response

public request(method: String, endpoint: String, options: Object): Promise source

Perform a request

Params:

NameTypeAttributeDescription
method String

HTTP method (GET, POST etc.)

endpoint String

Resource endpoint

options Object

Request options

Return:

Promise

Response

public scheduledBroadcast(id: Number): Promise source

Get a single scheduled broadcast by its ID

Params:

NameTypeAttributeDescription
id Number

Scheduled broadcast ID

Return:

Promise

Response

public scheduledBroadcasts(): Promise source

Get a list of the scheduled broadcasts

Return:

Promise

Response

public user(slug: String): Promise source

Get a user by their slug

Params:

NameTypeAttributeDescription
slug String

User's slug (username)

Return:

Promise

Response

public video(slug: String): Promise source

Get a single video by its

Params:

NameTypeAttributeDescription
slug String

Video slug

Return:

Promise

Response

public videos(): Promise source

Get a list of videos

Return:

Promise

Response