-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathhomestead.js
48 lines (42 loc) · 1.08 KB
/
homestead.js
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const AbstractEndpoint = require('../endpoint')
module.exports = class HomesteadEndpoint extends AbstractEndpoint {
decorations () {
return new DecorationsEndpoint(this)
}
glyphs () {
return new GlyphsEndpoint(this)
}
}
class DecorationsEndpoint extends AbstractEndpoint {
constructor (client) {
super(client)
this.url = '/v2/homestead/decorations'
this.isPaginated = true
this.isLocalized = true
this.isBulk = true
this.supportsBulkAll = false
this.cacheTime = 24 * 60 * 60
}
categories () {
return new DecorationsCategoriesEndpoint(this)
}
}
class GlyphsEndpoint extends AbstractEndpoint {
constructor (client) {
super(client)
this.url = '/v2/homestead/glyphs'
this.isPaginated = true
this.isBulk = true
this.cacheTime = 24 * 60 * 60
}
}
class DecorationsCategoriesEndpoint extends AbstractEndpoint {
constructor (client) {
super(client)
this.url = '/v2/homestead/decorations/categories'
this.isPaginated = true
this.isBulk = true
this.isLocalized = true
this.cacheTime = 24 * 60 * 60
}
}