safelyx / safelyx-go

Go Client for Safelyx's API. ๐ŸŽ๏ธ

Home Page:https://safelyx.com/safe-api

Repository from Github https://github.comsafelyx/safelyx-goRepository from Github https://github.comsafelyx/safelyx-go

Safelyx API

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.

go install github.com/safelyx/safelyx-go@v0.1.0
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.

make format
make test

Publishing

Just push to the main branch (with the updated version in the README) and create a tag + release.

About

Go Client for Safelyx's API. ๐ŸŽ๏ธ

https://safelyx.com/safe-api

License:MIT License


Languages

Language:Go 99.4%Language:Makefile 0.6%