Class: AppStoreConnectApi::Client

Inherits:
Object
  • Object
show all
Includes:
Domain
Defined in:
lib/app_store_connect_api/client.rb

Constant Summary collapse

APP_STORE_CONNECT_API_ROOT_URL =
'https://api.appstoreconnect.apple.com'

Instance Method Summary collapse

Methods included from Domain::Users

#add_user_visible_apps, #delete_user, #remove_user_visible_apps, #replace_user_visible_apps, #update_user, #user, #user_visible_app_ids, #user_visible_apps, #users

Methods included from Domain::UserInvitations

#create_user_invitation, #delete_user_invitation, #user_invitation, #user_invitation_visible_apps, #user_invitations

Methods included from Domain::SandboxTesters

#clear_sandbox_tester_purchase_history, #sandbox_testers, #update_sandbox_tester

Methods included from Domain::ReviewSubmissions

#create_review_submission, #review_submission, #review_submission_items, #review_submissions, #update_review_submission

Methods included from Domain::ReviewSubmissionItems

#create_review_submission_item, #delete_review_submission_item, #update_review_submission_item

Methods included from Domain::Profiles

#create_profile, #delete_profile, #profile, #profile_bundle_id, #profile_certificates, #profile_devices, #profiles

Methods included from Domain::PrereleaseVersions

#prerelease_version, #prerelease_version_app, #prerelease_version_builds, #prerelease_versions

Methods included from Domain::Devices

#create_device, #device, #devices, #update_device

Methods included from Domain::CustomerReviews

#customer_review

Methods included from Domain::Certificates

#certificate, #certificates, #create_certificate, #delete_certificate

Methods included from Domain::BundleIds

#bundle_id, #bundle_id_app, #bundle_id_bundle_id_capabilities, #bundle_id_profiles, #bundle_ids, #create_bundle_id, #delete_bundle_id, #update_bundle_id

Methods included from Domain::BundleIdCapabilities

#create_bundle_id_capability, #delete_bundle_id_capability, #update_bundle_id_capability

Methods included from Domain::Builds

#add_build_beta_groups, #add_build_individual_testers, #build, #build_app, #build_app_encryption_declaration, #build_app_encryption_declaration_id, #build_app_store_version, #build_beta_app_review_submission, #build_beta_build_localizations, #build_build_beta_detail, #build_icons, #build_individual_tester_ids, #build_individual_testers, #build_prerelease_version, #builds, #remove_build_beta_groups, #remove_build_individual_testers, #update_build, #update_build_app_encryption_declaration

Methods included from Domain::BuildBetaNotifications

#create_build_beta_notification

Methods included from Domain::BuildBetaDetails

#build_beta_detail, #build_beta_detail_build, #build_beta_details, #update_build_beta_detail

Methods included from Domain::BetaTesters

#add_beta_tester_beta_groups, #add_beta_tester_builds, #beta_tester, #beta_tester_app_ids, #beta_tester_apps, #beta_tester_beta_group_ids, #beta_tester_beta_groups, #beta_tester_build_ids, #beta_tester_builds, #beta_testers, #create_beta_tester, #delete_beta_tester, #remove_beta_tester_apps, #remove_beta_tester_beta_groups, #remove_beta_tester_builds

Methods included from Domain::BetaTesterInvitations

#create_beta_tester_invitation

Methods included from Domain::BetaLicenseAgreements

#beta_license_agreement, #beta_license_agreement_app, #beta_license_agreements, #update_beta_license_agreement

Methods included from Domain::BetaGroups

#add_beta_group_beta_testers, #add_beta_group_builds, #beta_group, #beta_group_app, #beta_group_beta_tester_ids, #beta_group_beta_testers, #beta_group_build_ids, #beta_group_builds, #beta_groups, #create_beta_group, #delete_beta_group, #remove_beta_group_beta_testers, #remove_beta_group_builds, #update_beta_group

Methods included from Domain::BetaBuildLocalizations

#beta_build_localization, #beta_build_localization_build, #beta_build_localizations, #create_beta_build_localization, #delete_beta_build_localization, #update_beta_build_localization

Methods included from Domain::BetaAppReviewSubmissions

#beta_app_review_submission, #beta_app_review_submission_build, #beta_app_review_submissions, #create_beta_app_review_submission

Methods included from Domain::BetaAppReviewDetails

#beta_app_review_detail, #beta_app_review_detail_app, #beta_app_review_details, #update_beta_app_review_detail

