Module: Dofus::Api

Defined in:
lib/dofus/api.rb

Class Method Summary collapse

Class Method Details

.get_character(name, server) ⇒ Hash

Gets a character given its name and server. This method uses the fact that aa character name is unique for a given server.

Parameters:

  • name (String)

    the name of the character to look for.

  • server (String)

    the server on which the character has been created.

Returns:

  • (Hash)

    a hash containing all the informations about the character, or an empty hash if the character doesn’t exist.



36
37
38
# File 'lib/dofus/api.rb', line 36

def self.get_character(name, server)
  CharacterGrabber.instance.grab(name, server)
end