# evennia.server.game_index_client.client

The client for sending data to the Evennia Game Index

class `evennia.server.game_index_client.client.``EvenniaGameIndexClient`(on_bad_request=None)

  Bases: `object`

  This client class is used for gathering and sending game details to the Evennia Game Index. Since EGI is in the early goings, this isn’t incredibly configurable as far as to what is being sent.

  `__init__`(on_bad_request=None)
    Parameters

      on_bad_request – Optional callable to trigger when a bad request was sent. This is almost always going to be due to bad config.

  `send_game_details`()

    This is where the magic happens. Send details about the game to the Evennia Game Index.

  `handle_egd_response`(response)

class `evennia.server.game_index_client.client.``SimpleResponseReceiver`(status_code, d)

  Bases: `twisted.internet.protocol.Protocol`

  Used for pulling the response body out of an HTTP response.

  `__init__`(status_code, d)

    Initialize self. See help(type(self)) for accurate signature.

  `dataReceived`(data)

    Called whenever data is received.

    Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.

    @param data: a string of indeterminate length. Please keep in mind

      that you will probably need to buffer some data, as partial (or multiple) protocol messages may be received! I recommend that unit tests for protocols call through to this method with differing chunk sizes, down to one byte at a time.

  `connectionLost`(reason=<twisted.python.failure.Failure twisted.internet.error.ConnectionDone: Connection was closed cleanly.>)

    Called when the connection is shut down.

    Clear any circular references here, and any external references to this Protocol. The connection has been closed.

    @type reason: L{twisted.python.failure.Failure}

class `evennia.server.game_index_client.client.``StringProducer`(body)

  Bases: `object`

  Used for feeding a request body to the tx HTTP client.

  `__init__`(body)

    Initialize self. See help(type(self)) for accurate signature.

  `startProducing`(consumer)
  `pauseProducing`()
  `stopProducing`()

class `evennia.server.game_index_client.client.``QuietHTTP11ClientFactory`(quiescentCallback, metadata)

  Bases: `twisted.web.client._HTTP11ClientFactory`

  Silences the obnoxious factory start/stop messages in the default client.

  `noisy` = False