Methods included from Domain::BetaAppLocalizations

#beta_app_localization, #beta_app_localization_app, #beta_app_localizations, #create_beta_app_localization, #delete_beta_app_localization, #update_beta_app_localization

Methods included from Domain::Apps

#app, #app_app_availability, #app_app_clips, #app_app_custom_product_pages, #app_app_infos, #app_app_price_points, #app_app_price_schedule, #app_app_store_versions, #app_beta_app_localizations, #app_beta_app_review_detail, #app_beta_groups, #app_beta_license_agreement, #app_builds, #app_customer_reviews, #app_end_user_license_agreement, #app_in_app_purchases, #app_pre_order, #app_prerelease_versions, #app_promoted_purchases, #app_review_submissions, #apps, #remove_app_beta_testers, #update_app

Methods included from Domain::AppStoreVersions

#app_store_version, #app_store_version_app_store_review_detail, #app_store_version_app_store_version_experiments, #app_store_version_app_store_version_localizations, #app_store_version_app_store_version_phased_release, #app_store_version_build, #app_store_version_build_id, #app_store_version_customer_reviews, #app_store_version_routing_app_coverage, #create_app_store_version, #delete_app_store_version, #update_app_store_version, #update_app_store_version_build

Methods included from Domain::AppStoreVersionReleaseRequests

#create_app_store_version_release_request

Methods included from Domain::AppStoreVersionPhasedReleases

#create_app_store_version_phased_release, #delete_app_store_version_phased_release, #update_app_store_version_phased_release

Methods included from Domain::AppStoreVersionLocalizations

#app_store_version_localization, #create_app_store_version_localization, #delete_app_store_version_localization, #update_app_store_version_localization

Methods included from Domain::AppPriceSchedules

#app_price_schedule, #app_price_schedule_automatic_prices, #app_price_schedule_base_territory, #app_price_schedule_manual_prices, #create_app_price_schedule

Methods included from Domain::AppPricePoints

#app_price_point, #app_price_point_equalizations

Methods included from Domain::AppInfos

#app_info, #app_info_age_rating_declaration, #app_info_localizations, #app_info_primary_category, #app_info_primary_subcategory_one, #app_info_primary_subcategory_two, #app_info_secondary_category, #app_info_secondary_subcategory_one, #app_info_secondary_subcategory_two, #update_app_info

Methods included from Domain::AppInfoLocalizations

#app_info_localization, #create_app_info_localization, #delete_app_info_localization, #update_app_info_localization

Methods included from Domain::AppCategories

#app_categories, #app_category, #app_category_parent, #app_category_subcategories

Methods included from Domain::AppAvailabilities

#app_availability, #app_availability_available_territories, #create_app_availability

Methods included from Domain::AgeRatingDeclarations

#update_age_rating_declaration

Constructor Details

#initialize(issuer_id, key_id, private_key, request_timeout = 30) ⇒ Client

Returns a new instance of Client.



16
17
18
19
# File 'lib/app_store_connect_api/client.rb', line 16

def initialize(issuer_id, key_id, private_key, request_timeout = 30)
  @authorization = Authorization.new issuer_id, key_id, private_key
  @request_timeout = request_timeout
end

Instance Method Details

#delete(path, body = {}) ⇒ Object



33
34
35
# File 'lib/app_store_connect_api/client.rb', line 33

def delete(path, body = {})
  call_api :delete, path, {}, body
end

#get(path, options = {}) ⇒ Object



21
22
23
# File 'lib/app_store_connect_api/client.rb', line 21

def get(path, options = {})
  call_api :get, path, options
end

#more?(resource) ⇒ Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/app_store_connect_api/client.rb', line 37

def more?(resource)
  not link_to_next_page_in(resource).nil?
end

#next(resource) ⇒ Object



41
42
43
# File 'lib/app_store_connect_api/client.rb', line 41

def next(resource)
  call_api :get, link_to_next_page_in(resource).sub(APP_STORE_CONNECT_API_ROOT_URL, '')
end

#patch(path, body) ⇒ Object



29
30
31
# File 'lib/app_store_connect_api/client.rb', line 29

def patch(path, body)
  call_api :patch, path, {}, body
end

#post(path, body) ⇒ Object



25
26
27
# File 'lib/app_store_connect_api/client.rb', line 25

def post(path, body)
  call_api :post, path, {}, body
end