Class: ConnectorKit::Client
- Inherits:
-
Object
- Object
- ConnectorKit::Client
- Includes:
- HTTParty
- Defined in:
- lib/connector_kit.rb
Overview
Client class used for communicating with the App Store Connect API
Instance Method Summary collapse
- #app_builds(app) ⇒ Object
- #apps ⇒ Object
- #build_beta_details(build) ⇒ Object
-
#initialize(issuer_id, key_id, private_key_file_path) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(issuer_id, key_id, private_key_file_path) ⇒ Client
Returns a new instance of Client.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/connector_kit.rb', line 16 def initialize(issuer_id, key_id, private_key_file_path) token_generator = TokenGenerator.new( issuer_id, key_id, private_key_file_path ) self.class.headers( 'Authorization' => "Bearer #{token_generator.generate_token}" ) end |
Instance Method Details
#app_builds(app) ⇒ Object
32 33 34 |
# File 'lib/connector_kit.rb', line 32 def app_builds(app) get "/apps/#{app.id}/builds", BuildListMapper.new end |
#apps ⇒ Object
28 29 30 |
# File 'lib/connector_kit.rb', line 28 def apps get '/apps', AppListMapper.new end |
#build_beta_details(build) ⇒ Object
36 37 38 |
# File 'lib/connector_kit.rb', line 36 def build_beta_details(build) get "/buildBetaDetails/#{build.id}", BuildDetailsMapper.new end |