esi_client 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -6
- data/bin/regenerate +7 -3
- data/docs/GetCharactersCharacterIdOnlineForbidden.md +8 -0
- data/docs/GetCharactersCharacterIdOnlineInternalServerError.md +8 -0
- data/docs/LocationApi.md +63 -0
- data/esi_client-1.0.1.gem +0 -0
- data/git_push.sh +2 -2
- data/lib/esi_client.rb +2 -0
- data/lib/esi_client/api/location_api.rb +66 -0
- data/lib/esi_client/models/get_characters_character_id_online_forbidden.rb +188 -0
- data/lib/esi_client/models/get_characters_character_id_online_internal_server_error.rb +188 -0
- data/lib/esi_client/version.rb +1 -1
- data/spec/models/get_characters_character_id_online_forbidden_spec.rb +41 -0
- data/spec/models/get_characters_character_id_online_internal_server_error_spec.rb +41 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61af8743cd0c6fb8c9739a32720baeed8e2be915
|
4
|
+
data.tar.gz: ac9f316d3e4a830dfa88d36ad72b4930e29880cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0edbf814825104880e5e735d9e82257ed9348ae1d6c667054c4706433325296017be1edfc33b0e4d17d2d44c4bfd0bfe4e35d99aecfa68a1ab3cca891c2d0276
|
7
|
+
data.tar.gz: 6ef23ddb2477bb632b32d9019d7a1d57f861c05de96dfd413a1014ce6b51d334ace98369cbdd87498693573244cc82b2ff9faa218a7ff238974c82c127e611a7
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ An OpenAPI for EVE Online
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: 0.4.7
|
10
|
-
- Package version: 1.0.
|
10
|
+
- Package version: 1.0.2
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Notes
|
@@ -29,15 +29,15 @@ gem build esi_client.gemspec
|
|
29
29
|
Then either install the gem locally:
|
30
30
|
|
31
31
|
```shell
|
32
|
-
gem install ./esi_client-1.0.
|
32
|
+
gem install ./esi_client-1.0.2.gem
|
33
33
|
```
|
34
|
-
(for development, run `gem install --dev ./esi_client-1.0.
|
34
|
+
(for development, run `gem install --dev ./esi_client-1.0.2.gem` to install the development dependencies)
|
35
35
|
|
36
36
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
37
37
|
|
38
38
|
Finally add this to the Gemfile:
|
39
39
|
|
40
|
-
gem 'esi_client', '~> 1.0.
|
40
|
+
gem 'esi_client', '~> 1.0.2'
|
41
41
|
|
42
42
|
### Install from Git
|
43
43
|
|
@@ -62,7 +62,7 @@ require 'esi_client'
|
|
62
62
|
|
63
63
|
api_instance = ESIClient::AllianceApi.new
|
64
64
|
|
65
|
-
opts = {
|
65
|
+
opts = {
|
66
66
|
datasource: "tranquility", # String | The server name you would like data from
|
67
67
|
user_agent: "user_agent_example", # String | Client identifier, takes precedence over headers
|
68
68
|
x_user_agent: "x_user_agent_example" # String | Client identifier, takes precedence over User-Agent
|
@@ -150,6 +150,7 @@ Class | Method | HTTP request | Description
|
|
150
150
|
*ESIClient::KillmailsApi* | [**get_characters_character_id_killmails_recent**](docs/KillmailsApi.md#get_characters_character_id_killmails_recent) | **GET** /v1/characters/{character_id}/killmails/recent/ | List kills and losses
|
151
151
|
*ESIClient::KillmailsApi* | [**get_killmails_killmail_id_killmail_hash**](docs/KillmailsApi.md#get_killmails_killmail_id_killmail_hash) | **GET** /v1/killmails/{killmail_id}/{killmail_hash}/ | Get a single killmail
|
152
152
|
*ESIClient::LocationApi* | [**get_characters_character_id_location**](docs/LocationApi.md#get_characters_character_id_location) | **GET** /v1/characters/{character_id}/location/ | Get character location
|
153
|
+
*ESIClient::LocationApi* | [**get_characters_character_id_online**](docs/LocationApi.md#get_characters_character_id_online) | **GET** /v1/characters/{character_id}/online/ | Get character online
|
153
154
|
*ESIClient::LocationApi* | [**get_characters_character_id_ship**](docs/LocationApi.md#get_characters_character_id_ship) | **GET** /v1/characters/{character_id}/ship/ | Get current ship
|
154
155
|
*ESIClient::LoyaltyApi* | [**get_characters_character_id_loyalty_points**](docs/LoyaltyApi.md#get_characters_character_id_loyalty_points) | **GET** /v1/characters/{character_id}/loyalty/points/ | Get loyalty points
|
155
156
|
*ESIClient::LoyaltyApi* | [**get_loyalty_stores_corporation_id_offers**](docs/LoyaltyApi.md#get_loyalty_stores_corporation_id_offers) | **GET** /v1/loyalty/stores/{corporation_id}/offers/ | List loyalty store offers
|
@@ -336,6 +337,8 @@ Class | Method | HTTP request | Description
|
|
336
337
|
- [ESIClient::GetCharactersCharacterIdMedalsInternalServerError](docs/GetCharactersCharacterIdMedalsInternalServerError.md)
|
337
338
|
- [ESIClient::GetCharactersCharacterIdNotFound](docs/GetCharactersCharacterIdNotFound.md)
|
338
339
|
- [ESIClient::GetCharactersCharacterIdOk](docs/GetCharactersCharacterIdOk.md)
|
340
|
+
- [ESIClient::GetCharactersCharacterIdOnlineForbidden](docs/GetCharactersCharacterIdOnlineForbidden.md)
|
341
|
+
- [ESIClient::GetCharactersCharacterIdOnlineInternalServerError](docs/GetCharactersCharacterIdOnlineInternalServerError.md)
|
339
342
|
- [ESIClient::GetCharactersCharacterIdOpportunities200Ok](docs/GetCharactersCharacterIdOpportunities200Ok.md)
|
340
343
|
- [ESIClient::GetCharactersCharacterIdOpportunitiesForbidden](docs/GetCharactersCharacterIdOpportunitiesForbidden.md)
|
341
344
|
- [ESIClient::GetCharactersCharacterIdOpportunitiesInternalServerError](docs/GetCharactersCharacterIdOpportunitiesInternalServerError.md)
|
@@ -652,7 +655,7 @@ Class | Method | HTTP request | Description
|
|
652
655
|
- **Type**: OAuth
|
653
656
|
- **Flow**: implicit
|
654
657
|
- **Authorization URL**: https://login.eveonline.com/oauth/authorize
|
655
|
-
- **Scopes**:
|
658
|
+
- **Scopes**:
|
656
659
|
- esi-assets.read_assets.v1: EVE SSO scope esi-assets.read_assets.v1
|
657
660
|
- esi-bookmarks.read_character_bookmarks.v1: EVE SSO scope esi-bookmarks.read_character_bookmarks.v1
|
658
661
|
- esi-calendar.read_calendar_events.v1: EVE SSO scope esi-calendar.read_calendar_events.v1
|
@@ -678,6 +681,7 @@ Class | Method | HTTP request | Description
|
|
678
681
|
- esi-industry.read_character_jobs.v1: EVE SSO scope esi-industry.read_character_jobs.v1
|
679
682
|
- esi-killmails.read_killmails.v1: EVE SSO scope esi-killmails.read_killmails.v1
|
680
683
|
- esi-location.read_location.v1: EVE SSO scope esi-location.read_location.v1
|
684
|
+
- esi-location.read_online.v1: EVE SSO scope esi-location.read_online.v1
|
681
685
|
- esi-location.read_ship_type.v1: EVE SSO scope esi-location.read_ship_type.v1
|
682
686
|
- esi-mail.organize_mail.v1: EVE SSO scope esi-mail.organize_mail.v1
|
683
687
|
- esi-mail.read_mail.v1: EVE SSO scope esi-mail.read_mail.v1
|
@@ -692,3 +696,4 @@ Class | Method | HTTP request | Description
|
|
692
696
|
- esi-ui.write_waypoint.v1: EVE SSO scope esi-ui.write_waypoint.v1
|
693
697
|
- esi-universe.read_structures.v1: EVE SSO scope esi-universe.read_structures.v1
|
694
698
|
- esi-wallet.read_character_wallet.v1: EVE SSO scope esi-wallet.read_character_wallet.v1
|
699
|
+
|
data/bin/regenerate
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
#!/usr/bin/env sh
|
2
2
|
|
3
|
+
echo "Version Number?"
|
4
|
+
read version_number
|
5
|
+
echo ">>> Generating files for version $version_number..."
|
6
|
+
|
3
7
|
swagger-codegen generate \
|
4
8
|
--input-spec=https://esi.tech.ccp.is/_latest/swagger.json?datasource=tranquility \
|
5
9
|
--lang=ruby \
|
6
|
-
-
|
7
|
-
-
|
10
|
+
-D gemName=esi_client,moduleName=ESIClient,gemVersion=$version_number \
|
11
|
+
--git-repo-id esi_client \
|
12
|
+
--git-user-id EmberSands \
|
8
13
|
--output=.
|
9
14
|
|
10
15
|
echo ">>> File generation complete."
|
11
|
-
echo ">>> Remember to update the gem version to the version of ESI"
|
data/docs/LocationApi.md
CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://esi.tech.ccp.is/*
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
7
|
[**get_characters_character_id_location**](LocationApi.md#get_characters_character_id_location) | **GET** /v1/characters/{character_id}/location/ | Get character location
|
8
|
+
[**get_characters_character_id_online**](LocationApi.md#get_characters_character_id_online) | **GET** /v1/characters/{character_id}/online/ | Get character online
|
8
9
|
[**get_characters_character_id_ship**](LocationApi.md#get_characters_character_id_ship) | **GET** /v1/characters/{character_id}/ship/ | Get current ship
|
9
10
|
|
10
11
|
|
@@ -70,6 +71,68 @@ Name | Type | Description | Notes
|
|
70
71
|
|
71
72
|
|
72
73
|
|
74
|
+
# **get_characters_character_id_online**
|
75
|
+
> BOOLEAN get_characters_character_id_online(character_id, opts)
|
76
|
+
|
77
|
+
Get character online
|
78
|
+
|
79
|
+
Checks if the character is currently online --- This route is cached for up to 60 seconds
|
80
|
+
|
81
|
+
### Example
|
82
|
+
```ruby
|
83
|
+
# load the gem
|
84
|
+
require 'esi_client'
|
85
|
+
# setup authorization
|
86
|
+
ESIClient.configure do |config|
|
87
|
+
# Configure OAuth2 access token for authorization: evesso
|
88
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
89
|
+
end
|
90
|
+
|
91
|
+
api_instance = ESIClient::LocationApi.new
|
92
|
+
|
93
|
+
character_id = 56 # Integer | An EVE character ID
|
94
|
+
|
95
|
+
opts = {
|
96
|
+
datasource: "tranquility", # String | The server name you would like data from
|
97
|
+
token: "token_example", # String | Access token to use, if preferred over a header
|
98
|
+
user_agent: "user_agent_example", # String | Client identifier, takes precedence over headers
|
99
|
+
x_user_agent: "x_user_agent_example" # String | Client identifier, takes precedence over User-Agent
|
100
|
+
}
|
101
|
+
|
102
|
+
begin
|
103
|
+
#Get character online
|
104
|
+
result = api_instance.get_characters_character_id_online(character_id, opts)
|
105
|
+
p result
|
106
|
+
rescue ESIClient::ApiError => e
|
107
|
+
puts "Exception when calling LocationApi->get_characters_character_id_online: #{e}"
|
108
|
+
end
|
109
|
+
```
|
110
|
+
|
111
|
+
### Parameters
|
112
|
+
|
113
|
+
Name | Type | Description | Notes
|
114
|
+
------------- | ------------- | ------------- | -------------
|
115
|
+
**character_id** | **Integer**| An EVE character ID |
|
116
|
+
**datasource** | **String**| The server name you would like data from | [optional] [default to tranquility]
|
117
|
+
**token** | **String**| Access token to use, if preferred over a header | [optional]
|
118
|
+
**user_agent** | **String**| Client identifier, takes precedence over headers | [optional]
|
119
|
+
**x_user_agent** | **String**| Client identifier, takes precedence over User-Agent | [optional]
|
120
|
+
|
121
|
+
### Return type
|
122
|
+
|
123
|
+
**BOOLEAN**
|
124
|
+
|
125
|
+
### Authorization
|
126
|
+
|
127
|
+
[evesso](../README.md#evesso)
|
128
|
+
|
129
|
+
### HTTP request headers
|
130
|
+
|
131
|
+
- **Content-Type**: Not defined
|
132
|
+
- **Accept**: application/json
|
133
|
+
|
134
|
+
|
135
|
+
|
73
136
|
# **get_characters_character_id_ship**
|
74
137
|
> GetCharactersCharacterIdShipOk get_characters_character_id_ship(character_id, opts)
|
75
138
|
|
Binary file
|
data/git_push.sh
CHANGED
@@ -11,12 +11,12 @@ git_repo_id=$2
|
|
11
11
|
release_note=$3
|
12
12
|
|
13
13
|
if [ "$git_user_id" = "" ]; then
|
14
|
-
git_user_id="
|
14
|
+
git_user_id="EmberSands"
|
15
15
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
16
16
|
fi
|
17
17
|
|
18
18
|
if [ "$git_repo_id" = "" ]; then
|
19
|
-
git_repo_id="
|
19
|
+
git_repo_id="esi_client"
|
20
20
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
21
21
|
fi
|
22
22
|
|
data/lib/esi_client.rb
CHANGED
@@ -127,6 +127,8 @@ require 'esi_client/models/get_characters_character_id_medals_graphic'
|
|
127
127
|
require 'esi_client/models/get_characters_character_id_medals_internal_server_error'
|
128
128
|
require 'esi_client/models/get_characters_character_id_not_found'
|
129
129
|
require 'esi_client/models/get_characters_character_id_ok'
|
130
|
+
require 'esi_client/models/get_characters_character_id_online_forbidden'
|
131
|
+
require 'esi_client/models/get_characters_character_id_online_internal_server_error'
|
130
132
|
require 'esi_client/models/get_characters_character_id_opportunities_200_ok'
|
131
133
|
require 'esi_client/models/get_characters_character_id_opportunities_forbidden'
|
132
134
|
require 'esi_client/models/get_characters_character_id_opportunities_internal_server_error'
|
@@ -85,6 +85,72 @@ module ESIClient
|
|
85
85
|
return data, status_code, headers
|
86
86
|
end
|
87
87
|
|
88
|
+
# Get character online
|
89
|
+
# Checks if the character is currently online --- This route is cached for up to 60 seconds
|
90
|
+
# @param character_id An EVE character ID
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @option opts [String] :datasource The server name you would like data from (default to tranquility)
|
93
|
+
# @option opts [String] :token Access token to use, if preferred over a header
|
94
|
+
# @option opts [String] :user_agent Client identifier, takes precedence over headers
|
95
|
+
# @option opts [String] :x_user_agent Client identifier, takes precedence over User-Agent
|
96
|
+
# @return [BOOLEAN]
|
97
|
+
def get_characters_character_id_online(character_id, opts = {})
|
98
|
+
data, _status_code, _headers = get_characters_character_id_online_with_http_info(character_id, opts)
|
99
|
+
return data
|
100
|
+
end
|
101
|
+
|
102
|
+
# Get character online
|
103
|
+
# Checks if the character is currently online --- This route is cached for up to 60 seconds
|
104
|
+
# @param character_id An EVE character ID
|
105
|
+
# @param [Hash] opts the optional parameters
|
106
|
+
# @option opts [String] :datasource The server name you would like data from
|
107
|
+
# @option opts [String] :token Access token to use, if preferred over a header
|
108
|
+
# @option opts [String] :user_agent Client identifier, takes precedence over headers
|
109
|
+
# @option opts [String] :x_user_agent Client identifier, takes precedence over User-Agent
|
110
|
+
# @return [Array<(BOOLEAN, Fixnum, Hash)>] BOOLEAN data, response status code and response headers
|
111
|
+
def get_characters_character_id_online_with_http_info(character_id, opts = {})
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug "Calling API: LocationApi.get_characters_character_id_online ..."
|
114
|
+
end
|
115
|
+
# verify the required parameter 'character_id' is set
|
116
|
+
fail ArgumentError, "Missing the required parameter 'character_id' when calling LocationApi.get_characters_character_id_online" if character_id.nil?
|
117
|
+
if opts[:'datasource'] && !['tranquility', 'singularity'].include?(opts[:'datasource'])
|
118
|
+
fail ArgumentError, 'invalid value for "datasource", must be one of tranquility, singularity'
|
119
|
+
end
|
120
|
+
# resource path
|
121
|
+
local_var_path = "/v1/characters/{character_id}/online/".sub('{format}','json').sub('{' + 'character_id' + '}', character_id.to_s)
|
122
|
+
|
123
|
+
# query parameters
|
124
|
+
query_params = {}
|
125
|
+
query_params[:'datasource'] = opts[:'datasource'] if !opts[:'datasource'].nil?
|
126
|
+
query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
|
127
|
+
query_params[:'user_agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil?
|
128
|
+
|
129
|
+
# header parameters
|
130
|
+
header_params = {}
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
|
+
header_params[:'X-User-Agent'] = opts[:'x_user_agent'] if !opts[:'x_user_agent'].nil?
|
134
|
+
|
135
|
+
# form parameters
|
136
|
+
form_params = {}
|
137
|
+
|
138
|
+
# http body (model)
|
139
|
+
post_body = nil
|
140
|
+
auth_names = ['evesso']
|
141
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => 'BOOLEAN')
|
148
|
+
if @api_client.config.debugging
|
149
|
+
@api_client.config.logger.debug "API called: LocationApi#get_characters_character_id_online\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
150
|
+
end
|
151
|
+
return data, status_code, headers
|
152
|
+
end
|
153
|
+
|
88
154
|
# Get current ship
|
89
155
|
# Get the current ship type, name and id --- This route is cached for up to 5 seconds
|
90
156
|
# @param character_id An EVE character ID
|
@@ -0,0 +1,188 @@
|
|
1
|
+
=begin
|
2
|
+
#EVE Swagger Interface
|
3
|
+
|
4
|
+
#An OpenAPI for EVE Online
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.4.7
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module ESIClient
|
15
|
+
# Forbidden
|
16
|
+
class GetCharactersCharacterIdOnlineForbidden
|
17
|
+
# Forbidden message
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'error' => :'error'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
:'error' => :'String'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Initializes the object
|
36
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
|
+
|
43
|
+
if attributes.has_key?(:'error')
|
44
|
+
self.error = attributes[:'error']
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
50
|
+
# @return Array for valid properies with the reasons
|
51
|
+
def list_invalid_properties
|
52
|
+
invalid_properties = Array.new
|
53
|
+
return invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
return true
|
60
|
+
end
|
61
|
+
|
62
|
+
# Checks equality by comparing each attribute.
|
63
|
+
# @param [Object] Object to be compared
|
64
|
+
def ==(o)
|
65
|
+
return true if self.equal?(o)
|
66
|
+
self.class == o.class &&
|
67
|
+
error == o.error
|
68
|
+
end
|
69
|
+
|
70
|
+
# @see the `==` method
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def eql?(o)
|
73
|
+
self == o
|
74
|
+
end
|
75
|
+
|
76
|
+
# Calculates hash code according to all attributes.
|
77
|
+
# @return [Fixnum] Hash code
|
78
|
+
def hash
|
79
|
+
[error].hash
|
80
|
+
end
|
81
|
+
|
82
|
+
# Builds the object from hash
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
# @return [Object] Returns the model itself
|
85
|
+
def build_from_hash(attributes)
|
86
|
+
return nil unless attributes.is_a?(Hash)
|
87
|
+
self.class.swagger_types.each_pair do |key, type|
|
88
|
+
if type =~ /\AArray<(.*)>/i
|
89
|
+
# check to ensure the input is an array given that the the attribute
|
90
|
+
# is documented as an array but the input is not
|
91
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
92
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
93
|
+
end
|
94
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
95
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
96
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
97
|
+
end
|
98
|
+
|
99
|
+
self
|
100
|
+
end
|
101
|
+
|
102
|
+
# Deserializes the data based on type
|
103
|
+
# @param string type Data type
|
104
|
+
# @param string value Value to be deserialized
|
105
|
+
# @return [Object] Deserialized data
|
106
|
+
def _deserialize(type, value)
|
107
|
+
case type.to_sym
|
108
|
+
when :DateTime
|
109
|
+
DateTime.parse(value)
|
110
|
+
when :Date
|
111
|
+
Date.parse(value)
|
112
|
+
when :String
|
113
|
+
value.to_s
|
114
|
+
when :Integer
|
115
|
+
value.to_i
|
116
|
+
when :Float
|
117
|
+
value.to_f
|
118
|
+
when :BOOLEAN
|
119
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
120
|
+
true
|
121
|
+
else
|
122
|
+
false
|
123
|
+
end
|
124
|
+
when :Object
|
125
|
+
# generic object (usually a Hash), return directly
|
126
|
+
value
|
127
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
128
|
+
inner_type = Regexp.last_match[:inner_type]
|
129
|
+
value.map { |v| _deserialize(inner_type, v) }
|
130
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
131
|
+
k_type = Regexp.last_match[:k_type]
|
132
|
+
v_type = Regexp.last_match[:v_type]
|
133
|
+
{}.tap do |hash|
|
134
|
+
value.each do |k, v|
|
135
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
else # model
|
139
|
+
temp_model = ESIClient.const_get(type).new
|
140
|
+
temp_model.build_from_hash(value)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# Returns the string representation of the object
|
145
|
+
# @return [String] String presentation of the object
|
146
|
+
def to_s
|
147
|
+
to_hash.to_s
|
148
|
+
end
|
149
|
+
|
150
|
+
# to_body is an alias to to_hash (backward compatibility)
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
152
|
+
def to_body
|
153
|
+
to_hash
|
154
|
+
end
|
155
|
+
|
156
|
+
# Returns the object in the form of hash
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
158
|
+
def to_hash
|
159
|
+
hash = {}
|
160
|
+
self.class.attribute_map.each_pair do |attr, param|
|
161
|
+
value = self.send(attr)
|
162
|
+
next if value.nil?
|
163
|
+
hash[param] = _to_hash(value)
|
164
|
+
end
|
165
|
+
hash
|
166
|
+
end
|
167
|
+
|
168
|
+
# Outputs non-array value in the form of hash
|
169
|
+
# For object, use to_hash. Otherwise, just return the value
|
170
|
+
# @param [Object] value Any valid value
|
171
|
+
# @return [Hash] Returns the value in the form of hash
|
172
|
+
def _to_hash(value)
|
173
|
+
if value.is_a?(Array)
|
174
|
+
value.compact.map{ |v| _to_hash(v) }
|
175
|
+
elsif value.is_a?(Hash)
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
178
|
+
end
|
179
|
+
elsif value.respond_to? :to_hash
|
180
|
+
value.to_hash
|
181
|
+
else
|
182
|
+
value
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
end
|
@@ -0,0 +1,188 @@
|
|
1
|
+
=begin
|
2
|
+
#EVE Swagger Interface
|
3
|
+
|
4
|
+
#An OpenAPI for EVE Online
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.4.7
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module ESIClient
|
15
|
+
# Internal server error
|
16
|
+
class GetCharactersCharacterIdOnlineInternalServerError
|
17
|
+
# Internal server error message
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'error' => :'error'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
:'error' => :'String'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Initializes the object
|
36
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
|
+
|
43
|
+
if attributes.has_key?(:'error')
|
44
|
+
self.error = attributes[:'error']
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
50
|
+
# @return Array for valid properies with the reasons
|
51
|
+
def list_invalid_properties
|
52
|
+
invalid_properties = Array.new
|
53
|
+
return invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
return true
|
60
|
+
end
|
61
|
+
|
62
|
+
# Checks equality by comparing each attribute.
|
63
|
+
# @param [Object] Object to be compared
|
64
|
+
def ==(o)
|
65
|
+
return true if self.equal?(o)
|
66
|
+
self.class == o.class &&
|
67
|
+
error == o.error
|
68
|
+
end
|
69
|
+
|
70
|
+
# @see the `==` method
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def eql?(o)
|
73
|
+
self == o
|
74
|
+
end
|
75
|
+
|
76
|
+
# Calculates hash code according to all attributes.
|
77
|
+
# @return [Fixnum] Hash code
|
78
|
+
def hash
|
79
|
+
[error].hash
|
80
|
+
end
|
81
|
+
|
82
|
+
# Builds the object from hash
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
# @return [Object] Returns the model itself
|
85
|
+
def build_from_hash(attributes)
|
86
|
+
return nil unless attributes.is_a?(Hash)
|
87
|
+
self.class.swagger_types.each_pair do |key, type|
|
88
|
+
if type =~ /\AArray<(.*)>/i
|
89
|
+
# check to ensure the input is an array given that the the attribute
|
90
|
+
# is documented as an array but the input is not
|
91
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
92
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
93
|
+
end
|
94
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
95
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
96
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
97
|
+
end
|
98
|
+
|
99
|
+
self
|
100
|
+
end
|
101
|
+
|
102
|
+
# Deserializes the data based on type
|
103
|
+
# @param string type Data type
|
104
|
+
# @param string value Value to be deserialized
|
105
|
+
# @return [Object] Deserialized data
|
106
|
+
def _deserialize(type, value)
|
107
|
+
case type.to_sym
|
108
|
+
when :DateTime
|
109
|
+
DateTime.parse(value)
|
110
|
+
when :Date
|
111
|
+
Date.parse(value)
|
112
|
+
when :String
|
113
|
+
value.to_s
|
114
|
+
when :Integer
|
115
|
+
value.to_i
|
116
|
+
when :Float
|
117
|
+
value.to_f
|
118
|
+
when :BOOLEAN
|
119
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
120
|
+
true
|
121
|
+
else
|
122
|
+
false
|
123
|
+
end
|
124
|
+
when :Object
|
125
|
+
# generic object (usually a Hash), return directly
|
126
|
+
value
|
127
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
128
|
+
inner_type = Regexp.last_match[:inner_type]
|
129
|
+
value.map { |v| _deserialize(inner_type, v) }
|
130
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
131
|
+
k_type = Regexp.last_match[:k_type]
|
132
|
+
v_type = Regexp.last_match[:v_type]
|
133
|
+
{}.tap do |hash|
|
134
|
+
value.each do |k, v|
|
135
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
else # model
|
139
|
+
temp_model = ESIClient.const_get(type).new
|
140
|
+
temp_model.build_from_hash(value)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# Returns the string representation of the object
|
145
|
+
# @return [String] String presentation of the object
|
146
|
+
def to_s
|
147
|
+
to_hash.to_s
|
148
|
+
end
|
149
|
+
|
150
|
+
# to_body is an alias to to_hash (backward compatibility)
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
152
|
+
def to_body
|
153
|
+
to_hash
|
154
|
+
end
|
155
|
+
|
156
|
+
# Returns the object in the form of hash
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
158
|
+
def to_hash
|
159
|
+
hash = {}
|
160
|
+
self.class.attribute_map.each_pair do |attr, param|
|
161
|
+
value = self.send(attr)
|
162
|
+
next if value.nil?
|
163
|
+
hash[param] = _to_hash(value)
|
164
|
+
end
|
165
|
+
hash
|
166
|
+
end
|
167
|
+
|
168
|
+
# Outputs non-array value in the form of hash
|
169
|
+
# For object, use to_hash. Otherwise, just return the value
|
170
|
+
# @param [Object] value Any valid value
|
171
|
+
# @return [Hash] Returns the value in the form of hash
|
172
|
+
def _to_hash(value)
|
173
|
+
if value.is_a?(Array)
|
174
|
+
value.compact.map{ |v| _to_hash(v) }
|
175
|
+
elsif value.is_a?(Hash)
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
178
|
+
end
|
179
|
+
elsif value.respond_to? :to_hash
|
180
|
+
value.to_hash
|
181
|
+
else
|
182
|
+
value
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
end
|
data/lib/esi_client/version.rb
CHANGED
@@ -0,0 +1,41 @@
|
|
1
|
+
=begin
|
2
|
+
#EVE Swagger Interface
|
3
|
+
|
4
|
+
#An OpenAPI for EVE Online
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.4.7
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'spec_helper'
|
13
|
+
require 'json'
|
14
|
+
require 'date'
|
15
|
+
|
16
|
+
# Unit tests for ESIClient::GetCharactersCharacterIdOnlineForbidden
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'GetCharactersCharacterIdOnlineForbidden' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = ESIClient::GetCharactersCharacterIdOnlineForbidden.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of GetCharactersCharacterIdOnlineForbidden' do
|
30
|
+
it 'should create an instact of GetCharactersCharacterIdOnlineForbidden' do
|
31
|
+
expect(@instance).to be_instance_of(ESIClient::GetCharactersCharacterIdOnlineForbidden)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
describe 'test attribute "error"' do
|
35
|
+
it 'should work' do
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
=begin
|
2
|
+
#EVE Swagger Interface
|
3
|
+
|
4
|
+
#An OpenAPI for EVE Online
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.4.7
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'spec_helper'
|
13
|
+
require 'json'
|
14
|
+
require 'date'
|
15
|
+
|
16
|
+
# Unit tests for ESIClient::GetCharactersCharacterIdOnlineInternalServerError
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'GetCharactersCharacterIdOnlineInternalServerError' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = ESIClient::GetCharactersCharacterIdOnlineInternalServerError.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of GetCharactersCharacterIdOnlineInternalServerError' do
|
30
|
+
it 'should create an instact of GetCharactersCharacterIdOnlineInternalServerError' do
|
31
|
+
expect(@instance).to be_instance_of(ESIClient::GetCharactersCharacterIdOnlineInternalServerError)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
describe 'test attribute "error"' do
|
35
|
+
it 'should work' do
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esi_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swagger-Codegen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -324,6 +324,8 @@ files:
|
|
324
324
|
- docs/GetCharactersCharacterIdMedalsInternalServerError.md
|
325
325
|
- docs/GetCharactersCharacterIdNotFound.md
|
326
326
|
- docs/GetCharactersCharacterIdOk.md
|
327
|
+
- docs/GetCharactersCharacterIdOnlineForbidden.md
|
328
|
+
- docs/GetCharactersCharacterIdOnlineInternalServerError.md
|
327
329
|
- docs/GetCharactersCharacterIdOpportunities200Ok.md
|
328
330
|
- docs/GetCharactersCharacterIdOpportunitiesForbidden.md
|
329
331
|
- docs/GetCharactersCharacterIdOpportunitiesInternalServerError.md
|
@@ -651,6 +653,7 @@ files:
|
|
651
653
|
- docs/WarsApi.md
|
652
654
|
- esi_client-0.4.6.gem
|
653
655
|
- esi_client-0.4.7.gem
|
656
|
+
- esi_client-1.0.1.gem
|
654
657
|
- esi_client.gemspec
|
655
658
|
- git_push.sh
|
656
659
|
- lib/esi_client.rb
|
@@ -798,6 +801,8 @@ files:
|
|
798
801
|
- lib/esi_client/models/get_characters_character_id_medals_internal_server_error.rb
|
799
802
|
- lib/esi_client/models/get_characters_character_id_not_found.rb
|
800
803
|
- lib/esi_client/models/get_characters_character_id_ok.rb
|
804
|
+
- lib/esi_client/models/get_characters_character_id_online_forbidden.rb
|
805
|
+
- lib/esi_client/models/get_characters_character_id_online_internal_server_error.rb
|
801
806
|
- lib/esi_client/models/get_characters_character_id_opportunities_200_ok.rb
|
802
807
|
- lib/esi_client/models/get_characters_character_id_opportunities_forbidden.rb
|
803
808
|
- lib/esi_client/models/get_characters_character_id_opportunities_internal_server_error.rb
|
@@ -1248,6 +1253,8 @@ files:
|
|
1248
1253
|
- spec/models/get_characters_character_id_medals_internal_server_error_spec.rb
|
1249
1254
|
- spec/models/get_characters_character_id_not_found_spec.rb
|
1250
1255
|
- spec/models/get_characters_character_id_ok_spec.rb
|
1256
|
+
- spec/models/get_characters_character_id_online_forbidden_spec.rb
|
1257
|
+
- spec/models/get_characters_character_id_online_internal_server_error_spec.rb
|
1251
1258
|
- spec/models/get_characters_character_id_opportunities_200_ok_spec.rb
|
1252
1259
|
- spec/models/get_characters_character_id_opportunities_forbidden_spec.rb
|
1253
1260
|
- spec/models/get_characters_character_id_opportunities_internal_server_error_spec.rb
|
@@ -1723,6 +1730,8 @@ test_files:
|
|
1723
1730
|
- spec/models/get_characters_character_id_medals_internal_server_error_spec.rb
|
1724
1731
|
- spec/models/get_characters_character_id_not_found_spec.rb
|
1725
1732
|
- spec/models/get_characters_character_id_ok_spec.rb
|
1733
|
+
- spec/models/get_characters_character_id_online_forbidden_spec.rb
|
1734
|
+
- spec/models/get_characters_character_id_online_internal_server_error_spec.rb
|
1726
1735
|
- spec/models/get_characters_character_id_opportunities_200_ok_spec.rb
|
1727
1736
|
- spec/models/get_characters_character_id_opportunities_forbidden_spec.rb
|
1728
1737
|
- spec/models/get_characters_character_id_opportunities_internal_server_error_spec.rb
|