Class: Greeve::Corporation::MemberTracking

Inherits:
BaseItem
  • Object
show all
Defined in:
lib/greeve/corporation/member_tracking.rb

Overview

Information about the members of a corporation.

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(opts = {}) ⇒ MemberTracking

Returns a new instance of MemberTracking

Parameters:

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

    a customizable set of options

Options Hash (opts):

  • :extended (Boolean) — default: false

    query extended member tracking info



29
30
31
32
33
34
35
# File 'lib/greeve/corporation/member_tracking.rb', line 29

def initialize(opts = {})
  extended = !!opts.delete(:extended)

  opts[:query_params] = { "extended" => 1 } if extended

  super(opts)
end

Instance Method Details

#membersGreeve::Rowset

Parameters:

  • character_id (Integer)
  • name (String)
  • start_date_time (Time)
  • base_id (Integer)
  • base (String)
  • title (String)
  • logon_date_time (Time)
  • logoff_date_time (Time)
  • location_id (Integer)
  • location (String)
  • ship_type_id (Integer)
  • ship_type (String)
  • roles (Integer)
  • grantable_roles (Integer)

Returns:



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/greeve/corporation/member_tracking.rb', line 11

rowset :members, xpath: "eveapi/result/rowset[@name='members']" do
  attribute :character_id,     xpath: "@characterID",    type: :integer
  attribute :name,             xpath: "@name",           type: :string
  attribute :start_date_time,  xpath: "@startDateTime",  type: :datetime
  attribute :base_id,          xpath: "@baseID",         type: :integer
  attribute :base,             xpath: "@base",           type: :string
  attribute :title,            xpath: "@title",          type: :string
  attribute :logon_date_time,  xpath: "@logonDateTime",  type: :datetime
  attribute :logoff_date_time, xpath: "@logoffDateTime", type: :datetime
  attribute :location_id,      xpath: "@locationID",     type: :integer
  attribute :location,         xpath: "@location",       type: :string
  attribute :ship_type_id,     xpath: "@shipTypeID",     type: :integer
  attribute :ship_type,        xpath: "@shipType",       type: :string
  attribute :roles,            xpath: "@roles",          type: :integer
  attribute :grantable_roles,  xpath: "@grantableRoles", type: :integer
end