From 56045a1b0387a00f0aabe96ea88fdfd2e0e399f0 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Wed, 24 Feb 2016 18:52:43 +0300 Subject: [PATCH] + APICollective --- src/client/api/APICollective.js | 8 ++++++++ src/client/api/api.js | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 src/client/api/APICollective.js diff --git a/src/client/api/APICollective.js b/src/client/api/APICollective.js new file mode 100644 index 00000000..53d52132 --- /dev/null +++ b/src/client/api/APICollective.js @@ -0,0 +1,8 @@ +import EndPoint from './EndPoint'; + +export default class APICollective extends EndPoint { + collective() { + let url = '/collective'; + return this.request.get(url, {cache: true}); + } +} \ No newline at end of file diff --git a/src/client/api/api.js b/src/client/api/api.js index 605322c8..39b19d60 100644 --- a/src/client/api/api.js +++ b/src/client/api/api.js @@ -1,6 +1,7 @@ import APIFeed from './APIFeed'; import APIGallery from './APIGallery'; import APIDocument from './APIDocument'; +import APICollective from './APICollective'; export default function (app) { app.factory('api', function ($http) { @@ -8,6 +9,7 @@ export default function (app) { api.news = new APIFeed($http); api.gallery = new APIGallery($http); api.document = new APIDocument($http); + api.collective = new APICollective($http); return api; });