mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			448 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			448 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
'use strict';
 | 
						|
 | 
						|
const reqwest = require('reqwest');
 | 
						|
 | 
						|
const TYPE         = 'json';
 | 
						|
 | 
						|
const EventStore = {
 | 
						|
    getEvents () {
 | 
						|
        return reqwest({
 | 
						|
            url: 'events',
 | 
						|
            method: 'get',
 | 
						|
            type: TYPE,
 | 
						|
        });
 | 
						|
    },
 | 
						|
 | 
						|
    getEventsByName (eventName) {
 | 
						|
        return reqwest({
 | 
						|
            url: `events/${eventName}`,
 | 
						|
            method: 'get',
 | 
						|
            type: TYPE,
 | 
						|
        });
 | 
						|
    },
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
module.exports = EventStore;
 |