ruby-miradore 1.2.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0bd96940a4c4d640f0096d5a49e8adbee0df4e7992cd265ce230533ae94df59
4
- data.tar.gz: 645bb0e57c7c7b34ffed49641da01f9ca06a93ec061cc19b8e9e050c7039f3b1
3
+ metadata.gz: cb4ba7e4277e863fc78f676bab6f3de9e81704183b2da7fd4f33db2d5c38ffbf
4
+ data.tar.gz: f638a19ecb700c4f9d1372ef9e9a2415c58421ac9e0da25d42225fb0afb8f95a
5
5
  SHA512:
6
- metadata.gz: 46aea179dfa2b8297345caf2e07c863d1d7b1851af7bac1e4349d1b5b7654c8a7883cccd9a1ca4dd009c0cc9402793b1f3340a445af8e5eb9af75e96268b1b58
7
- data.tar.gz: bc4f5528e43eb569243e52502232c84073370b3d642ca95ac776a1578f2518b37bc6d736ee03334a4ab01e37e44fe0bdba1920566123690fa296e14453611fa6
6
+ metadata.gz: 31ceb104426bda37e161703f7e09dd229d971d223eb8c4a0564c24f989b0fc03199707c93ad1f063df39a7dafaaa8fe06f1c7edb1fbdc75e2a0ed0a2ce5093e9
7
+ data.tar.gz: 3ddcd3fdba05d363bcc70c1a447efcd67703725a337832911a5df5b7faa22f6bddc12008aacf906fd830bb227e05e8cb255a651b54d9aba8ce490c7ca7c123b4
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (1.2.0)
5
- crack (~> 0.4.5)
6
- finest-builder (~> 0.0.5)
7
- httparty (~> 0.18.1)
4
+ ruby-miradore (2.0.2)
5
+ crack (~> 0.4)
6
+ finest-builder (~> 1.0)
7
+ httparty (~> 0.18)
8
8
  rake (~> 13.0)
9
9
  rspec (~> 3.0)
10
10
  rubocop (~> 1.7)
@@ -12,27 +12,27 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- addressable (2.7.0)
15
+ addressable (2.8.0)
16
16
  public_suffix (>= 2.0.2, < 5.0)
17
17
  ast (2.4.2)
18
18
  crack (0.4.5)
19
19
  rexml
20
20
  diff-lcs (1.4.4)
21
- finest-builder (0.0.5)
21
+ finest-builder (1.0.1)
22
22
  hashdiff (1.0.1)
23
23
  httparty (0.18.1)
24
24
  mime-types (~> 3.0)
25
25
  multi_xml (>= 0.5.2)
26
26
  mime-types (3.3.1)
27
27
  mime-types-data (~> 3.2015)
28
- mime-types-data (3.2021.0225)
28
+ mime-types-data (3.2021.0704)
29
29
  multi_xml (0.6.0)
30
30
  parallel (1.20.1)
31
- parser (3.0.1.1)
31
+ parser (3.0.2.0)
32
32
  ast (~> 2.4.1)
33
33
  public_suffix (4.0.6)
34
34
  rainbow (3.0.0)
35
- rake (13.0.3)
35
+ rake (13.0.6)
36
36
  regexp_parser (2.1.1)
37
37
  rexml (3.2.5)
38
38
  rspec (3.10.0)
@@ -48,22 +48,22 @@ GEM
48
48
  diff-lcs (>= 1.2.0, < 2.0)
49
49
  rspec-support (~> 3.10.0)
50
50
  rspec-support (3.10.2)
51
- rubocop (1.14.0)
51
+ rubocop (1.19.0)
52
52
  parallel (~> 1.10)
53
53
  parser (>= 3.0.0.0)
54
54
  rainbow (>= 2.2.2, < 4.0)
55
55
  regexp_parser (>= 1.8, < 3.0)
56
56
  rexml
57
- rubocop-ast (>= 1.5.0, < 2.0)
57
+ rubocop-ast (>= 1.9.1, < 2.0)
58
58
  ruby-progressbar (~> 1.7)
59
59
  unicode-display_width (>= 1.4.0, < 3.0)
60
- rubocop-ast (1.5.0)
60
+ rubocop-ast (1.10.0)
61
61
  parser (>= 3.0.1.1)
62
62
  ruby-progressbar (1.11.0)
63
63
  unicode-display_width (2.0.0)
64
64
  vcr (6.0.0)
65
- webmock (3.12.2)
66
- addressable (>= 2.3.6)
65
+ webmock (3.14.0)
66
+ addressable (>= 2.8.0)
67
67
  crack (>= 0.3.2)
68
68
  hashdiff (>= 0.4.0, < 2.0.0)
69
69
 
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: patch
5
+ uri: https://rzilient.online.miradore.com/API/v2/Device/1/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"userEmailAddress":"eduard@rzilient.club"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ -
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Microsoft-IIS/10.0
27
+ X-Frame-Options:
28
+ - SAMEORIGIN
29
+ - SAMEORIGIN
30
+ Date:
31
+ - Tue, 17 Aug 2021 10:56:34 GMT
32
+ Content-Length:
33
+ - '0'
34
+ body:
35
+ encoding: UTF-8
36
+ string: ''
37
+ recorded_at: Tue, 17 Aug 2021 10:56:34 GMT
38
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: patch
5
+ uri: https://rzilient.online.miradore.com/API/v2/Device//
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"userEmailAddress":"eduard@rzilient.club"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ -
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 404
23
+ message: Not Found
24
+ headers:
25
+ Content-Type:
26
+ - text/plain
27
+ Server:
28
+ - Microsoft-IIS/10.0
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ - SAMEORIGIN
32
+ Date:
33
+ - Mon, 16 Aug 2021 14:51:21 GMT
34
+ Content-Length:
35
+ - '527'
36
+ body:
37
+ encoding: UTF-8
38
+ string: 'Status Code: 404; Not Found '
39
+ recorded_at: Mon, 16 Aug 2021 14:51:21 GMT
40
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: patch
5
+ uri: https://rzilient.online.miradore.com/API/v2/Device/1/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"userEmailAddress":"eduard@rzilient.club"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ -
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - Microsoft-IIS/10.0
27
+ X-Frame-Options:
28
+ - SAMEORIGIN
29
+ - SAMEORIGIN
30
+ Date:
31
+ - Mon, 16 Aug 2021 14:51:21 GMT
32
+ Content-Length:
33
+ - '0'
34
+ body:
35
+ encoding: UTF-8
36
+ string: ''
37
+ recorded_at: Mon, 16 Aug 2021 14:51:21 GMT
38
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://rzilient.online.miradore.com/API/v2/Device/1/location
6
+ body:
7
+ encoding: UTF-8
8
+ string: 'null'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ -
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Server:
28
+ - Microsoft-IIS/10.0
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ - SAMEORIGIN
32
+ Date:
33
+ - Mon, 16 Aug 2021 15:01:29 GMT
34
+ Content-Length:
35
+ - '172'
36
+ body:
37
+ encoding: UTF-8
38
+ string: '{"assetID":1,"latitude":"41.37583289607273","longitude":"2.1679468381906717","fixTime":"2021-05-15T08:28:44","streetAddress":null,"zipCode":null,"city":null,"country":null}'
39
+ recorded_at: Mon, 16 Aug 2021 15:01:29 GMT
40
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://rzilient.online.miradore.com/API/Device?auth=3_IHBPttQ.ub%5BOG27&filters=(InvDevice.SerialNumber%20eq%20C76TLUEMHG7F)&select=ID,*.*
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Cache-Control:
24
+ - no-cache
25
+ Pragma:
26
+ - no-cache
27
+ Content-Type:
28
+ - text/xml
29
+ Expires:
30
+ - "-1"
31
+ Vary:
32
+ - Accept-Encoding
33
+ Server:
34
+ - Microsoft-IIS/10.0
35
+ X-Aspnet-Version:
36
+ - 4.0.30319
37
+ X-Frame-Options:
38
+ - SAMEORIGIN
39
+ Date:
40
+ - Tue, 17 Aug 2021 10:56:29 GMT
41
+ Content-Length:
42
+ - '572'
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Device><ID>1</ID><User><ID>1</ID></User><Category><ID>1</ID></Category><Enrollment><ID>5</ID><User><ID>2</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>17.08.2021
46
+ 08:11:21</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>165</LastReportedMinutes><IPAddress>31.4.129.74</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><Client><ID>1</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>2</ID><ConfigProfile><ID>6</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><OSVersionName>iOS
47
+ 14.4.2</OSVersionName><Status>AutoGenerated</Status><Created>22.04.2021 06:33:20</Created><Modified>16.08.2021
48
+ 13:54:57</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
49
+ recorded_at: Tue, 17 Aug 2021 10:56:30 GMT
50
+ recorded_with: VCR 6.0.0
@@ -7,10 +7,12 @@ http_interactions:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
10
14
  Accept-Encoding:
11
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
16
  User-Agent:
15
17
  - Ruby
16
18
  response:
@@ -26,27 +28,21 @@ http_interactions:
26
28
  - text/xml
27
29
  Expires:
28
30
  - "-1"
31
+ Vary:
32
+ - Accept-Encoding
29
33
  Server:
30
34
  - Microsoft-IIS/10.0
31
35
  X-Aspnet-Version:
32
36
  - 4.0.30319
33
- X-Powered-By:
34
- - ASP.NET
35
37
  X-Frame-Options:
36
38
  - SAMEORIGIN
37
39
  Date:
38
- - Thu, 13 May 2021 15:14:47 GMT
40
+ - Mon, 16 Aug 2021 14:51:20 GMT
39
41
  Content-Length:
40
- - '1166'
42
+ - '1415'
41
43
  body:
42
- encoding: UTF-8
43
- string: '<?xml version="1.0" encoding="utf-8"?><Content><Items count="2"><Device><ID>1</ID><InvDevice><Model>Apple
44
- iPhone9,3</Model><Manufacturer>Apple</Manufacturer><ProductName>iPhone9,3</ProductName><SoftwareVersion>iOS
45
- 14.4.2</SoftwareVersion><SerialNumber>C76TLUEMHG7F</SerialNumber><IMEI>355332088433360</IMEI><WiFiMAC>d4:dc:cd:d6:09:be</WiFiMAC><BluetoothMAC>d4:dc:cd:d6:09:e1</BluetoothMAC><UDID>84c87a9edf0c577227b96dcbe7bf45713c358ede</UDID><StoreAccountActive>True</StoreAccountActive><DoNotDisturbActive>False</DoNotDisturbActive><DeviceType>MN8X2QL</DeviceType><EASIdentifier>LU1R1J5V0H73JCTEJ2A732LI8G</EASIdentifier><DeviceName>iPhone
46
- de: Eduard</DeviceName><InventoryTime>13.05.2021 14:18:41</InventoryTime></InvDevice></Device><Device><ID>2</ID><InvDevice><Model>ASUSTeK
47
- COMPUTER INC. VivoBook_ASUSLaptop X712FA_X712FA</Model><Manufacturer>ASUSTeK
48
- COMPUTER INC.</Manufacturer><ProductName>VivoBook_ASUSLaptop X712FA_X712FA</ProductName><SoftwareVersion>Windows
49
- 10 Home (20H2)</SoftwareVersion><SerialNumber>K8N0CV07315233B</SerialNumber><DeviceName>QUENTIN</DeviceName><InventoryTime>12.05.2021
50
- 12:30:16</InventoryTime></InvDevice></Device></Items></Content>'
51
- recorded_at: Thu, 13 May 2021 15:14:48 GMT
44
+ encoding: ASCII-8BIT
45
+ string: !binary |-
46
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48Q29udGVudD48SXRlbXMgY291bnQ9IjYiPjxEZXZpY2U+PElEPjE8L0lEPjxJbnZEZXZpY2U+PE1vZGVsPkFwcGxlIGlQaG9uZTksMzwvTW9kZWw+PE1hbnVmYWN0dXJlcj5BcHBsZTwvTWFudWZhY3R1cmVyPjxQcm9kdWN0TmFtZT5pUGhvbmU5LDM8L1Byb2R1Y3ROYW1lPjxTb2Z0d2FyZVZlcnNpb24+aU9TIDE0LjQuMjwvU29mdHdhcmVWZXJzaW9uPjxTZXJpYWxOdW1iZXI+Qzc2VExVRU1IRzdGPC9TZXJpYWxOdW1iZXI+PElNRUk+MzU1MzMyMDg4NDMzMzYwPC9JTUVJPjxXaUZpTUFDPmQ0OmRjOmNkOmQ2OjA5OmJlPC9XaUZpTUFDPjxCbHVldG9vdGhNQU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1ZTpiZTwvV2lGaU1BQz48Qmx1ZXRvb3RoTUFDPjMwLTM1LWFkLWI1LTVlLWJmPC9CbHVldG9vdGhNQUM+PFVESUQ+Q0U5RTlGRkItNUFFMS01MTYxLTg3Q0ItQTFCNEVBQjYyQTRCPC9VRElEPjxTdG9yZUFjY291bnRBY3RpdmU+RmFsc2U8L1N0b3JlQWNjb3VudEFjdGl2ZT48RGV2aWNlVHlwZT5NYWNCb29rQWlyNywyPC9EZXZpY2VUeXBlPjxEZXZpY2VOYW1lPk1hY0Jvb2sgQWlyIGRlIE5pZGFhPC9EZXZpY2VOYW1lPjxJbnZlbnRvcnlUaW1lPjI2LjA3LjIwMjEgMDc6MjU6NTA8L0ludmVudG9yeVRpbWU+PC9JbnZEZXZpY2U+PC9EZXZpY2U+PC9JdGVtcz48L0NvbnRlbnQ+
47
+ recorded_at: Mon, 16 Aug 2021 14:51:21 GMT
52
48
  recorded_with: VCR 6.0.0
@@ -5,14 +5,16 @@ http_interactions:
5
5
  uri: https://rzilient.online.miradore.com/API/v2/Device/1/lock
6
6
  body:
7
7
  encoding: UTF-8
8
- string: ''
8
+ string: 'null'
9
9
  headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
10
14
  X-Api-Key:
11
- - 3_IHBPttQ.ub[OG27
15
+ -
12
16
  Accept-Encoding:
13
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - "*/*"
16
18
  User-Agent:
17
19
  - Ruby
18
20
  response:
@@ -24,19 +26,15 @@ http_interactions:
24
26
  - application/json; charset=utf-8
25
27
  Server:
26
28
  - Microsoft-IIS/10.0
27
- X-Powered-By:
28
- - ARR/3.0
29
- - ASP.NET
30
- - ASP.NET
31
29
  X-Frame-Options:
32
30
  - SAMEORIGIN
33
31
  - SAMEORIGIN
34
32
  Date:
35
- - Thu, 13 May 2021 15:14:48 GMT
33
+ - Mon, 16 Aug 2021 14:51:20 GMT
36
34
  Content-Length:
37
35
  - '2'
38
36
  body:
39
37
  encoding: UTF-8
40
38
  string: '""'
41
- recorded_at: Thu, 13 May 2021 15:14:48 GMT
39
+ recorded_at: Mon, 16 Aug 2021 14:51:21 GMT
42
40
  recorded_with: VCR 6.0.0
@@ -2,15 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=&select=*,Category.*,InvDevice.*,InvStorage.*,InvOS.*,Enrollment.*,Client.*,User.*,Location.*,Security.*,ReportedLocation.*
5
+ uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=&select=ID,*.*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ -
10
16
  Accept-Encoding:
11
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
18
  User-Agent:
15
19
  - Ruby
16
20
  response:
@@ -26,45 +30,38 @@ http_interactions:
26
30
  - text/xml
27
31
  Expires:
28
32
  - "-1"
33
+ Vary:
34
+ - Accept-Encoding
29
35
  Server:
30
36
  - Microsoft-IIS/10.0
31
37
  X-Aspnet-Version:
32
38
  - 4.0.30319
33
- X-Powered-By:
34
- - ASP.NET
35
39
  X-Frame-Options:
36
40
  - SAMEORIGIN
37
41
  Date:
38
- - Thu, 13 May 2021 15:14:48 GMT
42
+ - Mon, 16 Aug 2021 14:51:21 GMT
39
43
  Content-Length:
40
- - '4613'
44
+ - '1318'
41
45
  body:
42
- encoding: UTF-8
43
- string: '<?xml version="1.0" encoding="utf-8"?><Content><Items count="2"><Device><ID>1</ID><User><ID>2</ID><Email>edugarcas@gmail.com</Email><Source>GUI</Source><Status>Active</Status><Created>22.04.2021
44
- 06:32:00</Created><Modified>22.04.2021 06:32:00</Modified></User><Category><ID>1</ID><Name>Smartphone</Name></Category><Enrollment><ID>5</ID><User><ID>2</ID></User><Created>22.04.2021
45
- 06:32:00</Created><Completed>22.04.2021 06:33:20</Completed><Type>Email</Type><Sender>eduard@rzilient.club</Sender></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>13.05.2021
46
- 15:14:15</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>0</LastReportedHours><LastReportedMinutes>0</LastReportedMinutes><IPAddress>46.25.48.185</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><Client><ID>1</ID><ManagementType>iOSUnsupervised</ManagementType></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>1</ID><ConfigProfile><ID>5</ID></ConfigProfile></ConfigProfileDeployment><ConfigProfileDeployment><ID>2</ID><ConfigProfile><ID>6</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><OSVersionName>iOS
47
- 14.4.2</OSVersionName><Status>AutoGenerated</Status><Created>22.04.2021 06:33:20</Created><Modified>27.04.2021
48
- 09:20:21</Modified><Source>MiradoreOnline</Source><InvDevice><Model>Apple
49
- iPhone9,3</Model><Manufacturer>Apple</Manufacturer><ProductName>iPhone9,3</ProductName><SoftwareVersion>iOS
50
- 14.4.2</SoftwareVersion><SerialNumber>C76TLUEMHG7F</SerialNumber><IMEI>355332088433360</IMEI><WiFiMAC>d4:dc:cd:d6:09:be</WiFiMAC><BluetoothMAC>d4:dc:cd:d6:09:e1</BluetoothMAC><UDID>84c87a9edf0c577227b96dcbe7bf45713c358ede</UDID><StoreAccountActive>True</StoreAccountActive><DoNotDisturbActive>False</DoNotDisturbActive><DeviceType>MN8X2QL</DeviceType><EASIdentifier>LU1R1J5V0H73JCTEJ2A732LI8G</EASIdentifier><DeviceName>iPhone
51
- de: Eduard</DeviceName><InventoryTime>13.05.2021 14:18:41</InventoryTime></InvDevice><InvStorages><InvStorage><Type>Internal</Type><FreeSpace>16310157685</FreeSpace><TotalSpace>34359738368</TotalSpace><InventoryTime>13.05.2021
52
- 14:18:41</InventoryTime></InvStorage></InvStorages><InvOS><Platform>iOS</Platform><Version>14.4.2</Version><Build>18D70</Build><InventoryTime>13.05.2021
53
- 14:18:41</InventoryTime></InvOS><Security><PasscodeSet>Yes</PasscodeSet><EncryptionStatus>Enabled</EncryptionStatus></Security><ReportedLocation><Latitude>41.39850887104272</Latitude><Longitude>2.163043615588689</Longitude><Provider>Unknown</Provider><FixTime>29.04.2021
54
- 13:55:02</FixTime><InventoryTime>29.04.2021 13:55:20</InventoryTime></ReportedLocation></Device><Device><ID>2</ID><User><ID>3</ID><Name>de
55
- Lambert Quentin</Name><Email>quentin@rzilient.club</Email><Firstname>Quentin</Firstname><Lastname>de
56
- Lambert</Lastname><Source>GUI</Source><Status>Active</Status><Created>22.04.2021
57
- 06:51:53</Created><Modified>22.04.2021 06:51:53</Modified></User><Enrollment><ID>9</ID><User><ID>3</ID></User><Created>29.04.2021
58
- 12:22:31</Created><Completed>29.04.2021 13:01:04</Completed><Type>Email</Type><Sender>eduard@rzilient.club</Sender></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>13.05.2021
59
- 12:30:02</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>3</LastReportedHours><LastReportedMinutes>164</LastReportedMinutes><IPAddress>46.27.180.174</IPAddress><MACAddress>DC:71:96:FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><Client><ID>2</ID><ManagementType>BuiltInMDM</ManagementType></Client><ConfigProfileDeployments
46
+ encoding: ASCII-8BIT
47
+ string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="6"><Device><ID>1</ID><User><ID>1</ID></User><Category><ID>1</ID></Category><Enrollment><ID>5</ID><User><ID>2</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>16.08.2021
48
+ 14:50:31</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>0</LastReportedHours><LastReportedMinutes>1</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><Client><ID>1</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>2</ID><ConfigProfile><ID>6</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><OSVersionName>iOS
49
+ 14.4.2</OSVersionName><Status>AutoGenerated</Status><Created>22.04.2021 06:33:20</Created><Modified>16.08.2021
50
+ 13:54:57</Modified><Source>MiradoreOnline</Source></Device><Device><ID>2</ID><User><ID>3</ID></User><Enrollment><ID>9</ID><User><ID>3</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>16.08.2021
51
+ 12:53:21</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>118</LastReportedMinutes><IPAddress>80.245.162.138</IPAddress><MACAddress>DC:71:96:FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><Client><ID>2</ID></Client><ConfigProfileDeployments
60
52
  /><OSVersionName>Windows 10 Home (20H2)</OSVersionName><Status>AutoGenerated</Status><Created>29.04.2021
61
- 13:01:04</Created><Modified>29.04.2021 13:01:04</Modified><Source>MiradoreOnline</Source><InvDevice><Model>ASUSTeK
62
- COMPUTER INC. VivoBook_ASUSLaptop X712FA_X712FA</Model><Manufacturer>ASUSTeK
63
- COMPUTER INC.</Manufacturer><ProductName>VivoBook_ASUSLaptop X712FA_X712FA</ProductName><SoftwareVersion>Windows
64
- 10 Home (20H2)</SoftwareVersion><SerialNumber>K8N0CV07315233B</SerialNumber><DeviceName>QUENTIN</DeviceName><InventoryTime>12.05.2021
65
- 12:30:16</InventoryTime></InvDevice><InvStorages><InvStorage><Type>Internal</Type><Volume>C:
66
- OS</Volume><FreeSpace>382347399168</FreeSpace><TotalSpace>511137091584</TotalSpace><InventoryTime>12.05.2021
67
- 12:30:16</InventoryTime></InvStorage></InvStorages><InvOS><Platform>WindowsDesktop</Platform><Version>10.0.19042.928</Version><Language>fr-FR</Language><InventoryTime>12.05.2021
68
- 12:30:16</InventoryTime></InvOS><Security><PasscodeSet>Unknown</PasscodeSet><EncryptionStatus>Disabled</EncryptionStatus></Security></Device></Items></Content>'
69
- recorded_at: Thu, 13 May 2021 15:14:48 GMT
53
+ 13:01:04</Created><Modified>16.08.2021 12:55:49</Modified><Source>MiradoreOnline</Source></Device><Device><ID>3</ID><User><ID>8</ID></User><OnlineStatus>Active</OnlineStatus><LastReported>16.08.2021
54
+ 11:11:20</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>3</LastReportedHours><LastReportedMinutes>220</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><MACAddress>f0:18:98:24:b4:66</MACAddress><Platform>macOS</Platform><Client><ID>3</ID></Client><ConfigProfileDeployments
55
+ /><OSVersionName>macOS 11.3.1</OSVersionName><Status>AutoGenerated</Status><Created>14.05.2021
56
+ 11:17:12</Created><Modified>02.06.2021 14:02:20</Modified><Source>MiradoreOnline</Source></Device><Device><ID>4</ID><User><ID>5</ID></User><Organization><ID>1</ID></Organization><Enrollment><ID>12</ID></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>16.08.2021
57
+ 13:45:03</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>66</LastReportedMinutes><IPAddress>89.3.12.167</IPAddress><MACAddress>D4:6D:6D:65:0C:DE</MACAddress><Platform>WindowsDesktop</Platform><Client><ID>4</ID></Client><ConfigProfileDeployments
58
+ /><OSVersionName>Windows 10 Pro (1909)</OSVersionName><Status>Active</Status><Created>17.05.2021
59
+ 08:16:11</Created><Modified>22.07.2021 06:58:05</Modified><Source>MiradoreOnline</Source></Device><Device><ID>5</ID><User><ID>9</ID></User><Enrollment><ID>15</ID><User><ID>9</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>16.08.2021
60
+ 13:47:07</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>64</LastReportedMinutes><IPAddress>81.37.23.103</IPAddress><MACAddress>f0:18:98:1e:60:ec</MACAddress><Platform>macOS</Platform><Client><ID>5</ID></Client><ConfigProfileDeployments
61
+ /><OSVersionName>macOS 11.4</OSVersionName><Status>AutoGenerated</Status><Created>26.05.2021
62
+ 08:21:23</Created><Modified>26.05.2021 08:21:23</Modified><Source>MiradoreOnline</Source></Device><Device><ID>6</ID><User><ID>15</ID></User><Enrollment><ID>17</ID><User><ID>15</ID></User></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>26.07.2021
63
+ 14:52:20</LastReported><LastReportedDays>21</LastReportedDays><LastReportedHours>504</LastReportedHours><LastReportedMinutes>30239</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><MACAddress>30:35:ad:b5:5e:be</MACAddress><Platform>macOS</Platform><Client><ID>6</ID></Client><ConfigProfileDeployments
64
+ /><OSVersionName>macOS 11.4</OSVersionName><Status>Unmanaged</Status><Created>20.07.2021
65
+ 08:50:34</Created><Modified>26.07.2021 14:52:20</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
66
+ recorded_at: Mon, 16 Aug 2021 14:51:22 GMT
70
67
  recorded_with: VCR 6.0.0
@@ -7,10 +7,14 @@ http_interactions:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ -
10
16
  Accept-Encoding:
11
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
18
  User-Agent:
15
19
  - Ruby
16
20
  response:
@@ -32,14 +36,12 @@ http_interactions:
32
36
  - Microsoft-IIS/10.0
33
37
  X-Aspnet-Version:
34
38
  - 4.0.30319
35
- X-Powered-By:
36
- - ASP.NET
37
39
  X-Frame-Options:
38
40
  - SAMEORIGIN
39
41
  Date:
40
- - Tue, 18 May 2021 10:29:27 GMT
42
+ - Mon, 16 Aug 2021 14:51:22 GMT
41
43
  body:
42
44
  encoding: UTF-8
43
45
  string: "<Content><Error><Description>Authentication failed</Description><Code>401</Code></Error></Content>"
44
- recorded_at: Tue, 18 May 2021 10:29:24 GMT
46
+ recorded_at: Mon, 16 Aug 2021 14:51:22 GMT
45
47
  recorded_with: VCR 6.0.0
@@ -2,15 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=(InvDevice.SerialNumber%20eq%20SRE)&select=*,Category.*,InvDevice.*,InvStorage.*,InvOS.*,Enrollment.*,Client.*,User.*,Location.*,Security.*,ReportedLocation.*
5
+ uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=(InvDevice.SerialNumber%20eq%20SRE)&select=ID,*.*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ -
10
16
  Accept-Encoding:
11
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
18
  User-Agent:
15
19
  - Ruby
16
20
  response:
@@ -26,20 +30,20 @@ http_interactions:
26
30
  - text/xml
27
31
  Expires:
28
32
  - "-1"
33
+ Vary:
34
+ - Accept-Encoding
29
35
  Server:
30
36
  - Microsoft-IIS/10.0
31
37
  X-Aspnet-Version:
32
38
  - 4.0.30319
33
- X-Powered-By:
34
- - ASP.NET
35
39
  X-Frame-Options:
36
40
  - SAMEORIGIN
37
41
  Date:
38
- - Tue, 18 May 2021 10:05:37 GMT
42
+ - Mon, 16 Aug 2021 14:51:21 GMT
39
43
  Content-Length:
40
- - '76'
44
+ - '185'
41
45
  body:
42
- encoding: UTF-8
46
+ encoding: ASCII-8BIT
43
47
  string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="0" /></Content>
44
- recorded_at: Tue, 18 May 2021 10:05:34 GMT
48
+ recorded_at: Mon, 16 Aug 2021 14:51:22 GMT
45
49
  recorded_with: VCR 6.0.0
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://rzilient.online.miradore.com/API/Organization?auth=&filters=&select=ID,*.*
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Cache-Control:
22
+ - no-cache
23
+ Pragma:
24
+ - no-cache
25
+ Content-Type:
26
+ - text/xml
27
+ Expires:
28
+ - "-1"
29
+ Vary:
30
+ - Accept-Encoding
31
+ Server:
32
+ - Microsoft-IIS/10.0
33
+ X-Aspnet-Version:
34
+ - 4.0.30319
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ Date:
38
+ - Mon, 16 Aug 2021 14:51:22 GMT
39
+ Content-Length:
40
+ - '282'
41
+ body:
42
+ encoding: ASCII-8BIT
43
+ string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Organization><ID>1</ID><Name>PUR
44
+ Projet</Name><FullName>PUR Projet</FullName><Created>17.05.2021 09:02:43</Created><Modified>17.05.2021
45
+ 09:02:43</Modified></Organization></Items></Content>
46
+ recorded_at: Mon, 16 Aug 2021 14:51:23 GMT
47
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://rzilient.online.miradore.com/API/User?auth=&filters=(ID%20eq%202)&select=ID,*.*
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Cache-Control:
22
+ - no-cache
23
+ Pragma:
24
+ - no-cache
25
+ Content-Type:
26
+ - text/xml
27
+ Expires:
28
+ - "-1"
29
+ Vary:
30
+ - Accept-Encoding
31
+ Server:
32
+ - Microsoft-IIS/10.0
33
+ X-Aspnet-Version:
34
+ - 4.0.30319
35
+ X-Frame-Options:
36
+ - SAMEORIGIN
37
+ Date:
38
+ - Mon, 16 Aug 2021 14:51:22 GMT
39
+ Content-Length:
40
+ - '301'
41
+ body:
42
+ encoding: ASCII-8BIT
43
+ string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><User><ID>2</ID><Email>edugarcas@gmail.com</Email><Source>GUI</Source><Status>Active</Status><Created>22.04.2021
44
+ 06:32:00</Created><Modified>22.04.2021 06:32:00</Modified></User></Items></Content>
45
+ recorded_at: Mon, 16 Aug 2021 14:51:22 GMT
46
+ recorded_with: VCR 6.0.0
@@ -2,15 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=(InvDevice.SerialNumber%20eq%20K8N0CV07315233B)&select=*,Category.*,InvDevice.*,InvStorage.*,InvOS.*,Enrollment.*,Client.*,User.*,Location.*,Security.*,ReportedLocation.*
5
+ uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=(InvDevice.SerialNumber%20eq%20K8N0CV07315233B)&select=ID,*.*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ -
10
16
  Accept-Encoding:
11
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
18
  User-Agent:
15
19
  - Ruby
16
20
  response:
@@ -26,34 +30,23 @@ http_interactions:
26
30
  - text/xml
27
31
  Expires:
28
32
  - "-1"
33
+ Vary:
34
+ - Accept-Encoding
29
35
  Server:
30
36
  - Microsoft-IIS/10.0
31
37
  X-Aspnet-Version:
32
38
  - 4.0.30319
33
- X-Powered-By:
34
- - ASP.NET
35
39
  X-Frame-Options:
36
40
  - SAMEORIGIN
37
41
  Date:
38
- - Thu, 13 May 2021 15:14:48 GMT
42
+ - Mon, 16 Aug 2021 14:51:21 GMT
39
43
  Content-Length:
40
- - '2046'
44
+ - '557'
41
45
  body:
42
- encoding: UTF-8
43
- string: '<?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Device><ID>2</ID><User><ID>3</ID><Name>de
44
- Lambert Quentin</Name><Email>quentin@rzilient.club</Email><Firstname>Quentin</Firstname><Lastname>de
45
- Lambert</Lastname><Source>GUI</Source><Status>Active</Status><Created>22.04.2021
46
- 06:51:53</Created><Modified>22.04.2021 06:51:53</Modified></User><Enrollment><ID>9</ID><User><ID>3</ID></User><Created>29.04.2021
47
- 12:22:31</Created><Completed>29.04.2021 13:01:04</Completed><Type>Email</Type><Sender>eduard@rzilient.club</Sender></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>13.05.2021
48
- 12:30:02</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>3</LastReportedHours><LastReportedMinutes>164</LastReportedMinutes><IPAddress>46.27.180.174</IPAddress><MACAddress>DC:71:96:FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><Client><ID>2</ID><ManagementType>BuiltInMDM</ManagementType></Client><ConfigProfileDeployments
46
+ encoding: ASCII-8BIT
47
+ string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Device><ID>2</ID><User><ID>3</ID></User><Enrollment><ID>9</ID><User><ID>3</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>16.08.2021
48
+ 12:53:21</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>118</LastReportedMinutes><IPAddress>80.245.162.138</IPAddress><MACAddress>DC:71:96:FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><Client><ID>2</ID></Client><ConfigProfileDeployments
49
49
  /><OSVersionName>Windows 10 Home (20H2)</OSVersionName><Status>AutoGenerated</Status><Created>29.04.2021
50
- 13:01:04</Created><Modified>29.04.2021 13:01:04</Modified><Source>MiradoreOnline</Source><InvDevice><Model>ASUSTeK
51
- COMPUTER INC. VivoBook_ASUSLaptop X712FA_X712FA</Model><Manufacturer>ASUSTeK
52
- COMPUTER INC.</Manufacturer><ProductName>VivoBook_ASUSLaptop X712FA_X712FA</ProductName><SoftwareVersion>Windows
53
- 10 Home (20H2)</SoftwareVersion><SerialNumber>K8N0CV07315233B</SerialNumber><DeviceName>QUENTIN</DeviceName><InventoryTime>12.05.2021
54
- 12:30:16</InventoryTime></InvDevice><InvStorages><InvStorage><Type>Internal</Type><Volume>C:
55
- OS</Volume><FreeSpace>382347399168</FreeSpace><TotalSpace>511137091584</TotalSpace><InventoryTime>12.05.2021
56
- 12:30:16</InventoryTime></InvStorage></InvStorages><InvOS><Platform>WindowsDesktop</Platform><Version>10.0.19042.928</Version><Language>fr-FR</Language><InventoryTime>12.05.2021
57
- 12:30:16</InventoryTime></InvOS><Security><PasscodeSet>Unknown</PasscodeSet><EncryptionStatus>Disabled</EncryptionStatus></Security></Device></Items></Content>'
58
- recorded_at: Thu, 13 May 2021 15:14:48 GMT
50
+ 13:01:04</Created><Modified>16.08.2021 12:55:49</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
51
+ recorded_at: Mon, 16 Aug 2021 14:51:22 GMT
59
52
  recorded_with: VCR 6.0.0
data/lib/ruby/miradore.rb CHANGED
@@ -8,120 +8,136 @@ require "finest/builder"
8
8
 
9
9
  module Ruby
10
10
  module Miradore
11
- class MspConnectionError < StandardError; end
12
-
13
- def self.api_key
14
- ENV["MSP_API_KEY"]
15
- end
16
11
 
17
12
  def self.url
18
13
  {
19
- simple_v1: "https://%<subdomain>s.online.miradore.com/API/Device?auth=%<auth>s&select=ID,%<item>s.*&filters=%<filter>s",
20
- v1: "https://%<subdomain>s.online.miradore.com/API/Device?auth=%<auth>s&select=*,Category.*,InvDevice.*,InvStorage.*,InvOS.*,Enrollment.*,Client.*,User.*,Location.*,Security.*,ReportedLocation.*&filters=%<filter>s",
14
+ item_v1: "https://%<subdomain>s.online.miradore.com/API/%<item>s?auth=%<auth>s&select=ID,%<attribute>s.*&filters=%<filter>s",
15
+ request_v1: "https://%<subdomain>s.online.miradore.com/API/Device?auth=%<auth>s&select=*,Category.*,InvDevice.*,InvStorage.*,InvOS.*,Enrollment.*,Client.*,User.*,Location.*,Security.*,ReportedLocation.*&filters=%<filter>s",
21
16
  v2: "https://%<subdomain>s.online.miradore.com/API/v2/Device/%<id>s/%<method>s"
22
17
  }
23
18
  end
24
19
 
25
20
  class Request
21
+ include Finest::Builder
26
22
  include HTTParty
27
23
  format :json
28
24
 
29
- attr_reader :subdomain
25
+ attr_writer :subdomain, :auth
30
26
 
27
+ def initialize(json = {})
28
+ super json
29
+ @subdomain ||= json[:subdomain]
30
+ @auth ||= json[:auth]
31
+ remove_instance_variable(:@subdomain) if @subdomain.nil?
32
+ remove_instance_variable(:@auth) if @auth.nil?
33
+ end
34
+
35
+ #
36
+ # This call will perform all GET calls regardless the API version that it's calling.
37
+ # The version would be determined based on the superclass name.
38
+ # If the superclass is Request the GET will call simple_v1 which will require the item which is class name.
39
+ # otherwise will call to retrieve devices based on filters.
40
+ #
31
41
  def self.all(**args)
32
42
  response = JSON.parse(
33
43
  Crack::XML.parse(
34
44
  get(
35
- Miradore.url[version] % args.merge(item: class_name, auth: args.fetch(:auth, Miradore.api_key), filter: args.fetch(:filter, nil))
45
+ Miradore.url[version] % args.merge(
46
+ item: object_name,
47
+ attribute: args.fetch(:attribute, "*"),
48
+ auth: args.fetch(:auth, nil),
49
+ filter: args.fetch(:filter, nil)
50
+ )
36
51
  ).body
37
52
  ).to_json,
38
53
  quirks_mode: true
39
- ).dig("Content", "Items", "Device")
40
- transform(response || { error: "Device(s) not found", status: :not_found }, args)
41
- rescue StandardError => err
42
- transform(response || { error: err&.message || "Error connecting to manager service provider", status: :not_found }, args)
54
+ ).dig("Content", "Items")
55
+ transform(response, args)
56
+ rescue StandardError => e
57
+ MiradoreError.new({ error: e&.message || "Error connecting to manager service provider", status: :not_found })
43
58
  end
44
59
 
45
- def self.transform(response, args = {})
46
- return response.map! { |e| Device.new(e.transform_keys(&:downcase), args) } if response.is_a?(Array)
60
+ class << self
61
+ private
47
62
 
48
- Device.new(response&.transform_keys(&:downcase), args)
49
- end
63
+ def transform(res, args = {})
64
+ instance_name = "Ruby::Miradore::#{res.keys.first.capitalize}"
65
+ if res.values.first.is_a?(Array)
66
+ return res.values.first.map! do |e|
67
+ Object.const_get(instance_name).new(args.merge(e.transform_keys(&:downcase)))
68
+ end
69
+ end
50
70
 
51
- def self.version
52
- superclass == Request ? :simple_v1 : :v1
53
- end
71
+ Object.const_get(instance_name).new(args.merge(res.values.first&.transform_keys(&:downcase)))
72
+ rescue StandardError
73
+ MiradoreError.new({ error: "#{object_name}(s) not found", status: :not_found })
74
+ end
75
+
76
+ def version
77
+ superclass == Object ? :request_v1 : :item_v1
78
+ end
54
79
 
55
- def self.class_name
56
- to_s.split("::").last
80
+ def object_name
81
+ to_s.split("::").last
82
+ end
57
83
  end
84
+
58
85
  end
59
86
 
60
- class Device
61
- include Finest::Builder
87
+ class Device < Request
62
88
  include HTTParty
63
89
  format :json
90
+ headers "Content-Type": "application/json"
91
+ headers "Accept": "application/json"
64
92
 
65
- attr_writer :subdomain, :auth
66
-
67
- def initialize(json = nil, args = {})
68
- super json
69
- @subdomain = args[:subdomain]
70
- @auth = args[:auth]
71
- remove_instance_variable(:@subdomain) if @subdomain.nil?
72
- end
73
-
74
- def lock(*args)
75
- http_method(:post, id, __method__)
93
+ def lock(**args)
94
+ http_method(args.merge(method: :post, id: id, action: __method__))
76
95
  end
77
96
 
78
- def lostmode(*args)
97
+ def lostmode(**args)
79
98
  if args[0]
80
- http_method(:post, id, __method__)
99
+ http_method(args.merge(method: :post, id: id, action: __method__))
81
100
  else
82
- http_method(:delete, id, __method__)
101
+ http_method(args.merge(method: :delete, id: id, action: __method__))
83
102
  end
84
103
  end
85
104
 
86
- def reboot(*args)
87
- http_method(:post, id, __method__)
105
+ def reboot(**args)
106
+ http_method(args.merge(method: :post, id: id, action: __method__))
88
107
  end
89
108
 
90
- def wipe(*args)
91
- http_method(:post, id, __method__)
109
+ def wipe(**args)
110
+ http_method(args.merge(method: :post, id: id, action: __method__))
92
111
  end
93
112
 
94
- private
95
-
96
- def http_method(*args)
97
- self.class.headers "X-API-Key" => @auth || Miradore.api_key
98
- url = Miradore.url[:v2] % { subdomain: @subdomain, id: args[1], method: args[2] }
99
- self.class.method(args[0]).call(url)
100
- rescue StandardError => err
101
- { error: err&.message || "Error connecting to manager service provider", status: :not_found }
113
+ def location(**args)
114
+ http_method(args.merge(method: :get, action: __method__))
102
115
  end
103
116
 
104
- end
105
-
106
- class Category < Request; end
107
-
108
- class InvDevice < Request; end
109
-
110
- class InvStorage < Request; end
117
+ def patch(**args)
118
+ http_method(args.merge(method: :patch))
119
+ end
111
120
 
112
- class InvOS < Request; end
121
+ private
113
122
 
114
- class Enrollment < Request; end
123
+ def http_method(**args)
124
+ self.class.headers "X-API-Key" => @auth || args[:auth]
125
+ url = Miradore.url[:v2] % {
126
+ subdomain: @subdomain || args[:subdomain],
127
+ id: args.fetch(:id, id),
128
+ method: args.fetch(:action, nil)
129
+ }
130
+ self.class.method(args.fetch(:method, nil)).call(url, body: JSON.generate(args.fetch(:body, {})))
131
+ rescue StandardError => e
132
+ { error: e&.message || "Error connecting to manager service provider", status: :not_found }
133
+ end
115
134
 
