https://github.com/safelyx/safelyx-ruby
Ruby Client for Safelyx's API. 💎
https://github.com/safelyx/safelyx-ruby
api content-moderation gem moderation ruby ruby-gem rubygem security security-tools
Last synced: 7 months ago
JSON representation
Ruby Client for Safelyx's API. 💎
- Host: GitHub
- URL: https://github.com/safelyx/safelyx-ruby
- Owner: safelyx
- License: mit
- Created: 2025-03-11T16:00:03.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-11T16:15:37.000Z (7 months ago)
- Last Synced: 2025-03-11T16:41:38.173Z (7 months ago)
- Topics: api, content-moderation, gem, moderation, ruby, ruby-gem, rubygem, security, security-tools
- Language: Ruby
- Homepage: https://safelyx.com/safe-api
- Size: 0 Bytes
- 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-ruby/actions?workflow=Run+Tests) [](https://rubygems.org/gems/safelyx)
> Safelyx API client
Safelyx API client for Ruby.
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.
3. If the request to the API fails (HTTP error), it will throw an error, so you might want to `rescue` it.
## Usage
It has a method per API endpoint.
```bash
gem install safelyx
``````ruby
require 'safelyx'client = Safelyx::Client.new('your-key-code')
result = client.check_link('https://example.com')
puts result[: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 `ruby`.
```bash
make install
make format
make test
make build
```## Publishing
After committing and pushing with a new version in `safelyx.gemspec`, just run:
```bash
make publish
```