2018-02-23 09:01:25 +01:00
|
|
|
import Request from 'utils/request';
|
2018-02-22 19:48:46 +01:00
|
|
|
const { site: { host } } = require('../../config/speechConfig.js');
|
2018-02-07 22:26:07 +01:00
|
|
|
|
2018-02-08 07:22:17 +01:00
|
|
|
export function getChannelData (name, id) {
|
2018-02-08 20:50:30 +01:00
|
|
|
console.log('getting channel data for channel:', name, id);
|
2018-02-08 07:22:17 +01:00
|
|
|
if (!id) id = 'none';
|
2018-02-22 19:48:46 +01:00
|
|
|
const url = `${host}/api/channel/data/${name}/${id}`;
|
2018-02-23 09:01:25 +01:00
|
|
|
return Request(url);
|
2018-02-08 03:01:51 +01:00
|
|
|
};
|
|
|
|
|
2018-02-08 19:59:49 +01:00
|
|
|
export function getChannelClaims (name, longId, page) {
|
2018-02-08 20:50:30 +01:00
|
|
|
console.log('getting channel claims for channel:', name, longId);
|
2018-02-08 19:59:49 +01:00
|
|
|
if (!page) page = 1;
|
2018-02-23 20:00:46 +01:00
|
|
|
const url = `${host}/api/channel/claims/${name}/${longId}/${page}`;
|
2018-02-08 03:01:51 +01:00
|
|
|
return Request(url);
|
|
|
|
};
|