Skip to main content

SuggestionService

Suggestion service can be used in the following way:
1. Import the service from our library:

import {SuggestionService} from "@selfcommunity/api-services";
2. Create a function and put the service inside it!
The async function `getCategorySuggestion` will return the paginated list of categories.

async getCategorySuggestion() {
return await SuggestionService.getCategorySuggestion();
}
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 SuggestionService()

new SuggestionService(): SuggestionService

Returns

SuggestionService

Methods

getCategorySuggestion()

static getCategorySuggestion(params?, config?): Promise <SCPaginatedResponse<SCCategoryType>>

Parameters

ParameterType
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCCategoryType>>

Source

services/suggestion/index.ts:105


getEventSuggestion()

static getEventSuggestion(params?, config?): Promise <SCPaginatedResponse<SCEventType>>

Parameters

ParameterType
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCEventType>>

Source

services/suggestion/index.ts:121


getIncubatorSuggestion()

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

Parameters

ParameterType
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCIncubatorType>>

Source

services/suggestion/index.ts:109


getPollSuggestion()

static getPollSuggestion(params?, config?): Promise <SCPaginatedResponse<SCFeedObjectType>>

Parameters

ParameterType
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCFeedObjectType>>

Source

services/suggestion/index.ts:113


getSearchSuggestion()

static getSearchSuggestion(search, params?, config?): Promise <SCPaginatedResponse<SCSuggestionType>>

Parameters

ParameterType
searchstring
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCSuggestionType>>

Source

services/suggestion/index.ts:125


getUserSuggestion()

static getUserSuggestion(params?, config?): Promise <SCPaginatedResponse<SCUserType>>

Parameters

ParameterType
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/suggestion/index.ts:117