Class: Eve::Trust::IgbInterface
- Inherits:
-
Object
- Object
- Eve::Trust::IgbInterface
- 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.
7 8 9 |
# File 'lib/eve/trust/igb_interface.rb', line 7 def initialize(request) @request = request end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
4 5 6 |
# File 'lib/eve/trust/igb_interface.rb', line 4 def request @request end |
Instance Method Details
#alliance_id ⇒ Object
37 |
# File 'lib/eve/trust/igb_interface.rb', line 37 def alliance_id; igb_variable_get(:alliance_id); end |
#alliance_name ⇒ Object
36 |
# File 'lib/eve/trust/igb_interface.rb', line 36 def alliance_name; igb_variable_get(:alliance_name); end |
#char_id ⇒ Object
33 |
# File 'lib/eve/trust/igb_interface.rb', line 33 def char_id; igb_variable_get(:char_id); end |
#char_name ⇒ Object
32 |
# File 'lib/eve/trust/igb_interface.rb', line 32 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.
56 |
# File 'lib/eve/trust/igb_interface.rb', line 56 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
39 |
# File 'lib/eve/trust/igb_interface.rb', line 39 def constellation_name; igb_variable_get(:constellation_name); end |
#corp_id ⇒ Object
35 |
# File 'lib/eve/trust/igb_interface.rb', line 35 def corp_id; igb_variable_get(:corp_id); end |
#corp_name ⇒ Object
34 |
# File 'lib/eve/trust/igb_interface.rb', line 34 def corp_name; igb_variable_get(:corp_name); end |
#corp_role ⇒ Object
40 |
# File 'lib/eve/trust/igb_interface.rb', line 40 def corp_role; igb_variable_get(:corp_role); end |
#igb? ⇒ Boolean
15 16 17 |
# File 'lib/eve/trust/igb_interface.rb', line 15 def igb? request.user_agent && (request.user_agent[/eve\-minibrowser/i] || request.user_agent[/EVE\-IGB/]) 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.
50 |
# File 'lib/eve/trust/igb_interface.rb', line 50 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.
47 |
# File 'lib/eve/trust/igb_interface.rb', line 47 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
68 69 70 71 |
# File 'lib/eve/trust/igb_interface.rb', line 68 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.
53 |
# File 'lib/eve/trust/igb_interface.rb', line 53 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
38 |
# File 'lib/eve/trust/igb_interface.rb', line 38 def region_name; igb_variable_get(:region_name); end |
#server_ip ⇒ Object
31 |
# File 'lib/eve/trust/igb_interface.rb', line 31 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.
62 |
# File 'lib/eve/trust/igb_interface.rb', line 62 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.
59 |
# File 'lib/eve/trust/igb_interface.rb', line 59 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
43 |
# File 'lib/eve/trust/igb_interface.rb', line 43 def solar_system_name; igb_variable_get(:solar_system_name); end |
#station_id ⇒ Object
41 |
# File 'lib/eve/trust/igb_interface.rb', line 41 def station_id; igb_variable_get(:station_id); end |
#station_name ⇒ Object
42 |
# File 'lib/eve/trust/igb_interface.rb', line 42 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.
65 |
# File 'lib/eve/trust/igb_interface.rb', line 65 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
30 |
# File 'lib/eve/trust/igb_interface.rb', line 30 def trusted; igb_variable_get(:trusted); end |
#trusted? ⇒ Boolean
11 12 13 |
# File 'lib/eve/trust/igb_interface.rb', line 11 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.
21 22 23 24 25 26 27 28 |
# File 'lib/eve/trust/igb_interface.rb', line 21 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 |