+ Articles

This commit is contained in:
tmshv committed 2016-03-18 01:55:33 +03:00
1 parent ac99501dad
commit 636de8e37a
10 files changed
+104 -35

No files matched your search

+3 -1
View File
@@ -4,6 +4,7 @@ import APIDocument from './APIDocument';
import APITeacher from './APITeacher';
import APISchedule from './APISchedule';
import APIEvent from './APIEvent';
import APIArticle from './APIArticle';
export default class API {
constructor(request) {
@@ -13,5 +14,6 @@ export default class API {
this.teacher = new APITeacher(request);
this.schedule = new APISchedule(request);
this.event = new APIEvent(request);
this.article = new APIArticle(request);
}
}
}
+8
View File
@@ -0,0 +1,8 @@
import EndPoint from './EndPoint';
export default class APIArticle extends EndPoint {
id(id) {
let url = `/article/${id}`;
return this.get(url);
}
}
-5
View File
@@ -8,9 +8,4 @@ export default class APIEvent extends EndPoint {
let url = `/events?skip=${skip}&limit=${limit}`;
return this.get(url);
}
post(id) {
let url = `/event/${id}`;
return this.get(url);
}
}