Workplace Logo

 

made-with-Go GoDoc Test Maintainability Codacy Badge codecov GoReportCard

👍 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 which includes information on all types.

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

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 for her excellent Gopher illustrations.

Licence

Code Copyright 2022 Ainsley Clark. Code released under the MIT Licence.

GitHub

View Github