axm 0.1.1 → 0.1.2
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 +4 -4
- data/CHANGELOG.md +20 -1
- data/README.md +12 -2
- data/lib/axm/client/organization_devices.rb +13 -1
- data/lib/axm/client.rb +2 -0
- data/lib/axm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b9cf51eb8d1e42d2ee6112d4bf1bc8d38408a56581f0ed0fcaafcb4358692a7
|
4
|
+
data.tar.gz: 48a58959848c13ff47d37dd9eb9cd104291bd66e422fc00ba8b3bfbdd3eea3b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd809519957cc388dff7f4c62ce718de7f0c3990c85056a24964de019b2c77338db9078c56b488a583e289ecde0378f40e965682bcd11beaa329bbab625dccbb
|
7
|
+
data.tar.gz: 8d4db509e738fe69a17265e718f8371a7c8c2d1e9a1ad7ca3c8471a5eebec62262c5d7f071c5040614fefc1568b75b47f59cd1bc331dae063b9f4ae5073812d1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
-
##
|
3
|
+
## 0.1.2 - 2025-07-14
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- Get information about a specific device
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- Fixed issue with incorrect endpoints being included
|
12
|
+
|
13
|
+
## [0.1.1] - 2025-07-14
|
14
|
+
|
15
|
+
- Updated README with more detailed usage instructions
|
16
|
+
|
17
|
+
## [0.1.0] - 2025-07-14
|
4
18
|
|
5
19
|
- Initial release
|
20
|
+
|
21
|
+
### Added
|
22
|
+
|
23
|
+
- Exchange credentials for an access token
|
24
|
+
- List all devices in an organisation
|
data/README.md
CHANGED
@@ -26,10 +26,10 @@ With the credentials handy, you can create an instance of the client:
|
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
private_key = File.read('path/to/your/private_key.pem')
|
29
|
-
|
29
|
+
client_id = 'your_client_id'
|
30
30
|
key_id = 'your_key_id'
|
31
31
|
|
32
|
-
client = Axm::Client.new(private_key:,
|
32
|
+
client = Axm::Client.new(private_key:, client_id:, key_id:)
|
33
33
|
```
|
34
34
|
|
35
35
|
You're now ready to make API requests.
|
@@ -48,6 +48,16 @@ client.get('/v1/some/endpoint', { limit: 10 })
|
|
48
48
|
|
49
49
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
50
50
|
|
51
|
+
If the credentials are stored in the `secrets/` directory, you can use the `Secret.read` method to load them:
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
private_key = Secret.read('private_key.pem')
|
55
|
+
client_id = Secret.read('client_id')
|
56
|
+
key_id = Secret.read('key_id')
|
57
|
+
|
58
|
+
client = Axm::Client.new(private_key:, client_id:, key_id:)
|
59
|
+
```
|
60
|
+
|
51
61
|
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
52
62
|
|
53
63
|
## Contributing
|
@@ -11,7 +11,19 @@ module Axm
|
|
11
11
|
# See: https://developer.apple.com/documentation/applebusinessmanagerapi/get-org-devices
|
12
12
|
# See: https://developer.apple.com/documentation/appleschoolmanagerapi/get-org-devices
|
13
13
|
def list_org_devices(options = {})
|
14
|
-
get(
|
14
|
+
get("v1/orgDevices", options)
|
15
|
+
end
|
16
|
+
|
17
|
+
# Retrieves information about a specific device in the organization.
|
18
|
+
#
|
19
|
+
# @param options [Hash] Optional query parameters to filter or paginate results.
|
20
|
+
# - fields: (Array) Array of fields to include in the response.
|
21
|
+
# @return [<Hash>] A device and its selected attributes.
|
22
|
+
#
|
23
|
+
# See: https://developer.apple.com/documentation/applebusinessmanagerapi/get-orgdevice-information
|
24
|
+
# See: https://developer.apple.com/documentation/appleschoolmanagerapi/get-orgdevice-information
|
25
|
+
def device(id, options = {})
|
26
|
+
get("/v1/orgDevices/#{id}", options)
|
15
27
|
end
|
16
28
|
end
|
17
29
|
end
|
data/lib/axm/client.rb
CHANGED
data/lib/axm/version.rb
CHANGED