-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathexample_test.go
73 lines (55 loc) · 1.55 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
70
71
72
73
// Copyright (c) 2018, Bruno M V Souza <[email protected]>. All rights reserved.
// Use of this source code is governed by a BSD-2-Clause license that can be
// found in the LICENSE file.
package ynab_test
import (
"fmt"
"reflect"
"github.com/brunomvsouza/ynab.go"
)
func ExampleNewClient() {
c := ynab.NewClient("<valid_ynab_access_token>")
c.User().GetUser() //nolint:errcheck
}
func ExampleClientServicer_User() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.User()
fmt.Println(reflect.TypeOf(s))
// Output: *user.Service
}
func ExampleClientServicer_Account() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Account()
fmt.Println(reflect.TypeOf(s))
// Output: *account.Service
}
func ExampleClientServicer_Budget() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Budget()
fmt.Println(reflect.TypeOf(s))
// Output: *budget.Service
}
func ExampleClientServicer_Category() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Category()
fmt.Println(reflect.TypeOf(s))
// Output: *category.Service
}
func ExampleClientServicer_Month() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Month()
fmt.Println(reflect.TypeOf(s))
// Output: *month.Service
}
func ExampleClientServicer_Payee() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Payee()
fmt.Println(reflect.TypeOf(s))
// Output: *payee.Service
}
func ExampleClientServicer_Transaction() {
c := ynab.NewClient("<valid_ynab_access_token>")
s := c.Transaction()
fmt.Println(reflect.TypeOf(s))
// Output: *transaction.Service
}