add rank support
This commit is contained in:
1 parent
a3f49d4b0b
commit
18b59b7a50
5 files changed
+23
-11
No files matched your search
@@ -3,8 +3,9 @@ import { httpClient } from '../instance';
|
||||
import { IApi, IApiDetailResponse, IApiListResponse } from '../api/models';
|
||||
|
||||
export interface IApiQuery {
|
||||
limit: number;
|
||||
offset: number;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
ordering?: string;
|
||||
}
|
||||
|
||||
class ApiOperator {
|
||||
@@ -32,8 +33,10 @@ class ApiOperator {
|
||||
return await httpClient.delete(`/${this.key}/${id}`);
|
||||
}
|
||||
|
||||
async getAllForService(serviceId: string): Promise<AxiosResponse<IApiListResponse>> {
|
||||
return await httpClient.get(`/services/${serviceId}/${this.key}/`);
|
||||
async getAllForService(serviceId: string, query?: IApiQuery): Promise<AxiosResponse<IApiListResponse>> {
|
||||
return await httpClient.get(`/services/${serviceId}/${this.key}/`, {
|
||||
params: query
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ export interface IApplicationQuery {
|
||||
limit?: number;
|
||||
type?: IApplicationType;
|
||||
api_id?: string;
|
||||
ordering?: string;
|
||||
}
|
||||
|
||||
class ApplicationOperator {
|
||||
|
||||
@@ -3,8 +3,9 @@ import { httpClient } from '../instance';
|
||||
import { IProxy, IProxyDetailResponse, IProxyListResponse } from '../proxy/models';
|
||||
|
||||
export interface IProxyQuery {
|
||||
limit: number;
|
||||
offset: number;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
ordering?: string;
|
||||
}
|
||||
|
||||
class ProxyOperator {
|
||||
@@ -32,8 +33,10 @@ class ProxyOperator {
|
||||
return await httpClient.delete(`/${this.key}/${id}`);
|
||||
}
|
||||
|
||||
async getAllForService(serviceId: string): Promise<AxiosResponse<IProxyListResponse>> {
|
||||
return await httpClient.get(`/services/${serviceId}/${this.key}/`);
|
||||
async getAllForService(serviceId: string, query: IProxyQuery): Promise<AxiosResponse<IProxyListResponse>> {
|
||||
return await httpClient.get(`/services/${serviceId}/${this.key}/`, {
|
||||
params: query
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user