spee.ch/react/api/channelApi.js

17 lines
520 B
JavaScript
Raw Normal View History

2018-02-07 13:26:07 -08:00
import Request from 'utils/request';
2018-02-07 22:22:17 -08:00
import request from '../utils/request';
2018-02-07 13:26:07 -08:00
2018-02-07 22:22:17 -08:00
export function getChannelData (name, id) {
2018-02-08 11:50:30 -08:00
console.log('getting channel data for channel:', name, id);
2018-02-07 22:22:17 -08:00
if (!id) id = 'none';
const url = `/api/channel/data/${name}/${id}`;
return request(url);
};
export function getChannelClaims (name, longId, page) {
2018-02-08 11:50:30 -08:00
console.log('getting channel claims for channel:', name, longId);
if (!page) page = 1;
const url = `/api/channel/claims/${name}/${longId}/${page}`;
return Request(url);
};