Make `fetchAPI` method private

This commit is contained in:
Ealhad 2018-11-12 15:55:09 +00:00
parent 0d7312d0c2
commit 82c068f8f3
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ import * as _ from 'lodash/fp';
import constants from './constants'; import constants from './constants';
export default class InvidiousAPI { export default class InvidiousAPI {
static async _fetchAPI(action: string, params: any) { private static async fetchAPI(action: string, params: any) {
const paramString = typeof params == 'string' const paramString = typeof params == 'string'
? params ? params
: Object.keys(params).map(function(key) { : Object.keys(params).map(function(key) {
@ -18,10 +18,10 @@ export default class InvidiousAPI {
} }
static async getVideo(id: string) { static async getVideo(id: string) {
return this._fetchAPI(constants.invidiousAPI.videos, id); return this.fetchAPI(constants.invidiousAPI.videos, id);
} }
static async getChannel(ucid: string) { static async getChannel(ucid: string) {
return this._fetchAPI(constants.invidiousAPI.channels, ucid); return this.fetchAPI(constants.invidiousAPI.channels, ucid);
} }
} }