+ EndPoint, APIDocument
This commit is contained in:
1 parent
5640acdd81
commit
ce2d0ec1b9
3 files changed
+15
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
import EndPoint from './EndPoint';
|
||||||
|
|
||||||
|
export default class APIDocument extends EndPoint {
|
||||||
|
awards() {
|
||||||
|
let url = '/documents/awards';
|
||||||
|
return this.request.get(url, {cache: true});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export default class EndPoint{
|
||||||
|
constructor(http){
|
||||||
|
this.request = http;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
var APINews = require("./news");
|
var APINews = require("./news");
|
||||||
var APIGallery = require("./gallery");
|
var APIGallery = require("./gallery");
|
||||||
|
import APIDocument from './APIDocument';
|
||||||
|
|
||||||
module.exports = function (app) {
|
module.exports = function (app) {
|
||||||
var minute = 1000 * 60;
|
var minute = 1000 * 60;
|
||||||
@@ -12,6 +13,7 @@ module.exports = function(app) {
|
|||||||
var api = {};
|
var api = {};
|
||||||
api.news = new APINews($http);
|
api.news = new APINews($http);
|
||||||
api.gallery = new APIGallery($http, minute);
|
api.gallery = new APIGallery($http, minute);
|
||||||
|
api.document = new APIDocument($http);
|
||||||
|
|
||||||
return api;
|
return api;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user