applocate 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/applocate/api.rb +6 -0
- data/lib/applocate/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dac7a77bf6bcf4d0a9af55cab719614b9f714c6
|
4
|
+
data.tar.gz: 2e8b720b0032362a8e586c4dc15fcc8c9464cd33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a7948336988a91bd2920357a1d6d74eaf8a979f1c030fe16cccd06f2a76619456777fb9e70cb70b2230a874799024927c8ab5aebb0a80ac5d4c501fd7457f83
|
7
|
+
data.tar.gz: 1cc7be2017305bd422eaafeb24f4f4b38de3712fa7214e22b7e9686ec72247542ac6d2a6ebc637bb5b19108cd6752292e2084dcfa8f26f4b0de0fe528cd91649
|
data/README.md
CHANGED
@@ -44,6 +44,7 @@ Currently the following methods are supported:
|
|
44
44
|
|
45
45
|
```ruby
|
46
46
|
# expected options -> { udid: "ABCD-DCCDDC-12394812389-CDC", restrictions: {"allowSafari" => false} }
|
47
|
+
# optional options -> { expires_at: "2000-01-01T00:00:00Z", expires_in: 1337, profile_name: "com.example.my.profile"}
|
47
48
|
Applocate::API.restrict(options)
|
48
49
|
# returns a list (Array) of UUIDs with their status from the command.
|
49
50
|
|
@@ -97,7 +98,13 @@ Applocate::API.recent_commands(udid)
|
|
97
98
|
Applocate::API.active_commands(udid)
|
98
99
|
# returns a list of the active commands for a device.
|
99
100
|
|
100
|
-
# expected params
|
101
|
+
# expected params, udid = "ABCD-DCCDDC-12394812389-CDC"
|
102
|
+
Applocate::API.restrictions(udid)
|
103
|
+
# returns a list of the restrictions for a device.
|
104
|
+
|
105
|
+
# expected params: udid = "ABCD-DCCDDC-12394812389-CDC", name = "me.example.restrictions", options = {}
|
106
|
+
# required options -> { restrictions: {"allowSafari" => false} }
|
107
|
+
# optional options -> { expires_at: "2000-01-01T00:00:00Z", expires_in: 1337 }
|
101
108
|
Applocate::API.apply_named_restrictions(udid, name, options)
|
102
109
|
# returns the udid and the status of the command as JSON
|
103
110
|
|
data/lib/applocate/api.rb
CHANGED
@@ -26,6 +26,12 @@ module Applocate
|
|
26
26
|
JSON.parse response.body rescue []
|
27
27
|
end
|
28
28
|
|
29
|
+
# expected params, udid = "ABCD-DCCDDC-12394812389-CDC"
|
30
|
+
def self.restrictions(udid)
|
31
|
+
response = self.get("/api/devices/#{udid}/restrictions", { headers: authentication })
|
32
|
+
JSON.parse response.body rescue []
|
33
|
+
end
|
34
|
+
|
29
35
|
# expected params, udid = "ABCD-DCCDDC-12394812389-CDC"
|
30
36
|
def self.profile_list(udid)
|
31
37
|
response = self.get("/api/devices/#{udid}/profiles", { headers: authentication })
|
data/lib/applocate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: applocate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Madsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|