2016-06-18 21:53:18 +02:00
|
|
|
'use strict';
|
|
|
|
const reqwest = require('reqwest');
|
2014-11-13 15:14:41 +01:00
|
|
|
|
2016-06-18 21:53:18 +02:00
|
|
|
const TYPE = 'json';
|
2014-11-13 15:14:41 +01:00
|
|
|
|
2016-06-18 21:53:18 +02:00
|
|
|
const EventStore = {
|
2016-07-02 11:54:50 +02:00
|
|
|
getEvents () {
|
2014-11-13 15:14:41 +01:00
|
|
|
return reqwest({
|
|
|
|
url: 'events',
|
|
|
|
method: 'get',
|
2016-06-18 21:55:46 +02:00
|
|
|
type: TYPE,
|
2014-11-13 15:14:41 +01:00
|
|
|
});
|
2014-11-17 11:15:10 +01:00
|
|
|
},
|
|
|
|
|
2016-08-22 15:12:05 +02:00
|
|
|
getEventsByName (eventName) {
|
2014-11-17 11:15:10 +01:00
|
|
|
return reqwest({
|
2016-08-22 15:12:05 +02:00
|
|
|
url: `events/${eventName}`,
|
2014-11-17 11:15:10 +01:00
|
|
|
method: 'get',
|
2016-06-18 21:55:46 +02:00
|
|
|
type: TYPE,
|
2014-11-17 11:15:10 +01:00
|
|
|
});
|
2016-06-18 21:55:46 +02:00
|
|
|
},
|
2014-11-17 11:15:10 +01:00
|
|
|
|
2014-11-13 15:14:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = EventStore;
|