Module: WorldMonitor

Defined in:
lib/worldmonitor.rb,
lib/worldmonitor/version.rb

Defined Under Namespace

Classes: APIError, Client, Error, MCPError

Constant Summary collapse

USER_AGENT =

Cloudflare's WAF challenges generic library User-Agents (Ruby, curl, empty) on the API edge, so we always identify ourselves.

"worldmonitor-ruby/#{VERSION} (+https://worldmonitor.app)"
DEFAULT_BASE_URL =
"https://api.worldmonitor.app"
DEFAULT_MCP_URL =
"https://worldmonitor.app/mcp"
API_KEY_HEADER =

Header the API accepts for a user-issued key (alias: X-Api-Key).

"X-WorldMonitor-Key"
MCP_AUTH_ERROR_CODE =

JSON-RPC error code the MCP server returns when a call needs authentication.

-32_001
AUTH_HINT =
"Hint: this call needs a key - pass api_key: or set " \
"WORLDMONITOR_API_KEY (get one at https://worldmonitor.app/pro)."
DEFAULT_TIMEOUT =
30
VERSION =
"0.1.1"