Class: Spaceship::FreePortalClient
Instance Method Summary
collapse
-
#apps(mac: false) ⇒ Object
-
#create_app!(type, name, bundle_id, mac: false) ⇒ Object
-
#create_development_certificate(csr, mac: false) ⇒ Object
-
#create_device!(device_name, device_id, mac: false) ⇒ Object
-
#create_provisioning_profile!(name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil) ⇒ Object
-
#details_for_app(app) ⇒ Object
-
#devices(mac: false, include_disabled: false) ⇒ Object
-
#download_provisioning_profile(profile_id, mac: false) ⇒ Object
-
#revoke_development_certificate(serial_number, mac: false) ⇒ Object
#create_certificate!, #development_certificates, #distribution_certificates
Instance Method Details
#apps(mac: false) ⇒ Object
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/motion-provisioning/spaceship/free_portal_client.rb', line 50
def apps(mac: false)
paging do |page_number|
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listAppIds.action?clientId=XABBG36SBA", {
teamId: team_id,
pageNumber: page_number,
pageSize: page_size,
sort: 'name=asc'
})
parse_response(r, 'appIds')
end
end
|
#create_app!(type, name, bundle_id, mac: false) ⇒ Object
70
71
72
73
74
75
76
77
78
79
80
81
|
# File 'lib/motion-provisioning/spaceship/free_portal_client.rb', line 70
def create_app!(type, name, bundle_id, mac: false)
params = {
identifier: bundle_id,
name: name,
teamId: team_id
}
ensure_csrf(Spaceship::App)
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/addAppId.action?clientId=XABBG36SBA", params)
parse_response(r, 'appId')
end
|
#create_development_certificate(csr, mac: false) ⇒ Object
91
92
93
94
95
96
97
98
99
100
|
# File 'lib/motion-provisioning/spaceship/free_portal_client.rb', line 91
def create_development_certificate(csr, mac: false)
ensure_csrf(Spaceship::Certificate)
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/submitDevelopmentCSR.action?clientId=XABBG36SBA&teamId=#{team_id}", {
teamId: team_id,
csrContent: csr
})
parse_response(r, 'certRequest')
end
|
#create_device!(device_name, device_id, mac: false) ⇒ Object
40
41
42
43
44
45
46
47
48
|
# File 'lib/motion-provisioning/spaceship/free_portal_client.rb', line 40
def create_device!(device_name, device_id, mac: false)
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/addDevice.action", {
teamId: team_id,
deviceNumber: device_id,
name: device_name
})
parse_response(r, 'device')
end
|
#create_provisioning_profile!(name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/motion-provisioning/spaceship/free_portal_client.rb', line 4
def create_provisioning_profile!(name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil)
ensure_csrf(Spaceship::App)
params = {
teamId: team_id,
appIdId: app_id,
}
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/downloadTeamProvisioningProfile.action", params)
parse_response(r, 'provisioningProfile')
end
|
#details_for_app(app) ⇒ Object
62
63
64
65
66
67
68
|
# File 'lib/motion-provisioning/spaceship/free_portal_client.rb', line 62
def details_for_app(app)
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(app.mac?)}/getAppIdDetail.action", {
teamId: team_id,
identifier: app.app_id
})
parse_response(r, 'appId')
end
|
#devices(mac: false, include_disabled: false) ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/motion-provisioning/spaceship/free_portal_client.rb', line 27
def devices(mac: false, include_disabled: false)
paging do |page_number|
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listDevices.action", {
teamId: team_id,
pageNumber: page_number,
pageSize: page_size,
sort: 'name=asc',
includeRemovedDevices: include_disabled
})
parse_response(r, 'devices')
end
end
|
#download_provisioning_profile(profile_id, mac: false) ⇒ Object
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/motion-provisioning/spaceship/free_portal_client.rb', line 16
def download_provisioning_profile(profile_id, mac: false)
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/downloadProvisioningProfile.action", {
teamId: team_id,
provisioningProfileId: profile_id
})
a = parse_response(r, 'provisioningProfile')
if a['encodedProfile']
a['encodedProfile'].read
end
end
|
#revoke_development_certificate(serial_number, mac: false) ⇒ Object
83
84
85
86
87
88
89
|
# File 'lib/motion-provisioning/spaceship/free_portal_client.rb', line 83
def revoke_development_certificate(serial_number, mac: false)
r = request_plist(:post, "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/revokeDevelopmentCert.action?clientId=XABBG36SBA", {
teamId: team_id,
serialNumber: serial_number,
})
parse_response(r, 'certRequests')
end
|