style(VNDB): Privatise query methods
This commit is contained in:
parent
37c1ac5db7
commit
3b2104387f
1 changed files with 3 additions and 3 deletions
|
|
@ -106,7 +106,7 @@ export class VNDBAPI extends APIModel {
|
||||||
* @throws Error The request returned an unsuccessful or unexpected HTTP status code.
|
* @throws Error The request returned an unsuccessful or unexpected HTTP status code.
|
||||||
* @see {@link https://api.vndb.org/kana#api-structure}
|
* @see {@link https://api.vndb.org/kana#api-structure}
|
||||||
*/
|
*/
|
||||||
async postQuery(endpoint: string, body: string): Promise<unknown> {
|
private async postQuery(endpoint: string, body: string): Promise<unknown> {
|
||||||
const fetchData = await requestUrl({
|
const fetchData = await requestUrl({
|
||||||
url: `${this.apiUrl}${endpoint}`,
|
url: `${this.apiUrl}${endpoint}`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
@ -140,7 +140,7 @@ export class VNDBAPI extends APIModel {
|
||||||
* Queries visual novel entries.
|
* Queries visual novel entries.
|
||||||
* @see {@link https://api.vndb.org/kana#post-vn}
|
* @see {@link https://api.vndb.org/kana#post-vn}
|
||||||
*/
|
*/
|
||||||
postVNQuery(body: string): Promise<VNJSONResponse> {
|
private postVNQuery(body: string): Promise<VNJSONResponse> {
|
||||||
return this.postQuery('/vn', body) as Promise<VNJSONResponse>;
|
return this.postQuery('/vn', body) as Promise<VNJSONResponse>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -149,7 +149,7 @@ export class VNDBAPI extends APIModel {
|
||||||
* Queries release entries.
|
* Queries release entries.
|
||||||
* @see {@link https://api.vndb.org/kana#post-release}
|
* @see {@link https://api.vndb.org/kana#post-release}
|
||||||
*/
|
*/
|
||||||
postReleaseQuery(body: string): Promise<ReleaseJSONResponse> {
|
private postReleaseQuery(body: string): Promise<ReleaseJSONResponse> {
|
||||||
return this.postQuery('/release', body) as Promise<ReleaseJSONResponse>;
|
return this.postQuery('/release', body) as Promise<ReleaseJSONResponse>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue