Class: HockeyApp::IOSVersionUrls

Inherits:
Object
  • Object
show all
Defined in:
lib/hockeyapp/services/ios_urls.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ IOSVersionUrls

Returns a new instance of IOSVersionUrls.



22
23
24
# File 'lib/hockeyapp/services/ios_urls.rb', line 22

def initialize version
  @version = version
end

Instance Method Details

#direct_download_urlObject



26
27
28
# File 'lib/hockeyapp/services/ios_urls.rb', line 26

def direct_download_url
  "https://rink.hockeyapp.net/api/2/apps/#{@version.app.public_identifier}/app_versions/#{@version.id.to_s}?format=ipa"
end

#install_urlObject



30
31
32
33
# File 'lib/hockeyapp/services/ios_urls.rb', line 30

def install_url
  location = "https://rink.hockeyapp.net/api/2/apps/#{@version.app.public_identifier}/app_versions/#{@version.id.to_s}?format=plist"
  "itms-services://?action=download-manifest&url=#{CGI::escape(location)}"
end