Wargaming v0.1.0 Wargaming.Warships.Ship View Source

Ship provides functions for interacting with the WarGaming.net World of Warships Warships API.

Link to this section Summary

Functions

Ship.stats_for_all_ships/2 searches WarGaming ship stats (in the configured region) and returns all ship statistics for the given account id

See Ship.stats_for_all_ships/2. Convenience function for specifying specific ship(s)

Link to this section Functions

Link to this function stats_for_all_ships(account_id, opts \\ %{}) View Source

Ship.stats_for_all_ships/2 searches WarGaming ship stats (in the configured region) and returns all ship statistics for the given account id.

Official Reference

Returns {:ok, response_map} or {:error, error_map}

Available Options

  • access_token : Token for accessing private data on account.
  • extra : Additional fields to add to the response. See Official Reference for more information.
  • fields : Comma separated list of fields. Embedded fields separated by periods. To exclude a field, prefix it with a -. Returns all fields if one of the fields is undefined.
  • in_garage : Filter by ship’s availability in the port. If not specified, all ships are returned. Available options (options are strings):

    • “1” — Available in port.
    • “0” — Ship not in port.
  • language : Default “en”. Available options:

    • “cs” — Čeština
    • “de” — Deutsch
    • “en” — English (by default)
    • “es” — Español
    • “fr” — Français
    • “ja” — 日本語
    • “pl” — Polski
    • “ru” — Русский
    • “th” — ไทย
    • “zh-tw” — 繁體中文
  • ship_id : Ship id(s). Max limit of 100.
Link to this function stats_for_ship(accounts_id, ship_ids, opts \\ %{}) View Source

See Ship.stats_for_all_ships/2. Convenience function for specifying specific ship(s).