Danny Keane SDKs and CLI
Official client libraries for the Danny Keane REST API, published as dannykeane on npm, PyPI, and RubyGems. All three are zero-dependency, the TypeScript and Python ones are typed, and each installs the dannykeane command-line tool. No API key: every endpoint is public.
Install
TypeScript (npm)
Install: npm i dannykeane -- Node 18.3+, ESM with bundled types. Run the CLI without installing: npx dannykeane work --limit 5
import { DannyKeane } from "dannykeane";
const dk = new DannyKeane();
for await (const role of dk.iterWork()) console.log(role.company, role.years);Python (PyPI)
Install: pip install dannykeane -- Python 3.9+, standard library only. Run the CLI without installing: pipx run dannykeane work --limit 5
from dannykeane import DannyKeane
dk = DannyKeane()
for role in dk.iter_work(): print(role["company"], role["years"])Ruby (RubyGems)
Install: gem install dannykeane -- Ruby 2.6+, standard library only. The gem puts the CLI on your PATH: dannykeane work --limit 5
require "dannykeane"
dk = DannyKeane::Client.new
dk.iter_work { |role| puts "#{role["company"]} #{role["years"]}" }dannykeane on npm (opens in new tab)dannykeane on PyPI (opens in new tab)dannykeane on RubyGems (opens in new tab)
Methods
One method per API operation, TypeScript first, then Python; the Ruby gem uses the same snake_case names on DannyKeane::Client. Results are the API's own JSON, typed in TypeScript and Python.
listWork() · list_work() -- GET /api/v1/work: Roles, paginated.
getStats() · get_stats() -- GET /api/v1/stats: Live visitor count.
getGithubContributions() · get_github_contributions() -- GET /api/v1/github-contributions: GitHub contribution calendar.
npcChat() · npc_chat() -- POST /api/v1/npc-chat: Chat with a Habbo room NPC.
npcChatHealth() · npc_chat_health() -- GET /api/v1/npc-chat: NPC chat health check.
runBatch() · run_batch() -- POST /api/v1/batch: Run several read-only operations in one request.
iterWork() · iter_work() -- every role, following next_cursor across pages for you.
Errors and retries
Every non-2xx response raises ApiError (DannyKeane::ApiError in Ruby), parsed from the API's ErrorResponse: status, code, message, hint, and the full body.
On a 429 the client waits out Retry-After and retries, up to maxRetries (max_retries in Python and Ruby, default 2). A Retry-After longer than maxRetryDelay (max_retry_delay, default 60 seconds) fails at once, with the wait on retryAfter (retry_after). Pass baseUrl (base_url) to point any of the clients at a local or preview deploy.
CLI
Every package installs the dannykeane command: one command per API operation, the API's JSON on stdout (indented on a terminal, or with --pretty), and failures on stderr as one line of ErrorResponse JSON. --base-url or DANNYKEANE_BASE_URL points it at another deploy.
dannykeane work [--limit <n>] [--cursor <token>] [--all] -- List roles from the /work tables, one page or all of them.
dannykeane stats -- Live visitor count on dannykeane.com.
dannykeane github-contributions -- GitHub contribution calendar: 52 weeks plus aggregate stats.
dannykeane npc-chat [--npc-id <id>] <message> -- Say something to Frank, the NPC in the /habbo room.
dannykeane npc-chat-health -- Liveness probe for the NPC chat service.
dannykeane batch <operationId>... -- Run several read operations in one request, by operationId.
Exit codes: 0 success, 1 the API returned an error, 2 usage error, 3 the API could not be reached.
More developer docs
Everything dannykeane.com offers developers and agents is indexed at /developers.