Commit 7ca94f4e authored by nanahira's avatar nanahira

new apis

parent 8c311bae
...@@ -4,7 +4,9 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core ...@@ -4,7 +4,9 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ApiConfiguration, ApiConfigurationParams } from './api-configuration'; import { ApiConfiguration, ApiConfigurationParams } from './api-configuration';
import { ApiService } from './services/api.service'; import { BlacklistAccountService } from './services/blacklist-account.service';
import { AdService } from './services/ad.service';
import { WhitelistAccountService } from './services/whitelist-account.service';
/** /**
* Module that provides all services and configuration. * Module that provides all services and configuration.
...@@ -14,7 +16,9 @@ import { ApiService } from './services/api.service'; ...@@ -14,7 +16,9 @@ import { ApiService } from './services/api.service';
exports: [], exports: [],
declarations: [], declarations: [],
providers: [ providers: [
ApiService, BlacklistAccountService,
AdService,
WhitelistAccountService,
ApiConfiguration ApiConfiguration
], ],
}) })
......
...@@ -4,5 +4,8 @@ export { BlacklistAccountResultDtoPaginatedReturnMessageDto } from './models/bla ...@@ -4,5 +4,8 @@ export { BlacklistAccountResultDtoPaginatedReturnMessageDto } from './models/bla
export { Ad } from './models/ad'; export { Ad } from './models/ad';
export { AdReturnMessageDto } from './models/ad-return-message-dto'; export { AdReturnMessageDto } from './models/ad-return-message-dto';
export { StringReturnMessageDto } from './models/string-return-message-dto'; export { StringReturnMessageDto } from './models/string-return-message-dto';
export { WhitelistAccountRefRefsResultDto } from './models/whitelist-account-ref-refs-result-dto';
export { WhitelistAccountRefResultDto } from './models/whitelist-account-ref-result-dto';
export { WhitelistAccountRefsResultDto } from './models/whitelist-account-refs-result-dto';
export { WhitelistAccountResultDto } from './models/whitelist-account-result-dto'; export { WhitelistAccountResultDto } from './models/whitelist-account-result-dto';
export { WhitelistAccountResultDtoPaginatedReturnMessageDto } from './models/whitelist-account-result-dto-paginated-return-message-dto'; export { WhitelistAccountResultDtoPaginatedReturnMessageDto } from './models/whitelist-account-result-dto-paginated-return-message-dto';
...@@ -13,5 +13,5 @@ export interface BlacklistAccountResultDto { ...@@ -13,5 +13,5 @@ export interface BlacklistAccountResultDto {
* Blacklist ID. * Blacklist ID.
*/ */
blacklistId: string; blacklistId: string;
id?: number; id: number;
} }
/* tslint:disable */
/* eslint-disable */
export interface WhitelistAccountRefRefsResultDto {
/**
* QQ account number.
*/
account: string;
/**
* false => not available in random
*/
enabled: boolean;
/**
* Fee
*/
fee?: string;
/**
* forbidden
*/
forbidden?: string;
id: number;
/**
* name
*/
name: string;
/**
* Reference ID
*/
refId?: number;
/**
* Twitter ID
*/
twitter?: string;
/**
* type
*/
type?: string;
}
/* tslint:disable */
/* eslint-disable */
import { WhitelistAccountRefRefsResultDto } from './whitelist-account-ref-refs-result-dto';
export interface WhitelistAccountRefResultDto {
/**
* QQ account number.
*/
account: string;
/**
* false => not available in random
*/
enabled: boolean;
/**
* Fee
*/
fee?: string;
/**
* forbidden
*/
forbidden?: string;
id: number;
/**
* name
*/
name: string;
/**
* Reference ID
*/
refId?: number;
/**
* Referenced by these accounts
*/
refs?: Array<WhitelistAccountRefRefsResultDto>;
/**
* Twitter ID
*/
twitter?: string;
/**
* type
*/
type?: string;
}
/* tslint:disable */
/* eslint-disable */
export interface WhitelistAccountRefsResultDto {
/**
* QQ account number.
*/
account: string;
/**
* false => not available in random
*/
enabled: boolean;
/**
* Fee
*/
fee?: string;
/**
* forbidden
*/
forbidden?: string;
id: number;
/**
* name
*/
name: string;
/**
* Reference ID
*/
refId?: number;
/**
* Twitter ID
*/
twitter?: string;
/**
* type
*/
type?: string;
}
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
import { WhitelistAccountRefResultDto } from './whitelist-account-ref-result-dto';
import { WhitelistAccountRefsResultDto } from './whitelist-account-refs-result-dto';
export interface WhitelistAccountResultDto { export interface WhitelistAccountResultDto {
/** /**
...@@ -8,9 +10,9 @@ export interface WhitelistAccountResultDto { ...@@ -8,9 +10,9 @@ export interface WhitelistAccountResultDto {
account: string; account: string;
/** /**
* false => not active * false => not available in random
*/ */
enabled?: boolean; enabled: boolean;
/** /**
* Fee * Fee
...@@ -21,17 +23,32 @@ export interface WhitelistAccountResultDto { ...@@ -21,17 +23,32 @@ export interface WhitelistAccountResultDto {
* forbidden * forbidden
*/ */
forbidden?: string; forbidden?: string;
id?: number; id: number;
/** /**
* name * name
*/ */
name: string; name: string;
/**
* Referenced account
*/
ref?: WhitelistAccountRefResultDto;
/**
* Reference ID
*/
refId?: number;
/**
* Referenced by these accounts
*/
refs?: Array<WhitelistAccountRefsResultDto>;
/** /**
* Twitter ID * Twitter ID
*/ */
twitter: string; twitter?: string;
/** /**
* type * type
......
export { ApiService } from './services/api.service'; export { BlacklistAccountService } from './services/blacklist-account.service';
export { AdService } from './services/ad.service';
export { WhitelistAccountService } from './services/whitelist-account.service';
...@@ -10,14 +10,12 @@ import { Observable } from 'rxjs'; ...@@ -10,14 +10,12 @@ import { Observable } from 'rxjs';
import { map, filter } from 'rxjs/operators'; import { map, filter } from 'rxjs/operators';
import { AdReturnMessageDto } from '../models/ad-return-message-dto'; import { AdReturnMessageDto } from '../models/ad-return-message-dto';
import { BlacklistAccountResultDtoPaginatedReturnMessageDto } from '../models/blacklist-account-result-dto-paginated-return-message-dto';
import { StringReturnMessageDto } from '../models/string-return-message-dto'; import { StringReturnMessageDto } from '../models/string-return-message-dto';
import { WhitelistAccountResultDtoPaginatedReturnMessageDto } from '../models/whitelist-account-result-dto-paginated-return-message-dto';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
}) })
export class ApiService extends BaseService { export class AdService extends BaseService {
constructor( constructor(
config: ApiConfiguration, config: ApiConfiguration,
http: HttpClient http: HttpClient
...@@ -25,104 +23,6 @@ export class ApiService extends BaseService { ...@@ -25,104 +23,6 @@ export class ApiService extends BaseService {
super(config, http); super(config, http);
} }
/**
* Path part for operation blacklistAccountControllerFindAll
*/
static readonly BlacklistAccountControllerFindAllPath = '/api/blacklist';
/**
* Find all BlacklistAccount.
*
*
*
* This method provides access to the full `HttpResponse`, allowing access to response headers.
* To access only the response body, use `blacklistAccountControllerFindAll()` instead.
*
* This method doesn't expect any request body.
*/
blacklistAccountControllerFindAll$Response(params?: {
/**
* The nth page, starting with 1.
*/
pageCount?: number;
/**
* Records per page.
*/
recordsPerPage?: number;
id?: number;
/**
* QQ account number.
*/
account?: string;
/**
* Blacklist ID.
*/
blacklistId?: string;
}): Observable<StrictHttpResponse<BlacklistAccountResultDtoPaginatedReturnMessageDto>> {
const rb = new RequestBuilder(this.rootUrl, ApiService.BlacklistAccountControllerFindAllPath, 'get');
if (params) {
rb.query('pageCount', params.pageCount, {});
rb.query('recordsPerPage', params.recordsPerPage, {});
rb.query('id', params.id, {});
rb.query('account', params.account, {});
rb.query('blacklistId', params.blacklistId, {});
}
return this.http.request(rb.build({
responseType: 'json',
accept: 'application/json'
})).pipe(
filter((r: any) => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<BlacklistAccountResultDtoPaginatedReturnMessageDto>;
})
);
}
/**
* Find all BlacklistAccount.
*
*
*
* This method provides access to only to the response body.
* To access the full response (for headers, for example), `blacklistAccountControllerFindAll$Response()` instead.
*
* This method doesn't expect any request body.
*/
blacklistAccountControllerFindAll(params?: {
/**
* The nth page, starting with 1.
*/
pageCount?: number;
/**
* Records per page.
*/
recordsPerPage?: number;
id?: number;
/**
* QQ account number.
*/
account?: string;
/**
* Blacklist ID.
*/
blacklistId?: string;
}): Observable<BlacklistAccountResultDtoPaginatedReturnMessageDto> {
return this.blacklistAccountControllerFindAll$Response(params).pipe(
map((r: StrictHttpResponse<BlacklistAccountResultDtoPaginatedReturnMessageDto>) => r.body as BlacklistAccountResultDtoPaginatedReturnMessageDto)
);
}
/** /**
* Path part for operation adControllerGetAd * Path part for operation adControllerGetAd
*/ */
...@@ -142,7 +42,7 @@ export class ApiService extends BaseService { ...@@ -142,7 +42,7 @@ export class ApiService extends BaseService {
id?: number; id?: number;
}): Observable<StrictHttpResponse<AdReturnMessageDto>> { }): Observable<StrictHttpResponse<AdReturnMessageDto>> {
const rb = new RequestBuilder(this.rootUrl, ApiService.AdControllerGetAdPath, 'get'); const rb = new RequestBuilder(this.rootUrl, AdService.AdControllerGetAdPath, 'get');
if (params) { if (params) {
rb.query('id', params.id, {}); rb.query('id', params.id, {});
} }
...@@ -196,7 +96,7 @@ export class ApiService extends BaseService { ...@@ -196,7 +96,7 @@ export class ApiService extends BaseService {
id: number; id: number;
}): Observable<StrictHttpResponse<StringReturnMessageDto>> { }): Observable<StrictHttpResponse<StringReturnMessageDto>> {
const rb = new RequestBuilder(this.rootUrl, ApiService.AdControllerClickAdPath, 'get'); const rb = new RequestBuilder(this.rootUrl, AdService.AdControllerClickAdPath, 'get');
if (params) { if (params) {
rb.path('id', params.id, {}); rb.path('id', params.id, {});
} }
...@@ -231,94 +131,4 @@ export class ApiService extends BaseService { ...@@ -231,94 +131,4 @@ export class ApiService extends BaseService {
); );
} }
/**
* Path part for operation whitelistAccountControllerFindAll
*/
static readonly WhitelistAccountControllerFindAllPath = '/api/whitelist-account';
/**
* Find all WhitelistAccount.
*
*
*
* This method provides access to the full `HttpResponse`, allowing access to response headers.
* To access only the response body, use `whitelistAccountControllerFindAll()` instead.
*
* This method doesn't expect any request body.
*/
whitelistAccountControllerFindAll$Response(params?: {
/**
* The nth page, starting with 1.
*/
pageCount?: number;
/**
* Records per page.
*/
recordsPerPage?: number;
id?: number;
/**
* QQ account number.
*/
account?: string;
random?: number;
}): Observable<StrictHttpResponse<WhitelistAccountResultDtoPaginatedReturnMessageDto>> {
const rb = new RequestBuilder(this.rootUrl, ApiService.WhitelistAccountControllerFindAllPath, 'get');
if (params) {
rb.query('pageCount', params.pageCount, {});
rb.query('recordsPerPage', params.recordsPerPage, {});
rb.query('id', params.id, {});
rb.query('account', params.account, {});
rb.query('random', params.random, {});
}
return this.http.request(rb.build({
responseType: 'json',
accept: 'application/json'
})).pipe(
filter((r: any) => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<WhitelistAccountResultDtoPaginatedReturnMessageDto>;
})
);
}
/**
* Find all WhitelistAccount.
*
*
*
* This method provides access to only to the response body.
* To access the full response (for headers, for example), `whitelistAccountControllerFindAll$Response()` instead.
*
* This method doesn't expect any request body.
*/
whitelistAccountControllerFindAll(params?: {
/**
* The nth page, starting with 1.
*/
pageCount?: number;
/**
* Records per page.
*/
recordsPerPage?: number;
id?: number;
/**
* QQ account number.
*/
account?: string;
random?: number;
}): Observable<WhitelistAccountResultDtoPaginatedReturnMessageDto> {
return this.whitelistAccountControllerFindAll$Response(params).pipe(
map((r: StrictHttpResponse<WhitelistAccountResultDtoPaginatedReturnMessageDto>) => r.body as WhitelistAccountResultDtoPaginatedReturnMessageDto)
);
}
} }
/* tslint:disable */
/* eslint-disable */
import { Injectable } from '@angular/core';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { BaseService } from '../base-service';
import { ApiConfiguration } from '../api-configuration';
import { StrictHttpResponse } from '../strict-http-response';
import { RequestBuilder } from '../request-builder';
import { Observable } from 'rxjs';
import { map, filter } from 'rxjs/operators';
import { BlacklistAccountResultDtoPaginatedReturnMessageDto } from '../models/blacklist-account-result-dto-paginated-return-message-dto';
@Injectable({
providedIn: 'root',
})
export class BlacklistAccountService extends BaseService {
constructor(
config: ApiConfiguration,
http: HttpClient
) {
super(config, http);
}
/**
* Path part for operation blacklistAccountControllerFindAll
*/
static readonly BlacklistAccountControllerFindAllPath = '/api/blacklist';
/**
* Find all BlacklistAccount.
*
*
*
* This method provides access to the full `HttpResponse`, allowing access to response headers.
* To access only the response body, use `blacklistAccountControllerFindAll()` instead.
*
* This method doesn't expect any request body.
*/
blacklistAccountControllerFindAll$Response(params?: {
/**
* The nth page, starting with 1.
*/
pageCount?: number;
/**
* Records per page.
*/
recordsPerPage?: number;
id?: number;
/**
* QQ account number.
*/
account?: string;
/**
* Blacklist ID.
*/
blacklistId?: string;
}): Observable<StrictHttpResponse<BlacklistAccountResultDtoPaginatedReturnMessageDto>> {
const rb = new RequestBuilder(this.rootUrl, BlacklistAccountService.BlacklistAccountControllerFindAllPath, 'get');
if (params) {
rb.query('pageCount', params.pageCount, {});
rb.query('recordsPerPage', params.recordsPerPage, {});
rb.query('id', params.id, {});
rb.query('account', params.account, {});
rb.query('blacklistId', params.blacklistId, {});
}
return this.http.request(rb.build({
responseType: 'json',
accept: 'application/json'
})).pipe(
filter((r: any) => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<BlacklistAccountResultDtoPaginatedReturnMessageDto>;
})
);
}
/**
* Find all BlacklistAccount.
*
*
*
* This method provides access to only to the response body.
* To access the full response (for headers, for example), `blacklistAccountControllerFindAll$Response()` instead.
*
* This method doesn't expect any request body.
*/
blacklistAccountControllerFindAll(params?: {
/**
* The nth page, starting with 1.
*/
pageCount?: number;
/**
* Records per page.
*/
recordsPerPage?: number;
id?: number;
/**
* QQ account number.
*/
account?: string;
/**
* Blacklist ID.
*/
blacklistId?: string;
}): Observable<BlacklistAccountResultDtoPaginatedReturnMessageDto> {
return this.blacklistAccountControllerFindAll$Response(params).pipe(
map((r: StrictHttpResponse<BlacklistAccountResultDtoPaginatedReturnMessageDto>) => r.body as BlacklistAccountResultDtoPaginatedReturnMessageDto)
);
}
}
/* tslint:disable */
/* eslint-disable */
import { Injectable } from '@angular/core';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { BaseService } from '../base-service';
import { ApiConfiguration } from '../api-configuration';
import { StrictHttpResponse } from '../strict-http-response';
import { RequestBuilder } from '../request-builder';
import { Observable } from 'rxjs';
import { map, filter } from 'rxjs/operators';
import { WhitelistAccountResultDtoPaginatedReturnMessageDto } from '../models/whitelist-account-result-dto-paginated-return-message-dto';
@Injectable({
providedIn: 'root',
})
export class WhitelistAccountService extends BaseService {
constructor(
config: ApiConfiguration,
http: HttpClient
) {
super(config, http);
}
/**
* Path part for operation whitelistAccountControllerFindAll
*/
static readonly WhitelistAccountControllerFindAllPath = '/api/whitelist-account';
/**
* Find all WhitelistAccount.
*
*
*
* This method provides access to the full `HttpResponse`, allowing access to response headers.
* To access only the response body, use `whitelistAccountControllerFindAll()` instead.
*
* This method doesn't expect any request body.
*/
whitelistAccountControllerFindAll$Response(params?: {
/**
* The nth page, starting with 1.
*/
pageCount?: number;
/**
* Records per page.
*/
recordsPerPage?: number;
id?: number;
/**
* QQ account number.
*/
account?: string;
random?: number;
}): Observable<StrictHttpResponse<WhitelistAccountResultDtoPaginatedReturnMessageDto>> {
const rb = new RequestBuilder(this.rootUrl, WhitelistAccountService.WhitelistAccountControllerFindAllPath, 'get');
if (params) {
rb.query('pageCount', params.pageCount, {});
rb.query('recordsPerPage', params.recordsPerPage, {});
rb.query('id', params.id, {});
rb.query('account', params.account, {});
rb.query('random', params.random, {});
}
return this.http.request(rb.build({
responseType: 'json',
accept: 'application/json'
})).pipe(
filter((r: any) => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<WhitelistAccountResultDtoPaginatedReturnMessageDto>;
})
);
}
/**
* Find all WhitelistAccount.
*
*
*
* This method provides access to only to the response body.
* To access the full response (for headers, for example), `whitelistAccountControllerFindAll$Response()` instead.
*
* This method doesn't expect any request body.
*/
whitelistAccountControllerFindAll(params?: {
/**
* The nth page, starting with 1.
*/
pageCount?: number;
/**
* Records per page.
*/
recordsPerPage?: number;
id?: number;
/**
* QQ account number.
*/
account?: string;
random?: number;
}): Observable<WhitelistAccountResultDtoPaginatedReturnMessageDto> {
return this.whitelistAccountControllerFindAll$Response(params).pipe(
map((r: StrictHttpResponse<WhitelistAccountResultDtoPaginatedReturnMessageDto>) => r.body as WhitelistAccountResultDtoPaginatedReturnMessageDto)
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment