netilion 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/ruby.yml +22 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +74 -0
- data/.ruby-version +1 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +155 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/netilion.rb +53 -0
- data/lib/netilion/api_key.rb +12 -0
- data/lib/netilion/api_subscription.rb +13 -0
- data/lib/netilion/asset.rb +18 -0
- data/lib/netilion/asset_health_condition.rb +13 -0
- data/lib/netilion/asset_status.rb +17 -0
- data/lib/netilion/asset_value.rb +12 -0
- data/lib/netilion/attachment.rb +12 -0
- data/lib/netilion/authentication.rb +15 -0
- data/lib/netilion/bill_of_material.rb +10 -0
- data/lib/netilion/client_application.rb +13 -0
- data/lib/netilion/company.rb +12 -0
- data/lib/netilion/delivery.rb +14 -0
- data/lib/netilion/delivery_status.rb +12 -0
- data/lib/netilion/document.rb +14 -0
- data/lib/netilion/document_category.rb +13 -0
- data/lib/netilion/document_classification.rb +12 -0
- data/lib/netilion/document_status.rb +12 -0
- data/lib/netilion/edm.rb +6 -0
- data/lib/netilion/edm/edge_device.rb +23 -0
- data/lib/netilion/edm/edge_device_status.rb +19 -0
- data/lib/netilion/edm/edge_device_type.rb +19 -0
- data/lib/netilion/edm/field_gateway.rb +22 -0
- data/lib/netilion/edm/field_gateway_status.rb +19 -0
- data/lib/netilion/edm/field_gateway_type.rb +19 -0
- data/lib/netilion/edm/network_interface.rb +19 -0
- data/lib/netilion/edm/record.rb +8 -0
- data/lib/netilion/edm/software_image.rb +20 -0
- data/lib/netilion/edm/software_image_type.rb +19 -0
- data/lib/netilion/edm/software_version.rb +21 -0
- data/lib/netilion/edm/software_version_status.rb +19 -0
- data/lib/netilion/edm/specification.rb +12 -0
- data/lib/netilion/edm/update_schedule.rb +21 -0
- data/lib/netilion/edm/update_schedule_status.rb +19 -0
- data/lib/netilion/event.rb +14 -0
- data/lib/netilion/event_status.rb +12 -0
- data/lib/netilion/event_type.rb +12 -0
- data/lib/netilion/extended_order_code_lookup.rb +7 -0
- data/lib/netilion/health_condition.rb +13 -0
- data/lib/netilion/health_condition_cause.rb +10 -0
- data/lib/netilion/health_condition_remedy.rb +10 -0
- data/lib/netilion/instrumentation.rb +15 -0
- data/lib/netilion/instrumentation_status.rb +12 -0
- data/lib/netilion/instrumentation_type.rb +13 -0
- data/lib/netilion/netilion.rb +6 -0
- data/lib/netilion/node.rb +14 -0
- data/lib/netilion/node_type.rb +12 -0
- data/lib/netilion/notification.rb +10 -0
- data/lib/netilion/permission.rb +14 -0
- data/lib/netilion/permission_request.rb +13 -0
- data/lib/netilion/product.rb +15 -0
- data/lib/netilion/product_category.rb +13 -0
- data/lib/netilion/product_lookup.rb +7 -0
- data/lib/netilion/product_status.rb +12 -0
- data/lib/netilion/purchase_order.rb +15 -0
- data/lib/netilion/purchase_order_status.rb +12 -0
- data/lib/netilion/quotation.rb +14 -0
- data/lib/netilion/quotation_status.rb +12 -0
- data/lib/netilion/record.rb +6 -0
- data/lib/netilion/request_for_quotation.rb +14 -0
- data/lib/netilion/request_for_quotation_status.rb +12 -0
- data/lib/netilion/search.rb +7 -0
- data/lib/netilion/specification.rb +13 -0
- data/lib/netilion/subscription.rb +15 -0
- data/lib/netilion/successor_lookup.rb +9 -0
- data/lib/netilion/tenant.rb +14 -0
- data/lib/netilion/threshold.rb +10 -0
- data/lib/netilion/unit.rb +12 -0
- data/lib/netilion/user.rb +10 -0
- data/lib/netilion/user_group.rb +10 -0
- data/lib/netilion/user_role.rb +12 -0
- data/lib/netilion/version.rb +5 -0
- data/netilion.gemspec +33 -0
- metadata +218 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Specification < LHS::Record
|
5
|
+
endpoint '{+api}/assets/{asset_id}/specifications'
|
6
|
+
endpoint '{+api}/events/{event_id}/specifications'
|
7
|
+
endpoint '{+api}/instrumentations/{instrumentation_id}/specifications'
|
8
|
+
endpoint '{+api}/nodes/{node_id}/specifications'
|
9
|
+
endpoint '{+api}/products/{product_id}/specifications'
|
10
|
+
endpoint '{+api}/subscriptions/{subscription_id}/specifications'
|
11
|
+
endpoint '{+api}/users/{user_id}/specifications'
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Subscription < LHS::Record
|
5
|
+
configuration items_key: :subscriptions
|
6
|
+
|
7
|
+
endpoint '{+api}/subscriptions'
|
8
|
+
endpoint '{+api}/subscriptions/{id}'
|
9
|
+
|
10
|
+
has_one :user, class_name: 'Netilion::User'
|
11
|
+
has_one :client_application, class_name: 'Netilion::ClientApplication'
|
12
|
+
has_one :successor, class_name: 'Netilion::Subscription'
|
13
|
+
has_one :predecessor, class_name: 'Netilion::Subscription'
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Tenant < LHS::Record
|
5
|
+
configuration items_key: :tenants,
|
6
|
+
pagination_strategy: :page,
|
7
|
+
pagination_key: { body: %w[pagination page], parameter: 'page' },
|
8
|
+
limit_key: { body: %w[pagination per_page], parameter: 'limit' },
|
9
|
+
total_key: %w[pagination total_count]
|
10
|
+
|
11
|
+
endpoint '{+api}/tenants'
|
12
|
+
endpoint '{+api}/tenants/{id}'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Netilion
|
4
|
+
class Threshold < LHS::Record
|
5
|
+
configuration items_key: :thresholds
|
6
|
+
|
7
|
+
endpoint '{+api}/instrumentations/{instrumentation_id}/thresholds'
|
8
|
+
endpoint '{+api}/instrumentations/{instrumentation_id}/thresholds/{id}'
|
9
|
+
end
|
10
|
+
end
|
data/netilion.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'netilion/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'netilion'
|
9
|
+
spec.version = Netilion::VERSION
|
10
|
+
spec.authors = ['Marco Roth', 'Valentino Rusconi']
|
11
|
+
spec.email = ['marco.roth@endress.com', 'valentino.rusconi@endress.com']
|
12
|
+
|
13
|
+
spec.summary = 'Ruby Wrapper for the Netilion Information Hub API'
|
14
|
+
spec.description = 'Ruby Wrapper for the Netilion Information Hub API'
|
15
|
+
spec.homepage = 'https://netilion.endress.com'
|
16
|
+
spec.license = 'MIT'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
f.match(%r{^(test|spec|features)/})
|
20
|
+
end
|
21
|
+
|
22
|
+
spec.bindir = 'exe'
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.add_dependency 'lhs', '>= 20.1', '< 25.0'
|
27
|
+
spec.add_dependency 'zeitwerk', '~> 2.2'
|
28
|
+
|
29
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
30
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
31
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
32
|
+
spec.add_development_dependency 'rubocop', '~> 0.74'
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,218 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: netilion
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marco Roth
|
8
|
+
- Valentino Rusconi
|
9
|
+
autorequire:
|
10
|
+
bindir: exe
|
11
|
+
cert_chain: []
|
12
|
+
date: 2021-02-16 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: lhs
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '20.1'
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '25.0'
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '20.1'
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '25.0'
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: zeitwerk
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.2'
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.2'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: bundler
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: minitest
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.0'
|
69
|
+
type: :development
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '5.0'
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rake
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '13.0'
|
83
|
+
type: :development
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '13.0'
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: rubocop
|
92
|
+
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.74'
|
97
|
+
type: :development
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.74'
|
104
|
+
description: Ruby Wrapper for the Netilion Information Hub API
|
105
|
+
email:
|
106
|
+
- marco.roth@endress.com
|
107
|
+
- valentino.rusconi@endress.com
|
108
|
+
executables: []
|
109
|
+
extensions: []
|
110
|
+
extra_rdoc_files: []
|
111
|
+
files:
|
112
|
+
- ".github/workflows/ruby.yml"
|
113
|
+
- ".gitignore"
|
114
|
+
- ".rubocop.yml"
|
115
|
+
- ".ruby-version"
|
116
|
+
- Gemfile
|
117
|
+
- LICENSE.txt
|
118
|
+
- README.md
|
119
|
+
- Rakefile
|
120
|
+
- bin/console
|
121
|
+
- bin/setup
|
122
|
+
- lib/netilion.rb
|
123
|
+
- lib/netilion/api_key.rb
|
124
|
+
- lib/netilion/api_subscription.rb
|
125
|
+
- lib/netilion/asset.rb
|
126
|
+
- lib/netilion/asset_health_condition.rb
|
127
|
+
- lib/netilion/asset_status.rb
|
128
|
+
- lib/netilion/asset_value.rb
|
129
|
+
- lib/netilion/attachment.rb
|
130
|
+
- lib/netilion/authentication.rb
|
131
|
+
- lib/netilion/bill_of_material.rb
|
132
|
+
- lib/netilion/client_application.rb
|
133
|
+
- lib/netilion/company.rb
|
134
|
+
- lib/netilion/delivery.rb
|
135
|
+
- lib/netilion/delivery_status.rb
|
136
|
+
- lib/netilion/document.rb
|
137
|
+
- lib/netilion/document_category.rb
|
138
|
+
- lib/netilion/document_classification.rb
|
139
|
+
- lib/netilion/document_status.rb
|
140
|
+
- lib/netilion/edm.rb
|
141
|
+
- lib/netilion/edm/edge_device.rb
|
142
|
+
- lib/netilion/edm/edge_device_status.rb
|
143
|
+
- lib/netilion/edm/edge_device_type.rb
|
144
|
+
- lib/netilion/edm/field_gateway.rb
|
145
|
+
- lib/netilion/edm/field_gateway_status.rb
|
146
|
+
- lib/netilion/edm/field_gateway_type.rb
|
147
|
+
- lib/netilion/edm/network_interface.rb
|
148
|
+
- lib/netilion/edm/record.rb
|
149
|
+
- lib/netilion/edm/software_image.rb
|
150
|
+
- lib/netilion/edm/software_image_type.rb
|
151
|
+
- lib/netilion/edm/software_version.rb
|
152
|
+
- lib/netilion/edm/software_version_status.rb
|
153
|
+
- lib/netilion/edm/specification.rb
|
154
|
+
- lib/netilion/edm/update_schedule.rb
|
155
|
+
- lib/netilion/edm/update_schedule_status.rb
|
156
|
+
- lib/netilion/event.rb
|
157
|
+
- lib/netilion/event_status.rb
|
158
|
+
- lib/netilion/event_type.rb
|
159
|
+
- lib/netilion/extended_order_code_lookup.rb
|
160
|
+
- lib/netilion/health_condition.rb
|
161
|
+
- lib/netilion/health_condition_cause.rb
|
162
|
+
- lib/netilion/health_condition_remedy.rb
|
163
|
+
- lib/netilion/instrumentation.rb
|
164
|
+
- lib/netilion/instrumentation_status.rb
|
165
|
+
- lib/netilion/instrumentation_type.rb
|
166
|
+
- lib/netilion/netilion.rb
|
167
|
+
- lib/netilion/node.rb
|
168
|
+
- lib/netilion/node_type.rb
|
169
|
+
- lib/netilion/notification.rb
|
170
|
+
- lib/netilion/permission.rb
|
171
|
+
- lib/netilion/permission_request.rb
|
172
|
+
- lib/netilion/product.rb
|
173
|
+
- lib/netilion/product_category.rb
|
174
|
+
- lib/netilion/product_lookup.rb
|
175
|
+
- lib/netilion/product_status.rb
|
176
|
+
- lib/netilion/purchase_order.rb
|
177
|
+
- lib/netilion/purchase_order_status.rb
|
178
|
+
- lib/netilion/quotation.rb
|
179
|
+
- lib/netilion/quotation_status.rb
|
180
|
+
- lib/netilion/record.rb
|
181
|
+
- lib/netilion/request_for_quotation.rb
|
182
|
+
- lib/netilion/request_for_quotation_status.rb
|
183
|
+
- lib/netilion/search.rb
|
184
|
+
- lib/netilion/specification.rb
|
185
|
+
- lib/netilion/subscription.rb
|
186
|
+
- lib/netilion/successor_lookup.rb
|
187
|
+
- lib/netilion/tenant.rb
|
188
|
+
- lib/netilion/threshold.rb
|
189
|
+
- lib/netilion/unit.rb
|
190
|
+
- lib/netilion/user.rb
|
191
|
+
- lib/netilion/user_group.rb
|
192
|
+
- lib/netilion/user_role.rb
|
193
|
+
- lib/netilion/version.rb
|
194
|
+
- netilion.gemspec
|
195
|
+
homepage: https://netilion.endress.com
|
196
|
+
licenses:
|
197
|
+
- MIT
|
198
|
+
metadata: {}
|
199
|
+
post_install_message:
|
200
|
+
rdoc_options: []
|
201
|
+
require_paths:
|
202
|
+
- lib
|
203
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - ">="
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: '0'
|
213
|
+
requirements: []
|
214
|
+
rubygems_version: 3.0.3
|
215
|
+
signing_key:
|
216
|
+
specification_version: 4
|
217
|
+
summary: Ruby Wrapper for the Netilion Information Hub API
|
218
|
+
test_files: []
|