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()
static
checkIncubatorSubscription(id
,config?
):Promise
<SCIncubatorSubscriptionType
>
Parameters
Parameter | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise
<SCIncubatorSubscriptionType
>
createIncubator()
static
createIncubator(data
,config?
):Promise
<SCIncubatorType
>
Parameters
Parameter | Type |
---|---|
data | IncubatorCreateParams |
config? | AxiosRequestConfig |
Returns
Promise
<SCIncubatorType
>
getAllIncubators()
static
getAllIncubators(params?
,config?
):Promise
<SCPaginatedResponse
<SCIncubatorType
>>
Parameters
Parameter | Type |
---|---|
params? | IncubatorSearchParams |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCIncubatorType
>>
getIncubatorSubscribers()
static
getIncubatorSubscribers(id
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
Parameters
Parameter | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
getSpecificIncubator()
static
getSpecificIncubator(id
,config?
):Promise
<SCIncubatorType
>
Parameters
Parameter | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise
<SCIncubatorType
>
searchIncubators()
static
searchIncubators(params?
,config?
):Promise
<SCPaginatedResponse
<SCIncubatorType
>>
Parameters
Parameter | Type |
---|---|
params? | IncubatorSearchParams |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCIncubatorType
>>
subscribeToIncubator()
static
subscribeToIncubator(id
,config?
):Promise
<any
>
Parameters
Parameter | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig |
Returns
Promise
<any
>