Closed abgier-blitzm closed 5 years ago
Both URL and query parameters are passed as the first argument. For example:
app_store_connect.profiles(
limit: 1,
filter: {
name: 'Kyle Decot\'s Development Profile',
profile_type: 'IOS_APP_DEVELOPMENT'
}
)
If you want to filter by Bundle ID (com.kyledecot.Example
) I think you'd need to do something like:
require 'app_store_connect'
app_store_connect = AppStoreConnect::Client.new
bundle_id_identifier = 'com.kyledecot.Example'
response = app_store_connect.profiles(
include: 'bundleId',
fields: {
profiles: 'bundleId',
bundle_ids: 'identifier'
}
)
bundle_id = response['included']
.select { |i| i['type'] == 'bundleIds' }
.detect({}) { |i| i.dig('attributes', 'identifier') == bundle_id_identifier }
profiles = response['data']
.select { |d| bundle_id['id'] == d.dig('relationships', 'bundleId', 'data', 'id') }
https://developer.apple.com/documentation/appstoreconnectapi/list_and_download_profiles#query-parameters
Lets say I want to call
GET https://api.appstoreconnect.apple.com/v1/profiles
and filter bybundleIds
.How would I do this? Is it still done from
app_store_connect.profiles
?