https://github.com/ainsleyclark/workplace
👍 An extremely simple Facebook Workplace client for sending transmissions to threads via Go.
https://github.com/ainsleyclark/workplace
chat client facebook go golang sdk workplace
Last synced: about 1 month ago
JSON representation
👍 An extremely simple Facebook Workplace client for sending transmissions to threads via Go.
- Host: GitHub
- URL: https://github.com/ainsleyclark/workplace
- Owner: ainsleyclark
- License: mit
- Created: 2022-06-22T16:02:52.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-20T07:24:52.000Z (over 3 years ago)
- Last Synced: 2025-01-02T06:44:28.970Z (over 1 year ago)
- Topics: chat, client, facebook, go, golang, sdk, workplace
- Language: Go
- Homepage:
- Size: 70.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](http://golang.org)
[](https://pkg.go.dev/github.com/ainsleyclark/workplace)
[](https://github.com/ainsleyclark/workplace/actions/workflows/test.yml)
[](https://codeclimate.com/github/ainsleyclark/workplace/maintainability)
[](https://www.codacy.com/gh/ainsleyclark/workplace/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ainsleyclark/workplace&utm_campaign=Badge_Grade)
[](https://codecov.io/gh/ainsleyclark/workplace)
[](https://goreportcard.com/report/github.com/ainsleyclark/workplace)
# 👍 Workplace
An extremely simple Facebook Workplace client for sending transmissions to threads via Go.
## Install
```
go get -u github.com/ainsleyclark/workplace
```
## Quick Start
See below for a quick start to create a new Workplace client and sending off a transmission. For more details please
see [Go Doc](https://pkg.go.dev/github.com/ainsleyclark/workplace) which includes information on all types.
```go
func Example() error {
// Create as new Workplace client.
wp, err := workplace.New(workplace.Config{Token: "my-token"})
if err != nil {
return err
}
// Create a new Workplace Transmission that contains
// the thread ID and message to be sent to the thread.
tx := workplace.Transmission{
Thread: "thread-id",
Message: "message",
}
// Send the transmission to the workplace API.
err = wp.Notify(tx)
if err != nil {
return err
}
return nil
}
```
## Roadmap
- Add all workplace graph endpoints from [Facebook Endpoints](https://github.com/fbsamples/workplace-platform-samples/blob/main/SampleAPIEndpoints/Postman/Workplace_Graph_Collection.json)
## Contributing
Please feel free to make a pull request if you think something should be added to this package!
## Credits
Shout out to the incredible [Maria Letta](https://github.com/MariaLetta) for her excellent Gopher illustrations.
## Licence
Code Copyright 2022 Ainsley Clark. Code released under the [MIT Licence](LICENSE).