Class: ApiService ​
Defined in: index.ts:28
Extends ​
Constructors ​
Constructor ​
ts
new ApiService(): ApiService;Defined in: index.ts:53
Returns ​
ApiService
Overrides ​
Properties ​
| Property | Modifier | Type | Defined in |
|---|---|---|---|
activity | public | ActivityEndpoint | index.ts:49 |
admin | public | AdminEndpoint | index.ts:38 |
auth | public | AuthEndpoint | index.ts:30 |
badges | public | BadgeEndpoint | index.ts:47 |
bots | public | BotEndpoint | index.ts:50 |
calendar | public | CalendarEndpoint | index.ts:51 |
channel | public | ChannelEndpoint | index.ts:32 |
emoji | public | EmojiEndpoint | index.ts:37 |
friends | public | FriendsEndpoint | index.ts:35 |
gifs | public | GifEndpoint | index.ts:45 |
instance | public | InstanceEndpoint | index.ts:29 |
live | public | LiveEndpoint | index.ts:40 |
media | public | MediaEndpoint | index.ts:36 |
message | public | MessageEndpoint | index.ts:33 |
moderation | public | ModerationEndpoint | index.ts:43 |
notifications | public | NotificationEndpoint | index.ts:44 |
peer | public | PeerEndpoint | index.ts:42 |
read | public | ReadEndpoint | index.ts:41 |
role | public | RoleEndpoint | index.ts:39 |
search | public | SearchEndpoint | index.ts:46 |
server | public | ServerEndpoint | index.ts:31 |
soundboard | public | SoundboardEndpoint | index.ts:48 |
user | public | UserEndpoint | index.ts:34 |
Methods ​
clearToken() ​
ts
clearToken(): void;Defined in: client.ts:56
clear authentication token
Returns ​
void
Inherited from ​
delete() ​
ts
delete<T>(url, config?): Promise<T>;Defined in: client.ts:109
generic delete request
Type Parameters ​
| Type Parameter | Default type |
|---|---|
T | any |
Parameters ​
| Parameter | Type |
|---|---|
url | string |
config? | AxiosRequestConfig<any, any> |
Returns ​
Promise<T>
Inherited from ​
get() ​
ts
get<T>(url, config?): Promise<T>;Defined in: client.ts:77
generic get request
Type Parameters ​
| Type Parameter | Default type |
|---|---|
T | any |
Parameters ​
| Parameter | Type |
|---|---|
url | string |
config? | AxiosRequestConfig<any, any> |
Returns ​
Promise<T>
Inherited from ​
getBaseURL() ​
ts
getBaseURL(): string;Defined in: client.ts:70
get current base url
Returns ​
string
Inherited from ​
patch() ​
ts
patch<T>(
url,
data?,
config?
): Promise<T>;Defined in: client.ts:101
generic patch request
Type Parameters ​
| Type Parameter | Default type |
|---|---|
T | any |
Parameters ​
| Parameter | Type |
|---|---|
url | string |
data? | any |
config? | AxiosRequestConfig<any, any> |
Returns ​
Promise<T>
Inherited from ​
post() ​
ts
post<T>(
url,
data?,
config?
): Promise<T>;Defined in: client.ts:85
generic post request
Type Parameters ​
| Type Parameter | Default type |
|---|---|
T | any |
Parameters ​
| Parameter | Type |
|---|---|
url | string |
data? | any |
config? | AxiosRequestConfig<any, any> |
Returns ​
Promise<T>
Inherited from ​
put() ​
ts
put<T>(
url,
data?,
config?
): Promise<T>;Defined in: client.ts:93
generic put request
Type Parameters ​
| Type Parameter | Default type |
|---|---|
T | any |
Parameters ​
| Parameter | Type |
|---|---|
url | string |
data? | any |
config? | AxiosRequestConfig<any, any> |
Returns ​
Promise<T>
Inherited from ​
setBaseURL() ​
ts
setBaseURL(baseURL): void;Defined in: client.ts:63
set base url for api requests (for dynamic server configuration)
Parameters ​
| Parameter | Type |
|---|---|
baseURL | string |
Returns ​
void
Inherited from ​
setClientKind() ​
ts
setClientKind(kind): void;Defined in: client.ts:48
say which of Refract's apps is making the requests. Only the mobile app says anything: the instance takes a request that doesn't for the desktop kind, which a browser is too.
Parameters ​
| Parameter | Type |
|---|---|
kind | IClientKind |
Returns ​
void
Inherited from ​
setToken() ​
ts
setToken(token): void;Defined in: client.ts:39
set authentication token for subsequent requests
Parameters ​
| Parameter | Type |
|---|---|
token | string | null |
Returns ​
void