Skip to main content

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

new IncubatorService()

new IncubatorService(): IncubatorService

Returns

IncubatorService

Methods

checkIncubatorSubscription()

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

Parameters

ParameterType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCIncubatorSubscriptionType>

Source

services/incubator/index.ts:147


createIncubator()

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

Parameters

ParameterType
dataIncubatorCreateParams
config?AxiosRequestConfig<any>

Returns

Promise<SCIncubatorType>

Source

services/incubator/index.ts:135


getAllIncubators()

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

Parameters

ParameterType
params?IncubatorSearchParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCIncubatorType>>

Source

services/incubator/index.ts:124


getIncubatorSubscribers()

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

Parameters

ParameterType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/incubator/index.ts:139


getSpecificIncubator()

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

Parameters

ParameterType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCIncubatorType>

Source

services/incubator/index.ts:132


searchIncubators()

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

Parameters

ParameterType
params?IncubatorSearchParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCIncubatorType>>

Source

services/incubator/index.ts:128


subscribeToIncubator()

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

Parameters

ParameterType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/incubator/index.ts:143