Class: Greeve::Character::MailingLists

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

Overview

Mailing lists the character is a member of.

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 = {}) ⇒ MailingLists

Returns a new instance of MailingLists

Parameters:

  • character_id (Integer)

    EVE character ID



17
18
19
20
# File 'lib/greeve/character/mailing_lists.rb', line 17

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

Instance Method Details

#mailing_listsGreeve::Rowset

Parameters:

  • list_id (Integer)
  • display_name (String)

Returns:



11
12
13
14
# File 'lib/greeve/character/mailing_lists.rb', line 11

rowset :mailing_lists, xpath: "eveapi/result/rowset[@name='mailingLists']" do
  attribute :list_id,      xpath: "@listID",      type: :integer
  attribute :display_name, xpath: "@displayName", type: :string
end