1
0
mirror of https://gitlab.com/Cha_deL/peertubeify synced 2024-12-21 20:34:23 +01:00

Make fetchAPI method private

This commit is contained in:
Ealhad 2018-11-12 15:55:09 +00:00
parent 0d7312d0c2
commit 82c068f8f3

View File

@ -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);
}
}