SHIPBUILDS

API

shipbuilds.com exposes one public API endpoint, made for livestream chat commands: given a player name and a ship name, it returns a link to that player's most recent build for the ship. Wire it to a command like !build so viewers can type !build kurfurst and get a link to the streamer's current build.

Endpoint

GET https://shipbuilds.com/api/ship_builds/player_build

Query parameters:

  • player_name (required): a comma-separated list of up to ⁨5⁩ account names, each with an optional realm suffix: :na, :eu or :asia (no suffix means NA). Names must match the account name exactly; case does not matter. List several accounts to cover multiple realms; the most recently updated build across all of them wins.
  • ship_name (required): the ship to look up. Matching is partial: any ship whose name contains the text is a candidate, and an exact whole-word match takes precedence over substring matches. For example kurfurst matches Grosser Kurfurst.
  • game_type (optional): forwarded onto the returned build link as ?game_type=... to preselect a game mode.

The response is plain text: on success, a URL to the build page; when nothing matches, the literal text No build found. That makes it safe to echo straight into chat. Missing or invalid parameters (including more than ⁨5⁩ player names) return a plain-text HTTP 400 error.

Command builder

Search for the accounts to include (all realms are searched), then copy the command for your bot. The ship name comes from whatever the viewer types after the command.

StreamElements
Add at least one player above.
Fossabot
Add at least one player above.
Nightbot
Add at least one player above.

StreamElements

Create a custom command and paste the generated string into the command response. $(customapi ...) fetches the URL and echoes the response; ${1:} is everything the viewer typed after the command name, and $(queryescape ...) URL-encodes it so multi-word ship names work. See the customapi, arguments and queryescape docs.

A configured !build command looks like this:

StreamElements dashboard showing a !build custom command whose reply is a customapi call to the shipbuilds player_build endpoint

Fossabot

Same shape as StreamElements: $(customapi ...) fetches the URL, $(query) is everything after the command name, and $(urlencode ...) URL-encodes it. See the customapi, query and urlencode docs.

Nightbot

$(urlfetch ...) fetches the URL and $(querystring) is the full viewer query, already URL-encoded. See the urlfetch and querystring docs.