116
- class Client < Request; end
135
+ end
117
136
 
118
137
  class User < Request; end
119
138
 
120
- class Location < Request; end
121
-
122
- class Security < Request; end
123
-
124
- class ReportedLocation < Request; end
139
+ class Organization < Request; end
125
140
 
141
+ class MiradoreError < Request; end
126
142
  end
127
143
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "1.2.1"
5
+ VERSION = "2.0.2"
6
6
  end
7
7
  end
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -5,8 +5,8 @@ require_relative "lib/ruby/miradore/version"
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "ruby-miradore"
7
7
  spec.version = Ruby::Miradore::VERSION
8
- spec.authors = ["Eduard"]
9
- spec.email = ["eduard@rzilient.club"]
8
+ spec.authors = ["Eduard Garcia Castelló"]
9
+ spec.email = %w[edugarcas@gmail.com eduard@rzilient.club]
10
10
 
11
11
  spec.summary = "Miradore is a MSP providing an API to get devices information as well s perform some security actions."
12
12
  spec.description = "Miradore MSP Ruby Gem"
@@ -31,12 +31,12 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  # Uncomment to register a new dependency of your gem
33
33
  # spec.add_dependency "example-gem", "~> 1.0"
34
+ spec.add_dependency "crack", "~> 0.4"
35
+ spec.add_dependency "finest-builder", "~> 1.0"
36
+ spec.add_dependency "httparty", "~> 0.18"
34
37
  spec.add_dependency "rake", "~> 13.0"
