minato_ruby_api_client 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -23
- data/Dockerfile +1 -1
- data/Gemfile +17 -17
- data/Gemfile.lock +402 -398
- data/README.md +54 -54
- data/Rakefile +10 -10
- data/compose.yml +11 -11
- data/lib/minato_ruby_api_client/api_client.rb +398 -389
- data/lib/minato_ruby_api_client/api_error.rb +16 -16
- data/lib/minato_ruby_api_client/configuration.rb +247 -247
- data/lib/minato_ruby_api_client/version.rb +3 -3
- data/lib/minato_ruby_api_client.rb +24 -24
- data/minato_ruby_api_client.gemspec +35 -35
- data/spec/api_client_spec.rb +42 -0
- data/spec/configuration_spec.rb +204 -204
- data/spec/minato_ruby_api_client_spec.rb +17 -17
- data/spec/spec_helper.rb +105 -105
- metadata +7 -40
- data/coverage/.last_run.json +0 -5
- data/coverage/.resultset.json +0 -1248
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_both.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
- data/coverage/assets/0.12.3/application.css +0 -1
- data/coverage/assets/0.12.3/application.js +0 -7
- data/coverage/assets/0.12.3/colorbox/border.png +0 -0
- data/coverage/assets/0.12.3/colorbox/controls.png +0 -0
- data/coverage/assets/0.12.3/colorbox/loading.gif +0 -0
- data/coverage/assets/0.12.3/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.12.3/favicon_green.png +0 -0
- data/coverage/assets/0.12.3/favicon_red.png +0 -0
- data/coverage/assets/0.12.3/favicon_yellow.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/assets/0.12.3/loading.gif +0 -0
- data/coverage/assets/0.12.3/magnify.png +0 -0
- data/coverage/index.html +0 -13728
data/README.md
CHANGED
@@ -1,54 +1,54 @@
|
|
1
|
-
# Minato Ruby Api Client
|
2
|
-
|
3
|
-
The Minato ruby HTTP Client.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
### Install via command gem
|
8
|
-
|
9
|
-
gem install minato_ruby_api_client
|
10
|
-
|
11
|
-
|
12
|
-
### Install via Gemfile
|
13
|
-
|
14
|
-
gem 'minato_ruby_api_client'
|
15
|
-
|
16
|
-
### Install from Git
|
17
|
-
|
18
|
-
gem 'minato_ruby_api_client', git: 'https://gitlab.com/ferreri/minato/minato-ruby-api-client.git', ref: 'v0.2.
|
19
|
-
|
20
|
-
## Getting Started
|
21
|
-
|
22
|
-
Please follow the [installation](#installation) procedure and then run the following code:
|
23
|
-
|
24
|
-
```ruby
|
25
|
-
# Load the gem
|
26
|
-
require 'minato_ruby_api_client'
|
27
|
-
|
28
|
-
# Setup authorization via config
|
29
|
-
MinatoRubyApiClient.configure do |config|
|
30
|
-
# Configure API key
|
31
|
-
config.api_key['Your-Subscription-Key'] = 'YOUR API KEY'
|
32
|
-
# Configure base path
|
33
|
-
config.base_path = 'YOUR BASE PATH'
|
34
|
-
end
|
35
|
-
|
36
|
-
client = MinatoRubyApiClient::ApiClient.default
|
37
|
-
|
38
|
-
# All available options
|
39
|
-
opts = {
|
40
|
-
header_params: { 'Source' => 'Your Source' },
|
41
|
-
query_params: {}, # When does not have value you can ommit the option
|
42
|
-
form_params: {},
|
43
|
-
body: { email: 'test@email' },
|
44
|
-
auth_names: 'apikey',
|
45
|
-
return_type: 'Object' # To return a generic hash you must use 'Object', for other types see examples.
|
46
|
-
}
|
47
|
-
# dispatch request
|
48
|
-
data, status, headers = client.api_call(:post, '/v1/accounts', opts)
|
49
|
-
|
50
|
-
# data => 'Response body'
|
51
|
-
# status => 'Response status'
|
52
|
-
# headers => 'Response headers'
|
53
|
-
|
54
|
-
```
|
1
|
+
# Minato Ruby Api Client
|
2
|
+
|
3
|
+
The Minato ruby HTTP Client.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
### Install via command gem
|
8
|
+
|
9
|
+
gem install minato_ruby_api_client
|
10
|
+
|
11
|
+
|
12
|
+
### Install via Gemfile
|
13
|
+
|
14
|
+
gem 'minato_ruby_api_client'
|
15
|
+
|
16
|
+
### Install from Git
|
17
|
+
|
18
|
+
gem 'minato_ruby_api_client', git: 'https://gitlab.com/ferreri/minato/minato-ruby-api-client.git', ref: 'v0.2.3', glob: '*.gemspec'
|
19
|
+
|
20
|
+
## Getting Started
|
21
|
+
|
22
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
# Load the gem
|
26
|
+
require 'minato_ruby_api_client'
|
27
|
+
|
28
|
+
# Setup authorization via config
|
29
|
+
MinatoRubyApiClient.configure do |config|
|
30
|
+
# Configure API key
|
31
|
+
config.api_key['Your-Subscription-Key'] = 'YOUR API KEY'
|
32
|
+
# Configure base path
|
33
|
+
config.base_path = 'YOUR BASE PATH'
|
34
|
+
end
|
35
|
+
|
36
|
+
client = MinatoRubyApiClient::ApiClient.default
|
37
|
+
|
38
|
+
# All available options
|
39
|
+
opts = {
|
40
|
+
header_params: { 'Source' => 'Your Source' },
|
41
|
+
query_params: {}, # When does not have value you can ommit the option
|
42
|
+
form_params: {},
|
43
|
+
body: { email: 'test@email' },
|
44
|
+
auth_names: 'apikey',
|
45
|
+
return_type: 'Object' # To return a generic hash you must use 'Object', for other types see examples.
|
46
|
+
}
|
47
|
+
# dispatch request
|
48
|
+
data, status, headers = client.api_call(:post, '/v1/accounts', opts)
|
49
|
+
|
50
|
+
# data => 'Response body'
|
51
|
+
# status => 'Response status'
|
52
|
+
# headers => 'Response headers'
|
53
|
+
|
54
|
+
```
|
data/Rakefile
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'rspec/core/rake_task'
|
5
|
-
|
6
|
-
RSpec::Core::RakeTask.new(:spec)
|
7
|
-
task default: :spec
|
8
|
-
rescue LoadError
|
9
|
-
# no rspec available
|
10
|
-
end
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
task default: :spec
|
8
|
+
rescue LoadError
|
9
|
+
# no rspec available
|
10
|
+
end
|
data/compose.yml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
services:
|
2
|
-
minato-ruby-api-client:
|
3
|
-
environment:
|
4
|
-
GITLAB_AUTH_TOKEN: ${GITLAB_AUTH_TOKEN}
|
5
|
-
build: .
|
6
|
-
volumes:
|
7
|
-
- .:/usr/src/api
|
8
|
-
- bundle:/home/rails/.bundle
|
9
|
-
|
10
|
-
volumes:
|
11
|
-
bundle:
|
1
|
+
services:
|
2
|
+
minato-ruby-api-client:
|
3
|
+
environment:
|
4
|
+
GITLAB_AUTH_TOKEN: ${GITLAB_AUTH_TOKEN}
|
5
|
+
build: .
|
6
|
+
volumes:
|
7
|
+
- .:/usr/src/api
|
8
|
+
- bundle:/home/rails/.bundle
|
9
|
+
|
10
|
+
volumes:
|
11
|
+
bundle:
|