Class: Spaceship::PortalClient
- Inherits:
-
Client
- Object
- Client
- Spaceship::PortalClient
- Defined in:
- lib/motion-provisioning/spaceship/portal_client.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#create_certificate!(type, csr, app_id = nil) ⇒ Object
Fix a bug in Fastlane where the slug is hardcoded to ios.
- #development_certificates(mac: false) ⇒ Object
- #distribution_certificates(mac: false) ⇒ Object
Instance Method Details
#create_certificate!(type, csr, app_id = nil) ⇒ Object
Fix a bug in Fastlane where the slug is hardcoded to ios
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/motion-provisioning/spaceship/portal_client.rb', line 19 def create_certificate!(type, csr, app_id = nil) ensure_csrf mac = Spaceship::Portal::Certificate::MAC_CERTIFICATE_TYPE_IDS.keys.include?(type) r = request(:post, "account/#{platform_slug(mac)}/certificate/submitCertificateRequest.action", { teamId: team_id, type: type, csrContent: csr, appIdId: app_id # optional }) parse_response(r, 'certRequest') end |
#development_certificates(mac: false) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/motion-provisioning/spaceship/portal_client.rb', line 11 def development_certificates(mac: false) paging do |page_number| r = request(:post, "https://developerservices2.apple.com/services/QH65B2/#{platform_slug(mac)}/listAllDevelopmentCerts.action?clientId=XABBG36SBA&teamId=#{team_id}") parse_response(r, 'certificates') end end |
#distribution_certificates(mac: false) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/motion-provisioning/spaceship/portal_client.rb', line 4 def distribution_certificates(mac: false) paging do |page_number| r = request(:post, "https://developerservices2.apple.com/services/QH65B2/#{platform_slug(mac)}/downloadDistributionCerts.action?clientId=XABBG36SBA&teamId=#{team_id}") parse_response(r, 'certificates') end end |