-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
41 lines (30 loc) · 1.13 KB
/
doc.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
/*
Package bitballoon provides a client for using the BitBalloon API.
To work with the BitBalloon API, start by instantiating a client:
client := bitballoon.NewClient(&bitballoon.Config{AccessToken: AccessToken})
// List sites
sites, resp, err := client.Sites.List(&bitballoon.ListOptions{Page: 1})
// Create a new site
site, resp, err := client.Sites.Create(&SiteAttributes{
Name: "site-subdomain",
CustomDomain: "www.example.com",
Password: "secret",
NotificationEmail: "me@example.com",
})
// Deploy a directory
deploy, resp, err := site.Deploys.Create("/path/to/directory")
// Wait for the deploy to process
err := deploy.WaitForReady(0)
// Get a single site
site, resp, err := client.Sites.Get("my-site-id")
// Set the domain of the site
site.CustomDomain = "www.example.com"
// Update the site
resp, err := site.Update()
// Deploy a new version of the site from a zip file
deploy, resp, err := site.Deploys.Create("/path/to/file.zip")
deploy.WaitForReady(0)
// Delete the site
resp, err := site.Destroy()
*/
package bitballoon