64 lines
1.3 KiB
Markdown
64 lines
1.3 KiB
Markdown
---
|
|
title: "Woodstock"
|
|
date: 2020-04-23T19:30:51-07:00
|
|
draft: false
|
|
---
|
|
|
|
A client library for pnut.io written in Go
|
|
|
|
<!--more-->
|
|
|
|
[source code](https://git.sr.ht/~thrrgilag/woodstock) -
|
|
[issue tracker](https://todo.sr.ht/~thrrgilag/woodstock) -
|
|
[releases](https://git.sr.ht/~thrrgilag/woodstock/refs) -
|
|
[mailing list](https://lists.sr.ht/~thrrgilag/woodstock)
|
|
|
|
## 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/)
|