Module: Googlepub
- Defined in:
- lib/googlepub.rb,
lib/googlepub/apk.rb,
lib/googlepub/auth.rb,
lib/googlepub/inapps.rb,
lib/googlepub/options.rb,
lib/googlepub/metadata.rb
Defined Under Namespace
Classes: APK, Auth, Inapps, Metadata, Options
Constant Summary collapse
- ROOT =
File.(File.dirname(__FILE__) + '/..')
- VERSION =
"0.0.4"
Class Method Summary collapse
- .call_apk(options = {}) ⇒ Object
- .call_inapps(options = {}) ⇒ Object
- .call_metadata(options = {}) ⇒ Object
Class Method Details
.call_apk(options = {}) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/googlepub.rb', line 42 def self.call_apk( = {}) if !["file"] p "Please provide the file to input: " @file = gets.chomp if !@file p "No APK file provided".red end else @file = ["file"] end if !["track"] p "Please provide the Track for the APK [alpha, beta, prod] (for ease use --track)" @track = gets.chomp if !@track p "No track provided".red end else @track = ["track"] end if !["version"] p "Please provide the Version (Code) for the APK" @version = gets.chomp else @version = ["version"] end if !@version p "Invalid request, Please provide a Version!".red exit (1) end @apk = Googlepub::APK.new(@file, @track) @apk.upload_apk @apk.select_version(@version) end |
.call_inapps(options = {}) ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/googlepub.rb', line 79 def self.call_inapps( = {}) if !["sku"] puts "SKU (Product Id) of the In-App Purchase (eg: \"com.keshav.inapp.001\"):" @sku = gets.chomp else @sku = ["sku"] end @iap = Googlepub::Inapps.new(@sku, ["language"]) @iap.find_inapp if ["price"] || ["title"] || ["description"] @iap.edit_inapp() else puts "No option passed to Edit the In-App" end end |
.call_metadata(options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/googlepub.rb', line 11 def self.( = {}) @pack = Googlepub::Metadata.new(["language"]) if ["store"] p "Going to edit Store Listing" @pack.edit_listings(["title"], ["fullDescription"], ["shortDescription"], ["video"]) end if ["icon"] p "Going to Upload Icon on GooglePlay Store:" @pack.imagefile("icon", ["icon"]) end if ["details"] p "Going to edit Details" @pack.edit_details(["website"], ["email"], ["phone"]) end if ["screenshots"] p "Going to Update Screenshots" types = ["featureGraphic", "phoneScreenshots", "promoGraphic", "sevenInchScreenshots", "tenInchScreenshots", "tvBanner", "tvScreenshots", "wearScreenshots"] types.each do |t| if [t] screens = [t].split(",") screens.each do |sc| @pack.imagefile(t, sc) end end end end end |