Module: RelicLink::Coh3::Api::Endpoints::Advertisements

Included in:
RelicLink::Coh3::Api::Endpoints
Defined in:
lib/relic_link/coh3/api/endpoints/advertisements.rb

Overview

Endpoint definitions for the internal CoH3 advertisement API.

Instance Method Summary collapse

Instance Method Details

#find_advertisements(options = {}) ⇒ Object

Fetch active game lobbies (ranked and custom) for a given match type.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :token (String)

    Valid CoH3 game client authentication token (required)

  • :data_checksum (Integer)

    Version-specific CRC32 of game data files (required)

  • :app_binary_checksum (Integer)

    PE build number of the game binary (required)

  • :matchtype_id (Integer)

    Match type to filter by (required)

  • :start (Integer) — default: 0

    Zero-based index of the first result to return.

  • :count (Integer) — default: 200

    Number of results to return. Must be an integer between 1 and 200.

Raises:



57
58
59
60
61
# File 'lib/relic_link/coh3/api/endpoints/advertisements.rb', line 57

def find_advertisements(options = {})
  validate_advertisements_options!(options)
  get(advertisements, 'findAdvertisements',
      advertisements_params(options))
end

#find_observable_advertisements(options = {}) ⇒ Object

Fetch games currently observable by spectators.

This is a private internal Relic endpoint that returns games currently open to spectators. Both data_checksum and app_binary_checksum act as version-compatibility filters — only games matching both checksums are returned.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :token (String)

    Valid CoH3 game client authentication token (required)

  • :data_checksum (Integer)

    Version-specific CRC32 of game data files (required)

  • :app_binary_checksum (Integer)

    PE build number of the game binary (required)

  • :start (Integer) — default: 0

    Zero-based index of the first result to return.

  • :count (Integer) — default: 200

    Number of results to return. Must be an integer between 1 and 200.

Raises:



31
32
33
34
35
# File 'lib/relic_link/coh3/api/endpoints/advertisements.rb', line 31

def find_observable_advertisements(options = {})
  validate_observable_advertisements_options!(options)
  get(advertisements, 'findObservableAdvertisements',
      observable_advertisements_params(options))
end