35
38
  spec.add_dependency "rspec", "~> 3.0"
36
39
  spec.add_dependency "rubocop", "~> 1.7"
37
- spec.add_dependency "httparty", "~> 0.18.1"
38
- spec.add_dependency "finest-builder", "~> 0.0.5"
39
- spec.add_dependency "crack", "~> 0.4.5"
40
40
 
41
41
  # For more information and examples about making a new gem, checkout our
42
42
  # guide at: https://bundler.io/guides/creating_gem.html
metadata CHANGED
@@ -1,101 +1,102 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-miradore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - Eduard
8
- autorequire:
7
+ - Eduard Garcia Castelló
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-18 00:00:00.000000000 Z
11
+ date: 2021-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: crack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '13.0'
19
+ version: '0.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '13.0'
26
+ version: '0.4'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec
28
+ name: finest-builder
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rubocop
42
+ name: httparty
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.7'
47
+ version: '0.18'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.7'
54
+ version: '0.18'
55
55
  - !ruby/object:Gem::Dependency
56
- name: httparty
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.18.1
61
+ version: '13.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.18.1
68
+ version: '13.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: finest-builder
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.0.5
75
+ version: '3.0'
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: 0.0.5
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: crack
84
+ name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.4.5
89
+ version: '1.7'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.4.5
96
+ version: '1.7'
97
97
  description: Miradore MSP Ruby Gem
98
98
  email:
99
+ - edugarcas@gmail.com
99
100
  - eduard@rzilient.club
100
101
  executables: []
101
102
  extensions: []
@@ -114,16 +115,26 @@ files:
114
115
  - Rakefile
115
116
  - bin/console
116
117
  - bin/setup
118
+ - fixtures/vcr_cassettes/Change_User_Email_Address.yml
119
+ - fixtures/vcr_cassettes/Change_User_Email_Address_Error.yml
120
+ - fixtures/vcr_cassettes/Change_User_Email_Address_Without_v1.yml
121
+ - fixtures/vcr_cassettes/Get_Device_Location.yml
122
+ - fixtures/vcr_cassettes/Get__Mobile_Device.yml
117
123
  - fixtures/vcr_cassettes/InvDevice.yml
118
- - fixtures/vcr_cassettes/LockDevice.yml
124
+ - fixtures/vcr_cassettes/LockDevice_all.yml
119
125
  - fixtures/vcr_cassettes/all_criteria.yml
120
126
  - fixtures/vcr_cassettes/auth_not_found.yml
121
127
  - fixtures/vcr_cassettes/error_by_serial_number.yml
128
+ - fixtures/vcr_cassettes/get_location.yml
129
+ - fixtures/vcr_cassettes/get_user_from_miradore.yml
122
130
  - fixtures/vcr_cassettes/search_by_serial_number.yml
123
131
  - lib/ruby/miradore.rb
124
132
  - lib/ruby/miradore/version.rb
125
- - ruby-miradore-0.1.0.gem
126
- - ruby-miradore-0.1.1.gem
133
+ - ruby-miradore-0.1.2.gem
134
+ - ruby-miradore-0.1.3.gem
135
+ - ruby-miradore-1.1.0.gem
136
+ - ruby-miradore-1.1.1.gem
137
+ - ruby-miradore-1.2.2.gem
127
138
  - ruby-miradore.gemspec
128
139
  homepage: https://github.com/eddygarcas/ruby-miradore
129
140
  licenses:
@@ -133,7 +144,7 @@ metadata:
133
144
  homepage_uri: https://github.com/eddygarcas/ruby-miradore
134
145
  source_code_uri: https://github.com/eddygarcas/ruby-miradore
135
146
  changelog_uri: https://github.com/eddygarcas/ruby-miradore
136
- post_install_message:
147
+ post_install_message:
137
148
  rdoc_options: []
138
149
  require_paths:
139
150
  - lib
@@ -149,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
160
  version: '0'
150
161
  requirements: []
151
162
  rubygems_version: 3.1.6
152
- signing_key:
163
+ signing_key:
153
164
  specification_version: 4
154
165
  summary: Miradore is a MSP providing an API to get devices information as well s perform
155
166
  some security actions.
Binary file
Binary file