thrrgilag.net/content/projects/woodstock.md

66 lines
1.3 KiB
Markdown
Raw Normal View History

2020-04-24 03:17:57 +00:00
---
title: "Woodstock"
date: 2020-04-23T19:30:51-07:00
weight: 10
2020-04-24 03:17:57 +00:00
draft: false
---
2020-04-29 13:20:09 +00:00
A client library for pnut.io written in Go
2020-04-24 03:17:57 +00:00
[source code](https://git.sr.ht/~thrrgilag/woodstock) -
[issue tracker](https://todo.sr.ht/~thrrgilag/woodstock) -
2020-04-29 13:20:09 +00:00
[releases](https://git.sr.ht/~thrrgilag/woodstock/refs) -
[mailing list](https://lists.sr.ht/~thrrgilag/woodstock)
<!--more-->
2020-04-29 13:20:09 +00:00
## Installation
```sh
go get git.sr.ht/~thrrgilag/woodstock
```
## Example
```go
package main
import (
"fmt"
"net/url"
"git.sr.ht/~thrrgilag/woodstock"
)
func main() {
client := woodstock.NewClient("<ClientID>","")
client.SetAccessToken("<AccessToken>")
text := "Hello pnut.io"
v := url.Values{}
v.Set("text", text)
post, err := client.Post(v)
if err != nil {
fmt.Println(err)
}
fmt.Println(post.Data.Content.Text)
}
```
## Contributing
Send patches to
[~thrrgilag/woodstock@lists.sr.ht](https://lists.sr.ht/~thrrgilag/woodstock).
A nice tutorial on how to do that can be found at
[git-send-email.io](https://git-send-email.io/).
Send bugs to
[~thrrgilag/woodstock@todo.sr.ht](https://todo.sr.ht/~thrrgilag/woodstock).
## Discussion
Mailing List:
[~thrrgilag/woodstock@lists.sr.ht](https://lists.sr.ht/~thrrgilag/woodstock)
Chat Room:
[#dev](https://thrrgilag.net/chat/dev/)