repository
0.0.0-20211031235627-801cc09fc0e4
Repository: https://github.com/aesadde/go-webflow.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
go-webflow
A Webflow API client enabling Go programs to interact with Webflow in a simple and uniform way.
Inspired by go-github.
Supported APIs
TODOs
- [] Test
Usage
import "github.com/aesadde/go-webflow/webflow"
Then construct a new client providing your Webflow API Key and use the client to interact with the different parts of the API.
For example you can use the sites and domains APIs to publish a site
client := webflow.NewClient("YOUR_API_KEY")
siteId := "YOUR_SITE_ID"
site, err := client.Sites.GetSite(context.Background(), siteId)
if err != nil {
return
}
domains, err := client.Domains.ListDomains(context.Background(), site.Id, nil)
if err != nil {
return
}
toPublish := make([]string, len(domains))
for i, d := range domains {
toPublish[i] = d.Name
}
published, err := client.Sites.PublishSite(context.Background(), siteId, toPublish)
if err != nil {
return
}
fmt.Println(published)
Examples
A full list of examples can be found in the examples folder.
Issues
If you have an issue: report it on the issue tracker.
Author
Alberto Sadde (@aesadde).