api_connect_client 0.1.2 → 0.2.0
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 +5 -5
- data/.gitignore +1 -2
- data/.travis.yml +9 -1
- data/Gemfile.lock +41 -2
- data/README.md +13 -2
- data/api_connect_client.gemspec +6 -0
- data/lib/api_connect_client/api.rb +19 -0
- data/lib/api_connect_client/version.rb +2 -2
- data/lib/api_connect_client.rb +1 -0
- metadata +88 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: d5b820368e3fd95d4158f69110437ae5131e4214dc89fe9e57a8f07634fcb7ed
|
|
4
|
+
data.tar.gz: 66e1fe15b757fcaed60ff181f75f28fdb7ec313032f77929b241e51e7745b14b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39aff90f4a4e0c7c8b74689f2d0f15b22b3ec25811d844e3ca50903ceae644f283c840a858662a5e7e966e4ddd24b2fe3af83e5fdaff9cb80c635b69fa3b7f6d
|
|
7
|
+
data.tar.gz: 1ecfc20c8a80c688820e6742e0f2fa78882e4ea37c43ef6d296853bf74ce006baca2420f264f9dfeb0dae2e8780d85df955d8422157cc6622d63fd00d58a2f1f
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
sudo: false
|
|
2
2
|
language: ruby
|
|
3
3
|
rvm:
|
|
4
|
-
|
|
4
|
+
- 2.3.3
|
|
5
5
|
before_install: gem install bundler -v 1.16.0.pre.2
|
|
6
|
+
deploy:
|
|
7
|
+
provider: rubygems
|
|
8
|
+
api_key:
|
|
9
|
+
secure: EGxw9J15avbiDJsAXw6hJiW5WN1FAzLmkOcM2rvAUWCNWUqWa8HvfgYyxmK8TmSRkj9zEyxBBFM03qTdNGxtFNetT1FUNM7Jo9t0bpDgKc3cmZxGRDVj96dTP2LRUIci4p69jmTXTOANnRAmOd0+/C4IOqUDAdXZ4YRnCTzP/80DC0V/AJ8NCNabPYfKiP7X0I7FfIP02ftrozanVTeNrAZqSo43N6bmiJp49MZDXPfUNnvV45D69G9GmhHqv91fvo7HrqL2qE5EkEr67MzHSJ2pwNpSG14zEqIuvmhZ3NXP67Oxil8SaJv4dtTe1Huo2jVC1CXllO25LoQDnGVQy4o2IGIcmHI5qhO6EVXhN8Q+sOTjlO+289jXLkGx7yHmsjRTXwk/1NZ+VU4jn8mR2tH0IGWH2bLsiDzZ3LdA29Nx5gdDUlHrwgHqW1AqPaqQLuiVSFx8EyuX/dJAxdorC2osRbGmRnC7Gz0MmrQ8uRDEDhBBniRn699NNrJ1+DaNN6izwvEfMRDMaEVVNxFv9clyPh1wVKQp5WGK5YXY9nPd05A+cVfyOgLKmP9PVsDo7xnNAt+RWgU7Yk9eSeKuzUffWtiSClSIPpyg/I7hK36s/n/pDDUSrN1K9nzGpvyGP6DDx++1SnppLjBEZlT2H9Ry9HzbGIN8LPXDwjFmhk4=
|
|
10
|
+
gem: api_connect_client
|
|
11
|
+
on:
|
|
12
|
+
tags: true
|
|
13
|
+
repo: cffiebigc/api-connect-client
|
data/Gemfile.lock
CHANGED
|
@@ -1,19 +1,58 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
api_connect_client (0.
|
|
5
|
-
json (>= 2.1.0)
|
|
4
|
+
api_connect_client (0.2.0)
|
|
5
|
+
json (~> 2.1, >= 2.1.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
+
addressable (2.5.2)
|
|
11
|
+
public_suffix (>= 2.0.2, < 4.0)
|
|
12
|
+
coderay (1.1.2)
|
|
13
|
+
crack (0.4.3)
|
|
14
|
+
safe_yaml (~> 1.0.0)
|
|
15
|
+
diff-lcs (1.3)
|
|
16
|
+
dotenv (2.2.1)
|
|
17
|
+
hashdiff (0.3.7)
|
|
10
18
|
json (2.1.0)
|
|
19
|
+
method_source (0.9.0)
|
|
20
|
+
pry (0.11.3)
|
|
21
|
+
coderay (~> 1.1.0)
|
|
22
|
+
method_source (~> 0.9.0)
|
|
23
|
+
public_suffix (3.0.2)
|
|
24
|
+
rake (12.3.0)
|
|
25
|
+
rspec (3.7.0)
|
|
26
|
+
rspec-core (~> 3.7.0)
|
|
27
|
+
rspec-expectations (~> 3.7.0)
|
|
28
|
+
rspec-mocks (~> 3.7.0)
|
|
29
|
+
rspec-core (3.7.1)
|
|
30
|
+
rspec-support (~> 3.7.0)
|
|
31
|
+
rspec-expectations (3.7.0)
|
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
33
|
+
rspec-support (~> 3.7.0)
|
|
34
|
+
rspec-mocks (3.7.0)
|
|
35
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
36
|
+
rspec-support (~> 3.7.0)
|
|
37
|
+
rspec-support (3.7.1)
|
|
38
|
+
safe_yaml (1.0.4)
|
|
39
|
+
vcr (4.0.0)
|
|
40
|
+
webmock (3.3.0)
|
|
41
|
+
addressable (>= 2.3.6)
|
|
42
|
+
crack (>= 0.3.2)
|
|
43
|
+
hashdiff
|
|
11
44
|
|
|
12
45
|
PLATFORMS
|
|
13
46
|
ruby
|
|
14
47
|
|
|
15
48
|
DEPENDENCIES
|
|
16
49
|
api_connect_client!
|
|
50
|
+
dotenv (~> 2.2)
|
|
51
|
+
pry (~> 0.11)
|
|
52
|
+
rake (~> 12.3)
|
|
53
|
+
rspec (~> 3.7)
|
|
54
|
+
vcr (~> 4.0)
|
|
55
|
+
webmock (~> 3.3)
|
|
17
56
|
|
|
18
57
|
BUNDLED WITH
|
|
19
58
|
1.16.1
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
[](https://badge.fury.io/rb/api_connect_client)
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
# Api Connect Client [](https://travis-ci.org/cffiebigc/api-connect-client) [](https://badge.fury.io/rb/api_connect_client)
|
|
4
4
|
|
|
5
5
|
This gem is used to interact with the [Developer Portal REST APIs](https://www.ibm.com/support/knowledgecenter/en/SSFS6T/com.ibm.apic.apirest.doc/dev_portal_apis.html)
|
|
6
6
|
to perform some of the operations that are normally carried out in the Developer Portal UI.
|
|
@@ -53,6 +53,7 @@ Once you have configured your context you can interact with the APIs in two diff
|
|
|
53
53
|
* Update application information
|
|
54
54
|
* Update application credentials
|
|
55
55
|
* Subscribe application to a plan
|
|
56
|
+
* List public APIs and a specific swagger spec
|
|
56
57
|
|
|
57
58
|
### Initialize manager
|
|
58
59
|
|
|
@@ -166,6 +167,16 @@ developer.update_application_credentials(app_id, client_id, client_secret)
|
|
|
166
167
|
developer.subscribe_application(app_id, product_id, plan = 'default')
|
|
167
168
|
```
|
|
168
169
|
|
|
170
|
+
#### List API and a specific swagger spec
|
|
171
|
+
```ruby
|
|
172
|
+
api.list_public_apis
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
```ruby
|
|
176
|
+
api.get_swagger_from_public_api "5a956c490cf23b2cf8eacfbe"
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
|
|
169
180
|
## Development
|
|
170
181
|
|
|
171
182
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/api_connect_client.gemspec
CHANGED
|
@@ -22,6 +22,12 @@ Gem::Specification.new do |spec|
|
|
|
22
22
|
spec.required_ruby_version = '>= 2.3.0'
|
|
23
23
|
|
|
24
24
|
spec.add_runtime_dependency "json", '~> 2.1', '>= 2.1.0'
|
|
25
|
+
spec.add_development_dependency "rspec", '~> 3.7'
|
|
26
|
+
spec.add_development_dependency "pry", '~> 0.11'
|
|
27
|
+
spec.add_development_dependency "webmock", '~> 3.3'
|
|
28
|
+
spec.add_development_dependency "vcr", '~> 4.0'
|
|
29
|
+
spec.add_development_dependency "dotenv", '~> 2.2'
|
|
30
|
+
spec.add_development_dependency "rake", '~> 12.3'
|
|
25
31
|
|
|
26
32
|
spec.requirements << 'IBM Cloud account (a.k.a bluemix)'
|
|
27
33
|
spec.requirements << 'Api Connect product in IBM Cloud'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module ApiConnectClient
|
|
2
|
+
class Api < Base
|
|
3
|
+
def initialize
|
|
4
|
+
super()
|
|
5
|
+
@headers = {
|
|
6
|
+
'X-IBM-APIManagement-Context': ApiConnectClient::Config.context
|
|
7
|
+
}
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def list_public_apis
|
|
11
|
+
get('/apis')
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def get_swagger_from_public_api(apiID)
|
|
15
|
+
get("/apis/#{apiID}")
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module ApiConnectClient
|
|
2
|
-
VERSION = '0.
|
|
3
|
-
end
|
|
2
|
+
VERSION = '0.2.0'
|
|
3
|
+
end
|
data/lib/api_connect_client.rb
CHANGED
|
@@ -7,5 +7,6 @@ module ApiConnectClient
|
|
|
7
7
|
require_relative './api_connect_client/application'
|
|
8
8
|
require_relative './api_connect_client/manager'
|
|
9
9
|
require_relative './api_connect_client/developer'
|
|
10
|
+
require_relative './api_connect_client/api'
|
|
10
11
|
require_relative './api_connect_client/config'
|
|
11
12
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: api_connect_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carlos Fiebig
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-03-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|
|
@@ -30,6 +30,90 @@ dependencies:
|
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: 2.1.0
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: rspec
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '3.7'
|
|
40
|
+
type: :development
|
|
41
|
+
prerelease: false
|
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '3.7'
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
48
|
+
name: pry
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0.11'
|
|
54
|
+
type: :development
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '0.11'
|
|
61
|
+
- !ruby/object:Gem::Dependency
|
|
62
|
+
name: webmock
|
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '3.3'
|
|
68
|
+
type: :development
|
|
69
|
+
prerelease: false
|
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - "~>"
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '3.3'
|
|
75
|
+
- !ruby/object:Gem::Dependency
|
|
76
|
+
name: vcr
|
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - "~>"
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '4.0'
|
|
82
|
+
type: :development
|
|
83
|
+
prerelease: false
|
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - "~>"
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '4.0'
|
|
89
|
+
- !ruby/object:Gem::Dependency
|
|
90
|
+
name: dotenv
|
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - "~>"
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '2.2'
|
|
96
|
+
type: :development
|
|
97
|
+
prerelease: false
|
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - "~>"
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: '2.2'
|
|
103
|
+
- !ruby/object:Gem::Dependency
|
|
104
|
+
name: rake
|
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - "~>"
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: '12.3'
|
|
110
|
+
type: :development
|
|
111
|
+
prerelease: false
|
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - "~>"
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '12.3'
|
|
33
117
|
description: Manager and Developer from IBM Api Connect to interact with te developer
|
|
34
118
|
portal REST APIs
|
|
35
119
|
email:
|
|
@@ -50,6 +134,7 @@ files:
|
|
|
50
134
|
- bin/console
|
|
51
135
|
- bin/setup
|
|
52
136
|
- lib/api_connect_client.rb
|
|
137
|
+
- lib/api_connect_client/api.rb
|
|
53
138
|
- lib/api_connect_client/application.rb
|
|
54
139
|
- lib/api_connect_client/base.rb
|
|
55
140
|
- lib/api_connect_client/config.rb
|
|
@@ -81,7 +166,7 @@ requirements:
|
|
|
81
166
|
- Api Connect product in IBM Cloud
|
|
82
167
|
- Products catalog (local registry or authentication)
|
|
83
168
|
rubyforge_project:
|
|
84
|
-
rubygems_version: 2.
|
|
169
|
+
rubygems_version: 2.7.6
|
|
85
170
|
signing_key:
|
|
86
171
|
specification_version: 4
|
|
87
172
|
summary: Client to interact with IBM Api Connect
|