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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02ec17dcd1e6762bebf731dd97394f9fe87c75be604baed827f34106482d0caf
4
- data.tar.gz: 4b480339114ab452ed36ce63ae9b843a95e548f5ccc38de034c4d85eb331e674
3
+ metadata.gz: 2b9cf51eb8d1e42d2ee6112d4bf1bc8d38408a56581f0ed0fcaafcb4358692a7
4
+ data.tar.gz: 48a58959848c13ff47d37dd9eb9cd104291bd66e422fc00ba8b3bfbdd3eea3b7
5
5
  SHA512:
6
- metadata.gz: 28c69e287d78e9b120a75a3092294b1a7526d9b41301869c04c96921066dc34440423e28f06ccca208396dd24f98a5d460c5ab0c1e32e89ccbebb4f4ded09317
7
- data.tar.gz: 0bfd98852076b669c53f02c3ddbcbdc3e60a1958125e2ef9d66af2ab8ec11207451245fd9fabe123583c24996703bb977990cba1e001950b5323696db38820d9
6
+ metadata.gz: bd809519957cc388dff7f4c62ce718de7f0c3990c85056a24964de019b2c77338db9078c56b488a583e289ecde0378f40e965682bcd11beaa329bbab625dccbb
7
+ data.tar.gz: 8d4db509e738fe69a17265e718f8371a7c8c2d1e9a1ad7ca3c8471a5eebec62262c5d7f071c5040614fefc1568b75b47f59cd1bc331dae063b9f4ae5073812d1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.1.0] - 2025-06-16
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
- issuer_id = 'your_issuer_id'
29
+ client_id = 'your_client_id'
30
30
  key_id = 'your_key_id'
31
31
 
32
- client = Axm::Client.new(private_key:, issuer_id:, key_id:)
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('/v1/organization/devices', options)
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
@@ -8,6 +8,8 @@ require 'axm/client/organization_devices'
8
8
 
9
9
  module Axm
10
10
  class Client
11
+ include OrganizationDevices
12
+
11
13
  # Initializes a new instance of the AXM client.
12
14
  #
13
15
  # @param private_key [String] The private key used for authentication.
data/lib/axm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Axm
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - nick-f