-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.ts
45 lines (33 loc) · 1.14 KB
/
index.ts
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
import prompts from 'prompts'
import Api from 'wikifolio'
(async () => {
console.warn('Your credentials will not be stored.')
const arg = (process.argv || []).slice(2)
const {email} = await prompts({
type: 'text',
name: 'email',
initial: arg[0],
message: 'Wikifolio email'
})
const {password} = await prompts({
type: 'password',
name: 'password',
initial: arg[1],
message: 'Wikifolio password'
})
const api = new Api({email, password})
const wikifolio = api.wikifolio('wfobserver')
console.log( await wikifolio.details() )
// const wikifolio = api.wikifolio('wfobserver')
// console.log( await wikifolio.price() )
// const wikifolio = api.wikifolio('wf01smylel')
// console.log( await wikifolio.trades({pageSize: 100, page: 1}) )
// const wikifolio = api.wikifolio('wfobserver')
// console.log( await wikifolio.portfolio() )
// const wikifolios = await api.search({query: 'Supervisor'})
// console.log( wikifolios )
// const user = api.user('riennevaplus')
// console.log( await user.details() )
// const user = api.user('riennevaplus')
// console.log( await user.wikifolios() )
})()