Class: Eve::Trust::IgbInterface
- Inherits:
-
Object
- Object
- Eve::Trust::IgbInterface
- Extended by:
- ActiveSupport::Memoizable
- Defined in:
- lib/eve/trust/igb_interface.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #alliance_id ⇒ Object
- #alliance_name ⇒ Object
- #char_id ⇒ Object
- #char_name ⇒ Object
-
#constellation_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil.
- #constellation_name ⇒ Object
- #corp_id ⇒ Object
- #corp_name ⇒ Object
- #corp_role ⇒ Object
- #igb? ⇒ Boolean
-
#initialize(request) ⇒ IgbInterface
constructor
A new instance of IgbInterface.
-
#militia_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil.
-
#militia_name ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil.
-
#nearest_location ⇒ Object
Removed from Dominion, so always returns nil.
-
#region_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil.
- #region_name ⇒ Object
- #server_ip ⇒ Object
-
#ship_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil.
-
#solar_system_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil.
- #solar_system_name ⇒ Object
- #station_id ⇒ Object
- #station_name ⇒ Object
-
#system_security ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil.
- #trusted ⇒ Object
- #trusted? ⇒ Boolean
-
#validation_string ⇒ Object
Validation string (HTTP_EVE_VALIDATION_STRING) is only a wishlist item, and is not actually implemented in the IGB yet.
Constructor Details
#initialize(request) ⇒ IgbInterface
Returns a new instance of IgbInterface.
8 9 10 |
# File 'lib/eve/trust/igb_interface.rb', line 8 def initialize(request) @request = request end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
5 6 7 |
# File 'lib/eve/trust/igb_interface.rb', line 5 def request @request end |
Instance Method Details
#alliance_id ⇒ Object
38 |
# File 'lib/eve/trust/igb_interface.rb', line 38 def alliance_id; igb_variable_get(:alliance_id); end |
#alliance_name ⇒ Object
37 |
# File 'lib/eve/trust/igb_interface.rb', line 37 def alliance_name; igb_variable_get(:alliance_name); end |
#char_id ⇒ Object
34 |
# File 'lib/eve/trust/igb_interface.rb', line 34 def char_id; igb_variable_get(:char_id); end |
#char_name ⇒ Object
33 |
# File 'lib/eve/trust/igb_interface.rb', line 33 def char_name; igb_variable_get(:char_name); end |
#constellation_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil. However, if CCP implements it as written, this method should magically start working.
57 |
# File 'lib/eve/trust/igb_interface.rb', line 57 def constellation_id; igb_variable_get(:constellation_id, "The IGB does not yet supply :constellation_id headers, so this will always be nil"); end |
#constellation_name ⇒ Object
40 |
# File 'lib/eve/trust/igb_interface.rb', line 40 def constellation_name; igb_variable_get(:constellation_name); end |
#corp_id ⇒ Object
36 |
# File 'lib/eve/trust/igb_interface.rb', line 36 def corp_id; igb_variable_get(:corp_id); end |
#corp_name ⇒ Object
35 |
# File 'lib/eve/trust/igb_interface.rb', line 35 def corp_name; igb_variable_get(:corp_name); end |
#corp_role ⇒ Object
41 |
# File 'lib/eve/trust/igb_interface.rb', line 41 def corp_role; igb_variable_get(:corp_role); end |
#igb? ⇒ Boolean
16 17 18 |
# File 'lib/eve/trust/igb_interface.rb', line 16 def igb? request.user_agent && request.user_agent[/eve\-minibrowser/i] end |
#militia_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil. However, if CCP implements it as written, this method should magically start working.
51 |
# File 'lib/eve/trust/igb_interface.rb', line 51 def militia_id; igb_variable_get(:militia_id, "The IGB does not yet supply :militia_id headers, so this will always be nil"); end |
#militia_name ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil. However, if CCP implements it as written, this method should magically start working.
48 |
# File 'lib/eve/trust/igb_interface.rb', line 48 def militia_name; igb_variable_get(:militia_name, "The IGB does not yet supply :militia_name headers, so this will always be nil"); end |
#nearest_location ⇒ Object
Removed from Dominion, so always returns nil
69 70 71 72 |
# File 'lib/eve/trust/igb_interface.rb', line 69 def nearest_location igb_variable_get('nearest_location', "The nearest_location headers have been removed from the IGB as of Dominion, so this always returns nil.") end |
#region_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil. However, if CCP implements it as written, this method should magically start working.
54 |
# File 'lib/eve/trust/igb_interface.rb', line 54 def region_id; igb_variable_get(:region_id, "The IGB does not yet supply :region_id headers, so this will always be nil"); end |
#region_name ⇒ Object
39 |
# File 'lib/eve/trust/igb_interface.rb', line 39 def region_name; igb_variable_get(:region_name); end |
#server_ip ⇒ Object
32 |
# File 'lib/eve/trust/igb_interface.rb', line 32 def server_ip; igb_variable_get(:server_ip); end |
#ship_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil. However, if CCP implements it as written, this method should magically start working.
63 |
# File 'lib/eve/trust/igb_interface.rb', line 63 def ship_id; igb_variable_get(:ship_id, "The IGB does not yet supply :ship_id headers, so this will always be nil"); end |
#solar_system_id ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil. However, if CCP implements it as written, this method should magically start working.
60 |
# File 'lib/eve/trust/igb_interface.rb', line 60 def solar_system_id; igb_variable_get(:solar_system_id, "The IGB does not yet supply :solar_system_id headers, so this will always be nil"); end |
#solar_system_name ⇒ Object
44 |
# File 'lib/eve/trust/igb_interface.rb', line 44 def solar_system_name; igb_variable_get(:solar_system_name); end |
#station_id ⇒ Object
42 |
# File 'lib/eve/trust/igb_interface.rb', line 42 def station_id; igb_variable_get(:station_id); end |
#station_name ⇒ Object
43 |
# File 'lib/eve/trust/igb_interface.rb', line 43 def station_name; igb_variable_get(:station_name); end |
#system_security ⇒ Object
The IGB does not yet supply the proper headers for this method, so it will always return nil. However, if CCP implements it as written, this method should magically start working.
66 |
# File 'lib/eve/trust/igb_interface.rb', line 66 def system_security; igb_variable_get(:system_security, "The IGB does not yet supply :system_security headers, so this will always be nil"); end |
#trusted ⇒ Object
31 |
# File 'lib/eve/trust/igb_interface.rb', line 31 def trusted; igb_variable_get(:trusted); end |
#trusted? ⇒ Boolean
12 13 14 |
# File 'lib/eve/trust/igb_interface.rb', line 12 def trusted? trusted end |
#validation_string ⇒ Object
Validation string (HTTP_EVE_VALIDATION_STRING) is only a wishlist item, and is not actually implemented in the IGB yet. However, if CCP implements it as written, this method should magically start working.
22 23 24 25 26 27 28 29 |
# File 'lib/eve/trust/igb_interface.rb', line 22 def validation_string return @validation_string if @validation_string @validation_string ||= request.headers['HTTP_EVE_VALIDATION_STRING'] || request.headers['HTTP_EVE_VALIDATIONSTRING'] unless @validation_string warn "Validation string (HTTP_EVE_VALIDATION_STRING) is only a request, and is not implemented yet" end @validation_string end |