Skip to content

Commit 9d394cb

Browse files
committed
Updated documentation
1 parent 6295f48 commit 9d394cb

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
11
go-render
22
=========
3+
[![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://pkg.go.dev/github.com/mrusme/go-render) [![license](http://img.shields.io/badge/license-GPLv3-red.svg?style=flat)](https://raw.githubusercontent.com/mrusme/go-render/master/LICENSE)
4+
35

46
Tiny Go library for the
57
[Render API](https://api-docs.render.com/reference/introduction).
68

9+
10+
## Installation
11+
12+
```sh
13+
go get -u github.com/mrusme/go-render
14+
```
15+
16+
17+
## Getting Started
18+
19+
20+
### Querying Sites by Team ID
21+
22+
```go
23+
package main
24+
25+
import (
26+
"log"
27+
"encoding/json"
28+
"github.com/mrusme/go-render"
29+
)
30+
31+
func main() {
32+
r := render.New("apiKeyHere")
33+
34+
services, err := r.ListServices()
35+
if err != nil {
36+
log.Panic(err)
37+
}
38+
39+
for _, service := range services {
40+
b, _ := json.MarshalIndent(service, "", " ")
41+
log.Printf("%s\n\n", string(b))
42+
}
43+
}
44+
```
45+

0 commit comments

Comments
 (0)