https://github.com/safelyx/safelyx-go
Go Client for Safelyx's API. 🏎️
https://github.com/safelyx/safelyx-go
api content-moderation go golang moderation security security-tools
Last synced: 6 months ago
JSON representation
Go Client for Safelyx's API. 🏎️
- Host: GitHub
- URL: https://github.com/safelyx/safelyx-go
- Owner: safelyx
- License: mit
- Created: 2025-02-09T06:45:55.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-17T14:47:21.000Z (7 months ago)
- Last Synced: 2025-03-17T15:52:34.489Z (7 months ago)
- Topics: api, content-moderation, go, golang, moderation, security, security-tools
- Language: Go
- Homepage: https://safelyx.com/safe-api
- Size: 9.77 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Safelyx API
[](https://github.com/safelyx/safelyx-go/actions?workflow=Run+Tests)
> Safelyx API client
Safelyx API client for Go. It has no dependencies.
You can find the API documentation at https://safelyx.com/safe-api.
### Some things to note:
1. It's simply making an HTTP request to the Safelyx API.
2. It provides types for the results and for the parameters.
## Usage
It has a method per API endpoint.
```bash
go install github.com/safelyx/safelyx-go@v0.1.2
``````go
import (
"log"
"fmt""github.com/safelyx/safelyx-go"
)api := safelyx.NewClient("your-key-code")
checkResult, err := api.CheckLink("https://example.com")
if err != nil {
log.Fatal(err)
}fmt.Println(checkResult.Result) // Outputs a safety score between 0 (unsafe) and 10 (safe). -1 if there was an error, -2 if there are no checks remaining.
```## Development
Requires `go`.
```bash
make format
make test
```## Publishing
Just push to the `main` branch (with the updated version in the README) and create a tag + release.