-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathv1.js
More file actions
32 lines (26 loc) · 803 Bytes
/
v1.js
File metadata and controls
32 lines (26 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import all from '../utils/all';
import find from '../utils/find';
export const api = 'discovery/v1';
export const Attraction = (apikey) => ({
all: all(api, apikey, 'attractions'),
find: find(api, apikey, 'attractions')
});
export const Category = (apikey) => ({
all: all(api, apikey, 'categories'),
find: find(api, apikey, 'categories')
});
export const Event = (apikey) => ({
all: all(api, apikey, 'events'),
find: find(api, apikey, 'events'),
findImages: find(api, apikey, 'events', 'images')
});
export const Venue = (apikey) => ({
all: all(api, apikey, 'venues'),
find: find(api, apikey, 'venues')
});
export default (apikey) => ({
attraction: Attraction(apikey),
category: Category(apikey),
event: Event(apikey),
venue: Venue(apikey)
});