Class: AppStoreConnect::Client
- Inherits:
-
Object
- Object
- AppStoreConnect::Client
- Defined in:
- lib/app_store_connect/client.rb
Constant Summary collapse
- ENDPOINT =
'https://api.appstoreconnect.apple.com/v1'
Instance Method Summary collapse
- #app(id) ⇒ Object
- #apps ⇒ Object
- #build(app_id, build_id) ⇒ Object
- #builds(app_id) ⇒ Object
- #create_bundle_id(*args) ⇒ Object
-
#initialize(key_id:, issuer_id:, private_key:) ⇒ Client
constructor
A new instance of Client.
- #invite_user(first_name:, last_name:, email:, roles:) ⇒ Object
- #user_invitations ⇒ Object
- #users ⇒ Object
Constructor Details
#initialize(key_id:, issuer_id:, private_key:) ⇒ Client
Returns a new instance of Client.
9 10 11 12 13 14 15 |
# File 'lib/app_store_connect/client.rb', line 9 def initialize(key_id:, issuer_id:, private_key:) = Authorization.new( private_key: private_key, key_id: key_id, issuer_id: issuer_id ) end |
Instance Method Details
#app(id) ⇒ Object
21 22 23 |
# File 'lib/app_store_connect/client.rb', line 21 def app(id) get("apps/#{id}") end |
#apps ⇒ Object
17 18 19 |
# File 'lib/app_store_connect/client.rb', line 17 def apps get('apps') end |
#build(app_id, build_id) ⇒ Object
29 30 31 |
# File 'lib/app_store_connect/client.rb', line 29 def build(app_id, build_id) get("apps/#{app_id}/builds/#{build_id}") end |
#builds(app_id) ⇒ Object
25 26 27 |
# File 'lib/app_store_connect/client.rb', line 25 def builds(app_id) get("apps/#{app_id}/builds") end |
#create_bundle_id(*args) ⇒ Object
39 40 41 42 43 |
# File 'lib/app_store_connect/client.rb', line 39 def create_bundle_id(*args) request = BundleIdCreateRequest.new(*args) post('bundleIds', body(request)) end |
#invite_user(first_name:, last_name:, email:, roles:) ⇒ Object
33 34 35 36 37 |
# File 'lib/app_store_connect/client.rb', line 33 def invite_user(first_name:, last_name:, email:, roles:) invitation = UserInvitationCreateRequest.new(first_name, last_name, email, roles) post('userInvitations', invitation.body.to_json) end |
#user_invitations ⇒ Object
49 50 51 |
# File 'lib/app_store_connect/client.rb', line 49 def user_invitations get('userInvitations') end |
#users ⇒ Object
45 46 47 |
# File 'lib/app_store_connect/client.rb', line 45 def users get('users') end |