Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dottorblaster/cloudatgost
CloudAtCost API wrapper written in Go
https://github.com/dottorblaster/cloudatgost
api cloudatcost go
Last synced: about 2 months ago
JSON representation
CloudAtCost API wrapper written in Go
- Host: GitHub
- URL: https://github.com/dottorblaster/cloudatgost
- Owner: dottorblaster
- License: mit
- Created: 2015-03-09T11:17:04.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-12T15:25:41.000Z (over 8 years ago)
- Last Synced: 2024-10-18T06:03:33.112Z (2 months ago)
- Topics: api, cloudatcost, go
- Language: Go
- Size: 28.3 KB
- Stars: 15
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloudatGOst [![GoDoc](https://godoc.org/github.com/dottorblaster/cloudatgost?status.svg)](https://godoc.org/github.com/dottorblaster/cloudatgost) [![Build Status](https://travis-ci.org/dottorblaster/cloudatgost.svg?branch=master)](https://travis-ci.org/dottorblaster/cloudatgost)
CloudAtCost API wrapper written in Go.
API Version: `v1`
## References
https://github.com/cloudatcost/api## Installation
```bash
$ go get github.com/dottorblaster/cloudatgost
```## Example
To interact with the CaC API you simply need to initialize a new client, passing to it your API key and your login.```go
package mainimport (
"github.com/dottorblaster/cloudatgost"
)func main() {
// Initializes a new CloudAtCost client
client := cloudatgost.NewClient("[email protected]", "myApiKey", nil)// d is defined as a TemplateList, a type that maps the JSON
// response of the listtemplates.php endpoint
first := client.ListTemplates()// c is defined as a ServerList, a type that maps the JSON
// response of the listservers.php endpoint
second := client.ListServers()// e is defined as a CacConsole, a type that maps the JSON
// response of the console.php endpoint. You need to provide
// to it a string containing the server ID.
third := client.Console("254484472")
}
```## License
cloudatGOst is licensed under MIT License. (See LICENSE)## TODO
- Refactoring to make all of this stuff more readable