IncubatorService
1. Import the service from our library:
import {IncubatorService} from "@selfcommunity/api-services";
2. Create a function and put the service inside it!
The async function `getAllIncubators` will return the paginated list of incubators.
async getAllIncubators() {
return await IncubatorService.getAllIncubators();
}
In case of required `params`, just add them inside the brackets.
async getSpecificIncubator(incubatorId) {
return await IncubatorService.getSpecificIncubator(incubatorId);
}
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 IncubatorService():
IncubatorService
Returns
IncubatorService
Methods
checkIncubatorSubscription()
staticcheckIncubatorSubscription(id,config?):Promise<SCIncubatorSubscriptionType>
Parameters
| Parameter | Type |
|---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise<SCIncubatorSubscriptionType>
createIncubator()
staticcreateIncubator(data,config?):Promise<SCIncubatorType>
Parameters
| Parameter | Type |
|---|---|
data | IncubatorCreateParams |
config? | AxiosRequestConfig |
Returns
Promise<SCIncubatorType>
getAllIncubators()
staticgetAllIncubators(params?,config?):Promise<SCPaginatedResponse<SCIncubatorType>>
Parameters
| Parameter | Type |
|---|---|
params? | IncubatorSearchParams |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCIncubatorType>>
getIncubatorSubscribers()
staticgetIncubatorSubscribers(id,config?):Promise<SCPaginatedResponse<SCUserType>>
Parameters
| Parameter | Type |
|---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCUserType>>
getSpecificIncubator()
staticgetSpecificIncubator(id,config?):Promise<SCIncubatorType>
Parameters
| Parameter | Type |
|---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise<SCIncubatorType>
searchIncubators()
staticsearchIncubators(params?,config?):Promise<SCPaginatedResponse<SCIncubatorType>>
Parameters
| Parameter | Type |
|---|---|
params? | IncubatorSearchParams |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCIncubatorType>>
subscribeToIncubator()
staticsubscribeToIncubator(id,config?):Promise<any>
Parameters
| Parameter | Type |
|---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise<any>