Coordinates Are Sea API - Ruby Gem

Coordinates are Sea is a simple tool for checking if coordinates are in the sea. It returns if the coordinates are in the sea or not.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_coordinatesaresea'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_coordinatesaresea

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_coordinatesaresea'

# Initialize the client
client = APIVerve::Coordinatesaresea::Client.new(api_key: "YOUR_API_KEY")

# Make a request
response = client.execute({
  lat: 37.7749,
  lon: -122.4194
})

# Print the response
puts response

Error Handling

begin
  response = client.execute({ lat: 37.7749, lon: -122.4194 })
  puts response["data"]
rescue APIVerve::Coordinatesaresea::ValidationError => e
  puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Coordinatesaresea::APIError => e
  puts "API error: #{e.message}"
  puts "Status code: #{e.status_code}"
end

Debug Mode

# Enable debug logging
client = APIVerve::Coordinatesaresea::Client.new(
  api_key: "YOUR_API_KEY",
  debug: true
)

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "latitude": 37.7749,
    "longitude": -122.4194,
    "isSea": false
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.