ruby-miradore 1.2.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/fixtures/vcr_cassettes/Change_User_Email_Address.yml +40 -0
- data/fixtures/vcr_cassettes/Change_User_Email_Address_Error.yml +40 -0
- data/fixtures/vcr_cassettes/Change_User_Email_Address_Without_v1.yml +38 -0
- data/fixtures/vcr_cassettes/Get_Device_Location.yml +40 -0
- data/fixtures/vcr_cassettes/Get__Mobile_Device.yml +52 -0
- data/fixtures/vcr_cassettes/InvDevice.yml +12 -16
- data/fixtures/vcr_cassettes/{LockDevice.yml → LockDevice_all.yml} +8 -10
- data/fixtures/vcr_cassettes/all_criteria.yml +31 -34
- data/fixtures/vcr_cassettes/auth_not_found.yml +8 -6
- data/fixtures/vcr_cassettes/error_by_serial_number.yml +13 -9
- data/fixtures/vcr_cassettes/get_location.yml +47 -0
- data/fixtures/vcr_cassettes/get_user_from_miradore.yml +46 -0
- data/fixtures/vcr_cassettes/search_by_serial_number.yml +16 -23
- data/lib/ruby/miradore.rb +75 -56
- data/lib/ruby/miradore/version.rb +1 -1
- data/ruby-miradore.gemspec +2 -2
- metadata +15 -9
- data/ruby-miradore-0.1.0.gem +0 -0
- data/ruby-miradore-0.1.1.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eec2d939e922b01de30f68523519793986e7fd8dd514ca1daa53218aca098b03
|
4
|
+
data.tar.gz: e668247de13d7d7781b130e84e098ebf12c847865205b79e737edf445eff71fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 133655f2e1fefdd93fd0c77278d82e500d48f189c9cfc60b1a54f26f278df94c0579cf107540c67272e26d000ebca595e6adc5d9dd2b15ce47b9fafb10886a3e
|
7
|
+
data.tar.gz: a22735ab9d4fa3197c705c1c2c5aa8662224cf574fcdfc2c98159ecacde05fb8ca2c32c826c285fbff519a02b5e82f384f1ac11ce4536f28d4c0aca55dabc030
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,40 @@
|
|
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: '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: 400
|
23
|
+
message: Bad Request
|
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 14:51:21 GMT
|
34
|
+
Content-Length:
|
35
|
+
- '46'
|
36
|
+
body:
|
37
|
+
encoding: UTF-8
|
38
|
+
string: '{"":["A non-empty request body is required."]}'
|
39
|
+
recorded_at: Mon, 16 Aug 2021 14:51:21 GMT
|
40
|
+
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,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://rzilient.online.miradore.com/API/Device?auth=&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
|
+
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
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Pragma:
|
28
|
+
- no-cache
|
29
|
+
Content-Type:
|
30
|
+
- text/xml
|
31
|
+
Expires:
|
32
|
+
- "-1"
|
33
|
+
Vary:
|
34
|
+
- Accept-Encoding
|
35
|
+
Server:
|
36
|
+
- Microsoft-IIS/10.0
|
37
|
+
X-Aspnet-Version:
|
38
|
+
- 4.0.30319
|
39
|
+
X-Frame-Options:
|
40
|
+
- SAMEORIGIN
|
41
|
+
Date:
|
42
|
+
- Mon, 16 Aug 2021 14:51:20 GMT
|
43
|
+
Content-Length:
|
44
|
+
- '563'
|
45
|
+
body:
|
46
|
+
encoding: ASCII-8BIT
|
47
|
+
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>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></Items></Content>
|
51
|
+
recorded_at: Mon, 16 Aug 2021 14:51:21 GMT
|
52
|
+
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
|
-
-
|
40
|
+
- Mon, 16 Aug 2021 14:51:20 GMT
|
39
41
|
Content-Length:
|
40
|
-
- '
|
42
|
+
- '1415'
|
41
43
|
body:
|
42
|
-
encoding:
|
43
|
-
string:
|
44
|
-
|
45
|
-
|
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+MzU1MzMyMDg4NDMzMzYwPC9JTUVJPjxXaUZpTUFDPmQ0OmRjOmNkOmQ2OjA5OmJlPC9XaUZpTUFDPjxCbHVldG9vdGhNQUM+ZDQ6ZGM6Y2Q6ZDY6MDk6ZTE8L0JsdWV0b290aE1BQz48VURJRD44NGM4N2E5ZWRmMGM1NzcyMjdiOTZkY2JlN2JmNDU3MTNjMzU4ZWRlPC9VRElEPjxTdG9yZUFjY291bnRBY3RpdmU+VHJ1ZTwvU3RvcmVBY2NvdW50QWN0aXZlPjxEb05vdERpc3R1cmJBY3RpdmU+RmFsc2U8L0RvTm90RGlzdHVyYkFjdGl2ZT48RGV2aWNlVHlwZT5NTjhYMlFMPC9EZXZpY2VUeXBlPjxFQVNJZGVudGlmaWVyP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PC9EZXZpY2VOYW1lPjxJbnZlbnRvcnlUaW1lPjI2LjA3LjIwMjEgMDc6MjU6NTA8L0ludmVudG9yeVRpbWU+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
|
-
-
|
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
|
-
-
|
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:
|
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
|
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
|
-
-
|
42
|
+
- Mon, 16 Aug 2021 14:51:21 GMT
|
39
43
|
Content-Length:
|
40
|
-
- '
|
44
|
+
- '1318'
|
41
45
|
body:
|
42
|
-
encoding:
|
43
|
-
string:
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
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
|
-
-
|
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:
|
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
|
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
|
-
-
|
42
|
+
- Mon, 16 Aug 2021 14:51:21 GMT
|
39
43
|
Content-Length:
|
40
|
-
- '
|
44
|
+
- '185'
|
41
45
|
body:
|
42
|
-
encoding:
|
46
|
+
encoding: ASCII-8BIT
|
43
47
|
string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="0" /></Content>
|
44
|
-
recorded_at:
|
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
|
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
|
-
-
|
42
|
+
- Mon, 16 Aug 2021 14:51:21 GMT
|
39
43
|
Content-Length:
|
40
|
-
- '
|
44
|
+
- '557'
|
41
45
|
body:
|
42
|
-
encoding:
|
43
|
-
string:
|
44
|
-
|
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>
|
51
|
-
|
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,139 @@ 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
|
-
|
20
|
-
|
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
25
|
attr_reader :subdomain
|
30
26
|
|
27
|
+
def initialize(json = nil, args = {})
|
28
|
+
super json
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# This call will perform all GET calls regardless the API version that it's calling.
|
33
|
+
# The version would be determined based on the superclass name.
|
34
|
+
# If the superclass is Request the GET will call simple_v1 which will require the item which is class name.
|
35
|
+
# otherwise will call to retrieve devices based on filters.
|
36
|
+
#
|
31
37
|
def self.all(**args)
|
32
38
|
response = JSON.parse(
|
33
39
|
Crack::XML.parse(
|
34
40
|
get(
|
35
|
-
Miradore.url[version] % args.merge(
|
41
|
+
Miradore.url[version] % args.merge(
|
42
|
+
item: object_name,
|
43
|
+
attribute: args.fetch(:attribute, "*"),
|
44
|
+
auth: args.fetch(:auth, nil),
|
45
|
+
filter: args.fetch(:filter, nil)
|
46
|
+
)
|
36
47
|
).body
|
37
48
|
).to_json,
|
38
49
|
quirks_mode: true
|
39
|
-
).dig("Content", "Items"
|
40
|
-
transform(response
|
41
|
-
rescue StandardError =>
|
42
|
-
|
50
|
+
).dig("Content", "Items")
|
51
|
+
transform(response, args)
|
52
|
+
rescue StandardError => e
|
53
|
+
MiradoreError.new({ error: e&.message || "Error connecting to manager service provider", status: :not_found })
|
43
54
|
end
|
44
55
|
|
45
|
-
|
46
|
-
|
56
|
+
class << self
|
57
|
+
private
|
47
58
|
|
48
|
-
|
49
|
-
|
59
|
+
def transform(res, args = {})
|
60
|
+
instance_name = "Ruby::Miradore::#{res.keys.first.capitalize}"
|
61
|
+
if res.values.first.is_a?(Array)
|
62
|
+
return res.values.first.map! { |e| Object.const_get(instance_name).new(e.transform_keys(&:downcase), args) }
|
63
|
+
end
|
50
64
|
|
51
|
-
|
52
|
-
|
53
|
-
|
65
|
+
Object.const_get(instance_name).new(res.values.first&.transform_keys(&:downcase), args)
|
66
|
+
rescue
|
67
|
+
MiradoreError.new({ error: "#{object_name}(s) not found", status: :not_found })
|
68
|
+
end
|
54
69
|
|
55
|
-
|
56
|
-
|
70
|
+
def version
|
71
|
+
superclass == Object ? :request_v1 : :item_v1
|
72
|
+
end
|
73
|
+
|
74
|
+
def object_name
|
75
|
+
to_s.split("::").last
|
76
|
+
end
|
57
77
|
end
|
78
|
+
|
58
79
|
end
|
59
80
|
|
60
|
-
class Device
|
61
|
-
include Finest::Builder
|
81
|
+
class Device < Request
|
62
82
|
include HTTParty
|
63
83
|
format :json
|
84
|
+
headers "Content-Type": "application/json"
|
85
|
+
headers "Accept": "application/json"
|
64
86
|
|
65
87
|
attr_writer :subdomain, :auth
|
66
88
|
|
67
|
-
def initialize(json =
|
89
|
+
def initialize(json = {} , args = {})
|
68
90
|
super json
|
69
91
|
@subdomain = args[:subdomain]
|
70
92
|
@auth = args[:auth]
|
71
93
|
remove_instance_variable(:@subdomain) if @subdomain.nil?
|
72
94
|
end
|
73
95
|
|
74
|
-
def lock(
|
75
|
-
http_method(:post, id, __method__)
|
96
|
+
def lock(**args)
|
97
|
+
http_method(args.merge(method: :post, id: id, action: __method__))
|
76
98
|
end
|
77
99
|
|
78
|
-
def lostmode(
|
100
|
+
def lostmode(**args)
|
79
101
|
if args[0]
|
80
|
-
http_method(:post, id, __method__)
|
102
|
+
http_method(args.merge(method: :post, id: id, action: __method__))
|
81
103
|
else
|
82
|
-
http_method(:delete, id, __method__)
|
104
|
+
http_method(args.merge(method: :delete, id: id, action: __method__))
|
83
105
|
end
|
84
106
|
end
|
85
107
|
|
86
|
-
def reboot(
|
87
|
-
http_method(:post, id, __method__)
|
108
|
+
def reboot(**args)
|
109
|
+
http_method(args.merge(method: :post, id: id, action: __method__))
|
88
110
|
end
|
89
111
|
|
90
|
-
def wipe(
|
91
|
-
http_method(:post, id, __method__)
|
112
|
+
def wipe(**args)
|
113
|
+
http_method(args.merge(method: :post, id: id, action: __method__))
|
92
114
|
end
|
93
115
|
|
94
|
-
|
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 }
|
116
|
+
def location(**args)
|
117
|
+
http_method(args.merge(method: :get, action: __method__))
|
102
118
|
end
|
103
119
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
class InvDevice < Request; end
|
109
|
-
|
110
|
-
class InvStorage < Request; end
|
120
|
+
def patch(**args)
|
121
|
+
http_method(args.merge(method: :patch))
|
122
|
+
end
|
111
123
|
|
112
|
-
|
124
|
+
private
|
113
125
|
|
114
|
-
|
126
|
+
def http_method(**args)
|
127
|
+
self.class.headers "X-API-Key" => @auth || args[:auth]
|
128
|
+
url = Miradore.url[:v2] % {
|
129
|
+
subdomain: @subdomain || args[:subdomain],
|
130
|
+
id: args.fetch(:id, id),
|
131
|
+
method: args.fetch(:action, nil)
|
132
|
+
}
|
133
|
+
self.class.method(args.fetch(:method, nil)).call(url, body: JSON.generate(args[:body]))
|
134
|
+
rescue StandardError => e
|
135
|
+
{ error: e&.message || "Error connecting to manager service provider", status: :not_found }
|
136
|
+
end
|
115
137
|
|
116
|
-
|
138
|
+
end
|
117
139
|
|
118
140
|
class User < Request; end
|
119
141
|
|
120
|
-
class
|
121
|
-
|
122
|
-
class Security < Request; end
|
123
|
-
|
124
|
-
class ReportedLocation < Request; end
|
142
|
+
class Organization < Request; end
|
125
143
|
|
144
|
+
class MiradoreError < Request; end
|
126
145
|
end
|
127
146
|
end
|
data/ruby-miradore.gemspec
CHANGED
@@ -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 = ["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"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-miradore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
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-
|
11
|
+
date: 2021-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: crack
|
@@ -96,6 +96,7 @@ dependencies:
|
|
96
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,21 @@ 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/
|
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
|
127
133
|
- ruby-miradore.gemspec
|
128
134
|
homepage: https://github.com/eddygarcas/ruby-miradore
|
129
135
|
licenses:
|
@@ -133,7 +139,7 @@ metadata:
|
|
133
139
|
homepage_uri: https://github.com/eddygarcas/ruby-miradore
|
134
140
|
source_code_uri: https://github.com/eddygarcas/ruby-miradore
|
135
141
|
changelog_uri: https://github.com/eddygarcas/ruby-miradore
|
136
|
-
post_install_message:
|
142
|
+
post_install_message:
|
137
143
|
rdoc_options: []
|
138
144
|
require_paths:
|
139
145
|
- lib
|
@@ -149,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
155
|
version: '0'
|
150
156
|
requirements: []
|
151
157
|
rubygems_version: 3.1.6
|
152
|
-
signing_key:
|
158
|
+
signing_key:
|
153
159
|
specification_version: 4
|
154
160
|
summary: Miradore is a MSP providing an API to get devices information as well s perform
|
155
161
|
some security actions.
|
data/ruby-miradore-0.1.0.gem
DELETED
Binary file
|
data/ruby-miradore-0.1.1.gem
DELETED
Binary file
|