/
example_test.go
69 lines (52 loc) · 1.28 KB
/
example_test.go
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package ynab_test
import (
"fmt"
"reflect"
"go.bmvs.io/ynab"
)
func ExampleNewClient() {
c := ynab.NewClient("<valid_ynab_access_token>")
c.User().GetUser()
}
func ExampleClient_User() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.User()
fmt.Println(reflect.TypeOf(s))
// Output: *user.Service
}
func ExampleClient_Account() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Account()
fmt.Println(reflect.TypeOf(s))
// Output: *account.Service
}
func ExampleClient_Budget() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Budget()
fmt.Println(reflect.TypeOf(s))
// Output: *budget.Service
}
func ExampleClient_Category() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Category()
fmt.Println(reflect.TypeOf(s))
// Output: *category.Service
}
func ExampleClient_Month() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Month()
fmt.Println(reflect.TypeOf(s))
// Output: *month.Service
}
func ExampleClient_Payee() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Payee()
fmt.Println(reflect.TypeOf(s))
// Output: *payee.Service
}
func ExampleClient_Transaction() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Transaction()
fmt.Println(reflect.TypeOf(s))
// Output: *transaction.Service
}