LiveStreamService
1. Import the service from our library:
import {LiveStreamService} from "@selfcommunity/api-services";
2. Create a function and put the service inside it!
The async function `search` will return the LiveStreams matching the search query.
async searchLiveStreams() {
 return await LiveStreamService.search();
}
In case of required `params`, just add them inside the brackets.
async getSpecificInfo(liveStreamId) {
 return await LiveStreamService.getSpecificInfo(liveStreamId);
}
If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
1. Declare it(or declare them, it is possible to add multiple params)
const headers = headers: {Authorization: `Bearer ${yourToken}`}
2. Add it inside the brackets and pass it to the function, as shown in the previous example!
Constructors
Constructor
new LiveStreamService():
LiveStreamService
Returns
LiveStreamService
Methods
changeCover()
staticchangeCover(id,data,config?):Promise<SCLiveStreamType>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| data | FormData | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLiveStreamType>
close()
staticclose(id,config?):Promise<SCLiveStreamType>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLiveStreamType>
create()
staticcreate(data,config?):Promise<SCLiveStreamType>
Parameters
| Parameter | Type | 
|---|---|
| data | LiveStreamCreateParams|FormData | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLiveStreamType>
delete()
staticdelete(id,config?):Promise<any>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| config? | AxiosRequestConfig | 
Returns
Promise<any>
getMonthlyDuration()
staticgetMonthlyDuration(config?):Promise<SCLiveStreamMonthlyDurationType>
Parameters
| Parameter | Type | 
|---|---|
| config? | AxiosRequestConfig | 
Returns
Promise<SCLiveStreamMonthlyDurationType>
getSpecificInfo()
staticgetSpecificInfo(id,config?):Promise<SCLiveStreamType>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLiveStreamType>
join()
staticjoin(id,config?):Promise<SCLiveStreamConnectionDetailsType>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLiveStreamConnectionDetailsType>
patch()
staticpatch(id,data,config?):Promise<SCLiveStreamType>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| data | SCLiveStreamType | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLiveStreamType>
removeParticipant()
staticremoveParticipant(id,data,config?):Promise<any>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| data | LiveStreamRemoveParticipantParams|FormData | 
| config? | AxiosRequestConfig | 
Returns
Promise<any>
search()
staticsearch(params?,config?):Promise<SCPaginatedResponse<SCLiveStreamType>>
Parameters
| Parameter | Type | 
|---|---|
| params? | LiveStreamSearchParams | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCLiveStreamType>>
update()
staticupdate(id,data,config?):Promise<SCLiveStreamType>
Parameters
| Parameter | Type | 
|---|---|
| id | string|number | 
| data | SCLiveStreamType | 
| config? | AxiosRequestConfig | 
Returns
Promise<SCLiveStreamType>