Make `fetchAPI` method private
This commit is contained in:
parent
0d7312d0c2
commit
82c068f8f3
|
@ -2,7 +2,7 @@ import * as _ from 'lodash/fp';
|
|||
import constants from './constants';
|
||||
|
||||
export default class InvidiousAPI {
|
||||
static async _fetchAPI(action: string, params: any) {
|
||||
private static async fetchAPI(action: string, params: any) {
|
||||
const paramString = typeof params == 'string'
|
||||
? params
|
||||
: Object.keys(params).map(function(key) {
|
||||
|
@ -18,10 +18,10 @@ export default class InvidiousAPI {
|
|||
}
|
||||
|
||||
static async getVideo(id: string) {
|
||||
return this._fetchAPI(constants.invidiousAPI.videos, id);
|
||||
return this.fetchAPI(constants.invidiousAPI.videos, id);
|
||||
}
|
||||
|
||||
static async getChannel(ucid: string) {
|
||||
return this._fetchAPI(constants.invidiousAPI.channels, ucid);
|
||||
return this.fetchAPI(constants.invidiousAPI.channels, ucid);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue