Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uchencho/go-termii
Termii client application written in Go
https://github.com/uchencho/go-termii
Last synced: 6 days ago
JSON representation
Termii client application written in Go
- Host: GitHub
- URL: https://github.com/uchencho/go-termii
- Owner: Uchencho
- License: mit
- Created: 2021-05-24T20:57:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-15T19:05:04.000Z (over 1 year ago)
- Last Synced: 2024-06-20T06:27:51.428Z (7 months ago)
- Language: Go
- Size: 37.1 KB
- Stars: 12
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go-Termii
[Termii](https://developers.termii.com/) client application written in Go
## Usage
### Install Package
```bash
go get github.com/Uchencho/go-termii
```### Documentation
Please see [the docs](https://developers.termii.com/) for the most up-to-date documentation of the Termii API.
#### TERMII
- Sample Usage
```go
package mainimport (
termii "github.com/Uchencho/go-termii"
"log"
)func main() {
// Set TERMII_API_KEY, TERMII_URL and TERMII_SENDER_ID as environment variables
// Ensure TERMII_URL ends with '/' i.e 'https://termii.com/'req := termii.AutoGeneratedMessageRequest{
To: "2347066554433",
Sms: "Hello from termii", // You do not need to set the API Key in this request struct
}client := termii.NewClient()
resp, err := client.SendAutoGeneratedMessage(req)
if err != nil {
log.Fatal("error in sending autogenerated message", err)
return
}
log.Printf("Response : %+v", resp)
}```
> **NOTE**
> Check the `client` directory to see a sample implementation and termii_test.go file to see sample tests