Skip to main content

Class: IncubatorService

services/incubator.IncubatorService

Incubator service can be used in the following way:
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

checkIncubatorSubscription(id, config?): Promise<SCIncubatorSubscriptionType>

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCIncubatorSubscriptionType>

Defined in

services/incubator/index.ts:147


createIncubator

createIncubator(data, config?): Promise<SCIncubatorType>

Parameters

NameType
dataIncubatorCreateParams
config?AxiosRequestConfig<any>

Returns

Promise<SCIncubatorType>

Defined in

services/incubator/index.ts:135


getAllIncubators

getAllIncubators(params?, config?): Promise<SCPaginatedResponse<SCIncubatorType>>

Parameters

NameType
params?IncubatorSearchParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCIncubatorType>>

Defined in

services/incubator/index.ts:124


getIncubatorSubscribers

getIncubatorSubscribers(id, config?): Promise<SCPaginatedResponse<SCUserType>>

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCUserType>>

Defined in

services/incubator/index.ts:139


getSpecificIncubator

getSpecificIncubator(id, config?): Promise<SCIncubatorType>

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCIncubatorType>

Defined in

services/incubator/index.ts:132


searchIncubators

searchIncubators(params?, config?): Promise<SCPaginatedResponse<SCIncubatorType>>

Parameters

NameType
params?IncubatorSearchParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCIncubatorType>>

Defined in

services/incubator/index.ts:128


subscribeToIncubator

subscribeToIncubator(id, config?): Promise<any>

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/incubator/index.ts:143