Class: Greeve::Character::ContactList

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/character/contact_list.rb

Overview

The character’s personal, corporation, and alliance contacts.

Attributes collapse

Instance Method Summary collapse

Methods inherited from BaseItem

attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s

Methods included from Helpers::AttributeToHash

#to_h

Constructor Details

#initialize(character_id, opts = {}) ⇒ ContactList

Returns a new instance of ContactList

Parameters:

  • character_id (Integer)

    EVE character ID



52
53
54
55
# File 'lib/greeve/character/contact_list.rb', line 52

def initialize(character_id, opts = {})
  opts[:query_params] = { "characterID" => character_id }
  super(opts)
end

Instance Method Details

#alliance_contact_labelsGreeve::Rowset

Parameters:

  • label_id (Integer)
  • name (String)

Returns:



46
47
48
49
# File 'lib/greeve/character/contact_list.rb', line 46

rowset :alliance_contact_labels, xpath: "eveapi/result/rowset[@name='allianceContactLabels']" do
  attribute :label_id, xpath: "@labelID", type: :integer
  attribute :name,     xpath: "@name",    type: :string
end

#alliance_contact_listGreeve::Rowset

Parameters:

  • contact_id (Integer)
  • contact_name (String)
  • standing (Integer)
  • contact_type_id (Integer)
  • label_mask (Integer)

Returns:



38
39
40
41
42
43
44
# File 'lib/greeve/character/contact_list.rb', line 38

rowset :alliance_contact_list, xpath: "eveapi/result/rowset[@name='allianceContactList']" do
  attribute :contact_id,      xpath: "@contactID",     type: :integer
  attribute :contact_name,    xpath: "@contactName",   type: :string
  attribute :standing,        xpath: "@standing",      type: :integer
  attribute :contact_type_id, xpath: "@contactTypeID", type: :integer
  attribute :label_mask,      xpath: "@labelMask",     type: :integer
end

#contact_labelsGreeve::Rowset

Parameters:

  • label_id (Integer)
  • name (String)

Returns:



20
21
22
23
# File 'lib/greeve/character/contact_list.rb', line 20

rowset :contact_labels, xpath: "eveapi/result/rowset[@name='contactLabels']" do
  attribute :label_id, xpath: "@labelID", type: :integer
  attribute :name,     xpath: "@name",    type: :string
end

#contact_listGreeve::Rowset

Parameters:

  • contact_id (Integer)
  • contact_name (String)
  • standing (Integer)
  • contact_type_id (Integer)
  • label_mask (Integer)
  • in_watchlist

Returns:



11
12
13
14
15
16
17
18
# File 'lib/greeve/character/contact_list.rb', line 11

rowset :contact_list, xpath: "eveapi/result/rowset[@name='contactList']" do
  attribute :contact_id,      xpath: "@contactID",     type: :integer
  attribute :contact_name,    xpath: "@contactName",   type: :string
  attribute :standing,        xpath: "@standing",      type: :integer
  attribute :contact_type_id, xpath: "@contactTypeID", type: :integer
  attribute :label_mask,      xpath: "@labelMask",     type: :integer
  attribute :in_watchlist,    xpath: "@inWatchlist",   type: :boolean
end

#corporate_contact_labelsGreeve::Rowset

Parameters:

  • label_id (Integer)
  • name (String)

Returns:



33
34
35
36
# File 'lib/greeve/character/contact_list.rb', line 33

rowset :corporate_contact_labels, xpath: "eveapi/result/rowset[@name='corporateContactLabels']" do
  attribute :label_id, xpath: "@labelID", type: :integer
  attribute :name,     xpath: "@name",    type: :string
end

#corporate_contact_listGreeve::Rowset

Parameters:

  • contact_id (Integer)
  • contact_name (String)
  • standing (Integer)
  • contact_type_id (Integer)
  • label_mask (Integer)

Returns:



25
26
27
28
29
30
31
# File 'lib/greeve/character/contact_list.rb', line 25

rowset :corporate_contact_list, xpath: "eveapi/result/rowset[@name='corporateContactList']" do
  attribute :contact_id,      xpath: "@contactID",     type: :integer
  attribute :contact_name,    xpath: "@contactName",   type: :string
  attribute :standing,        xpath: "@standing",      type: :integer
  attribute :contact_type_id, xpath: "@contactTypeID", type: :integer
  attribute :label_mask,      xpath: "@labelMask",     type: :integer
end