forked from cloudflare/cloudflare-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
argo_example_test.go
64 lines (50 loc) · 1.42 KB
/
argo_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
package cloudflare_test
import (
"fmt"
"log"
cloudflare "github.com/cloudflare/cloudflare-go"
)
func ExampleAPI_ArgoSmartRouting() {
api, err := cloudflare.New("deadbeef", "[email protected]")
if err != nil {
log.Fatal(err)
}
smartRoutingSettings, err := api.ArgoSmartRouting("01a7362d577a6c3019a474fd6f485823")
if err != nil {
log.Fatal(err)
}
fmt.Printf("smart routing is %s", smartRoutingSettings.Value)
}
func ExampleAPI_ArgoTieredCaching() {
api, err := cloudflare.New("deadbeef", "[email protected]")
if err != nil {
log.Fatal(err)
}
tieredCachingSettings, err := api.ArgoTieredCaching("01a7362d577a6c3019a474fd6f485823")
if err != nil {
log.Fatal(err)
}
fmt.Printf("tiered caching is %s", tieredCachingSettings.Value)
}
func ExampleAPI_UpdateArgoSmartRouting() {
api, err := cloudflare.New("deadbeef", "[email protected]")
if err != nil {
log.Fatal(err)
}
smartRoutingSettings, err := api.UpdateArgoSmartRouting("01a7362d577a6c3019a474fd6f485823", "on")
if err != nil {
log.Fatal(err)
}
fmt.Printf("smart routing is %s", smartRoutingSettings.Value)
}
func ExampleAPI_UpdateArgoTieredCaching() {
api, err := cloudflare.New("deadbeef", "[email protected]")
if err != nil {
log.Fatal(err)
}
tieredCachingSettings, err := api.UpdateArgoTieredCaching("01a7362d577a6c3019a474fd6f485823", "on")
if err != nil {
log.Fatal(err)
}
fmt.Printf("tiered caching is %s", tieredCachingSettings.Value)
}