lm_rest 1.0.2 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f137a994d6ddab31ee6c1a76ccae930bc24f12cecd4c730b1ca0c01976e5b664
4
- data.tar.gz: 1e0a0244811c50863ff54b4595bf3ad3405c7ec9b3507b8a53416526eb042b09
3
+ metadata.gz: 9b62108ac0ae79610c225c5af3a0786fc20e2e8e5a6834e9eac3de9029984f25
4
+ data.tar.gz: 2fadc9fe2120160c4d49e9bdb77b729f235c312b9c63363a46d7dbef0a7ae0d5
5
5
  SHA512:
6
- metadata.gz: d54b5b7596fad51d9b380b2ddf65ba1783b9976fa30b2b1f1089c9874ef23e2aa3c5d20c85081cd4bcdd7d960821d034160d6178e9322e06f0d4eadd8fa6216e
7
- data.tar.gz: 01db43bbf4e101b91b27253920bfb80437953bb23819c2d0b0b47612b61455d63e0f3d3ee49f3a4deebfc457ccd887c65827aeac47cc35c20226212c1536ab0c
6
+ metadata.gz: 33b396fea0c3e99de8fa68be8cd6e91af96e0d7b273accfcbdb5dc60c6dd993aff5a1efb1701eb69511afd2841ccd598d1b123c37913d4edc0fc31898d9897ca
7
+ data.tar.gz: 7f33737751f03dab145f01ec2703ea50082f963875d7a1dec27f8f8fbd89ff6678a432585eb1114d8bd67adc77fcabea6915c94d6e6ebd4b1caf71a49d57d8c3
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # LMRest
2
2
 
3
- A Ruby gem for the LogicMonitor REST API.
3
+ An Unofficial Ruby gem for the LogicMonitor REST API.
4
4
 
5
5
  ## Installation
6
6
 
@@ -20,8 +20,8 @@ Or install it yourself as:
20
20
 
21
21
  ## Supported API Resources
22
22
 
23
- Every API resource defined in the `api.json` file and its associated defined
24
- methods are supported, and you can easily add your own if you can't wait for me
23
+ Every API resource is defined in the `api.json` file and its associated defined
24
+ methods are supported. You can easily add your own if you can't wait for me
25
25
  to update this.
26
26
 
27
27
  Each method (`get_*, add_*, update_*, delete_*`) works the same
@@ -45,21 +45,10 @@ use the gem.
45
45
  ```ruby
46
46
  require 'lm_rest'
47
47
 
48
+ # Create an instance of the API Client, passing in an API token for
49
+ # authentication. Pretend this portal is at `company.logicmonitor.com`:
48
50
 
49
- # Authenticate with an API token (preferred):
50
- credential = {company: 'company',
51
- access_key:'api_access_key',
52
- access_id:'api_access_id'}
53
-
54
-
55
- # Authenticate with Basic Auth (not preferred):
56
- credential = {company: 'company',
57
- user: 'user',
58
- password: 'password'}
59
-
60
- # Create an instance of the API Client
61
- lm = LMRest::APIClient.new(credential)
62
-
51
+ lm = LMRest::APIClient.new('company', 'access_id', 'access_key')
63
52
 
64
53
  # returns array of Resource objects
65
54
  lm.get_datasources
@@ -100,7 +89,6 @@ lm.delete_device(device)
100
89
  lm.add_device(device)
101
90
 
102
91
 
103
-
104
92
  # Get your Santaba version info
105
93
  lm.get_version
106
94
 
@@ -119,12 +107,9 @@ lm.run_report(id)
119
107
 
120
108
  ```
121
109
 
110
+ ## TODO
122
111
 
123
- ## Development
124
-
125
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
126
-
127
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
112
+ * Handle nested stuff, and resource-specific operations
128
113
 
129
114
 
130
115
  ## Contributing
data/api.json CHANGED
@@ -34,6 +34,28 @@
34
34
  "delete"
35
35
  ]
36
36
  },
37
+ "CollectorGroups": {
38
+ "url": "/setting/collector/groups",
39
+ "method_names": {
40
+ "singular": "collector_group",
41
+ "plural": "collector_groups"
42
+ },
43
+ "actions": [
44
+ "get",
45
+ "add",
46
+ "update",
47
+ "delete"
48
+ ]
49
+ },
50
+ "CollectorVersions": {
51
+ "url": "/setting/collector/collectors/versions",
52
+ "method_names": {
53
+ "singular": "collector_versions"
54
+ },
55
+ "actions": [
56
+ "get"
57
+ ]
58
+ },
37
59
  "Datasource": {
38
60
  "url": "/setting/datasources",
39
61
  "method_names": {
@@ -87,7 +109,7 @@
87
109
  "delete"
88
110
  ]
89
111
  },
90
- "Function": {
112
+ "AppliesToFunction": {
91
113
  "url": "/setting/functions",
92
114
  "method_names": {
93
115
  "singular": "function",
@@ -265,6 +287,19 @@
265
287
  ],
266
288
  "children": []
267
289
  },
290
+ "DashboardGroups": {
291
+ "url": "/dashboard/groups",
292
+ "method_names": {
293
+ "singular": "dashboard_group",
294
+ "plural": "dashboard_groups"
295
+ },
296
+ "actions": [
297
+ "get",
298
+ "add",
299
+ "update",
300
+ "delete"
301
+ ]
302
+ },
268
303
  "Widget": {
269
304
  "url": "/dashboard/widgets",
270
305
  "method_names": {
@@ -279,6 +314,17 @@
279
314
  ],
280
315
  "children": []
281
316
  },
317
+ "Debug": {
318
+ "url": "/debug",
319
+ "method_names": {
320
+ "singular": "debug"
321
+ },
322
+ "actions": [
323
+ "get",
324
+ "add"
325
+ ],
326
+ "children": []
327
+ },
282
328
  "Report": {
283
329
  "url": "/report/reports",
284
330
  "method_names": {
@@ -374,6 +420,15 @@
374
420
  "get"
375
421
  ]
376
422
  },
423
+ "APIPerfStats": {
424
+ "url": "/apiStats/externalApis",
425
+ "method_names": {
426
+ "singular": "api_perf_stats"
427
+ },
428
+ "actions": [
429
+ "get"
430
+ ]
431
+ },
377
432
  "Version": {
378
433
  "url": "/version",
379
434
  "method_names": {
@@ -1,3 +1,3 @@
1
1
  module LMRest
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
data/lm_rest.gemspec CHANGED
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'rake'
31
31
  spec.add_development_dependency 'minitest'
32
32
  spec.add_dependency 'rest-client'
33
- spec.add_dependency 'json', '~> 2.1.0'
33
+ spec.add_dependency 'json', '~> 2.5.1'
34
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lm_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Rodrigues
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-04 00:00:00.000000000 Z
11
+ date: 2021-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 2.1.0
75
+ version: 2.5.1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 2.1.0
82
+ version: 2.5.1
83
83
  description: Interact programmatically with your LogicMonitor account via the REST
84
84
  API.
85
85
  email:
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  requirements: []
127
- rubygems_version: 3.0.3
127
+ rubygems_version: 3.2.15
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: API Wrapper for LogicMonitor Rest API v2.