-
Notifications
You must be signed in to change notification settings - Fork 34
/
example.js
43 lines (37 loc) · 820 Bytes
/
example.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
import {
Kayn,
REGIONS,
METHOD_NAMES,
BasicJSCache,
LRUCache,
RedisCache,
} from './'
/*
const redisCache = new RedisCache({
host: 'localhost',
port: 5000,
keyPrefix: 'kayn',
});
*/
const myCache = new LRUCache({ max: 5 })
const kayn = Kayn()({
region: 'na',
debugOptions: {
isEnabled: true,
showKey: false,
},
requestOptions: {
shouldRetry: true,
numberOfRetriesBeforeAbort: 3,
delayBeforeRetry: 1000,
},
cacheOptions: {
cache: new BasicJSCache(),
},
})
import run from './examples/async.await/v4/get-last-10-ranked-matches-efficiently'
const main = async () => {
console.log(await kayn.Summoner.by.name('Contractz'))
await kayn.League.Entries.list('RANKED_SOLO_5x5', 'DIAMOND', 'I')
}
main()