|
4 | 4 | // such as the controller url and user token. The client is then passed to api methods, |
5 | 5 | // which use it to make requests. |
6 | 6 | // |
7 | | -// Basic Example |
| 7 | +// # Basic Example |
8 | 8 | // |
9 | 9 | // This example creates a client and then lists the apps that the user has access to: |
10 | 10 | // |
11 | | -// import ( |
12 | | -// drycc "github.com/drycc/controller-sdk-go" |
13 | | -// "github.com/drycc/controller-sdk-go/apps" |
14 | | -// ) |
| 11 | +// import ( |
| 12 | +// drycc "github.com/drycc/controller-sdk-go" |
| 13 | +// "github.com/drycc/controller-sdk-go/apps" |
| 14 | +// ) |
15 | 15 | // |
16 | | -// // Verify SSL, Controller URL, API Token |
17 | | -// client, err := drycc.New(true, "drycc.test.io", "abc123") |
18 | | -// if err != nil { |
19 | | -// log.Fatal(err) |
20 | | -// } |
21 | | -// apps, _, err := apps.List(client, 100) |
22 | | -// if err != nil { |
23 | | -// log.Fatal(err) |
24 | | -// } |
| 16 | +// // Verify SSL, Controller URL, API Token |
| 17 | +// client, err := drycc.New(true, "drycc.test.io", "abc123") |
| 18 | +// if err != nil { |
| 19 | +// log.Fatal(err) |
| 20 | +// } |
| 21 | +// apps, _, err := apps.List(client, 100) |
| 22 | +// if err != nil { |
| 23 | +// log.Fatal(err) |
| 24 | +// } |
25 | 25 | // |
26 | | -// Authentication |
| 26 | +// # Authentication |
27 | 27 | // |
28 | 28 | // If you don't already have a token for a user, you can retrieve one with a |
29 | 29 | // username and password. |
30 | 30 | // |
31 | | -// import ( |
32 | | -// drycc "github.com/drycc/controller-sdk-go" |
33 | | -// "github.com/drycc/controller-sdk-go/apps" |
34 | | -// ) |
| 31 | +// import ( |
| 32 | +// drycc "github.com/drycc/controller-sdk-go" |
| 33 | +// "github.com/drycc/controller-sdk-go/apps" |
| 34 | +// ) |
35 | 35 | // |
36 | | -// // Create a client with a blank token to pass to login. |
37 | | -// client, err := drycc.New(true, "drycc.test.io", "") |
38 | | -// if err != nil { |
39 | | -// log.Fatal(err) |
40 | | -// } |
41 | | -// token, err := auth.Login(client, "user", "password") |
42 | | -// if err != nil { |
43 | | -// log.Fatal(err) |
44 | | -// } |
45 | | -// // Set the client to use the retrieved token |
46 | | -// client.Token = token |
| 36 | +// // Create a client with a blank token to pass to login. |
| 37 | +// client, err := drycc.New(true, "drycc.test.io", "") |
| 38 | +// if err != nil { |
| 39 | +// log.Fatal(err) |
| 40 | +// } |
| 41 | +// token, err := auth.Login(client, "user", "password") |
| 42 | +// if err != nil { |
| 43 | +// log.Fatal(err) |
| 44 | +// } |
| 45 | +// // Set the client to use the retrieved token |
| 46 | +// client.Token = token |
47 | 47 | // |
48 | | -// Learning More |
| 48 | +// # Learning More |
49 | 49 | // |
50 | 50 | // See the godoc for the SDK's subpackages to learn more about specific SDK actions. |
51 | 51 | package drycc |
|
0 commit comments