lib/spaceship/tunes/tunes_client.rb in spaceship-0.13.0 vs lib/spaceship/tunes/tunes_client.rb in spaceship-0.13.1
- old
+ new
@@ -253,11 +253,11 @@
r = request(:get, "ra/apps/#{app_id}/overview")
platforms = parse_response(r, 'data')['platforms']
# We only support platforms that exist ATM
platform = platforms.find do |p|
- ['ios', 'osx', 'appletvos'].include? p['platformString']
+ ['ios', 'osx'].include? p['platformString']
end
version = platform[(is_live ? 'deliverableVersion' : 'inFlightVersion')]
return nil unless version
version_id = version['id']
@@ -415,15 +415,17 @@
r = request(:get, '/WebObjects/iTunesConnect.woa/ra/apps/version/ref')
data = parse_response(r, 'data')
Spaceship::Tunes::AppVersionRef.factory(data)
end
- # Fetches the User Detail information from ITC
+ # Fetches the User Detail information from ITC. This gets called often and almost never changes
+ # so we cache it
# @return [UserDetail] the response
def user_detail_data
+ return @cached if @cached
r = request(:get, '/WebObjects/iTunesConnect.woa/ra/user/detail')
data = parse_response(r, 'data')
- Spaceship::Tunes::UserDetail.factory(data)
+ @cached ||= Spaceship::Tunes::UserDetail.factory(data)
end
#####################################################
# @!group CandiateBuilds
#####################################################