Class: Fastlane::Actions::HuaweiAppgalleryConnectUpdateAppLocalizationAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_update_app_localization.rb

Class Method Summary collapse

Class Method Details

.authorsObject



21
22
23
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_update_app_localization.rb', line 21

def self.authors
  ['Shreejan Shrestha', 'Nikita Blizniuk']
end

.available_optionsObject



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_update_app_localization.rb', line 31

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :client_id,
                                 env_name: 'HUAWEI_APPGALLERY_CONNECT_CLIENT_ID',
                                 description: 'Huawei AppGallery Connect Client ID',
                                 optional: false,
                                 type: String),

    FastlaneCore::ConfigItem.new(key: :client_secret,
                                 env_name: 'HUAWEI_APPGALLERY_CONNECT_CLIENT_SECRET',
                                 description: 'Huawei AppGallery Connect Client Secret',
                                 optional: false,
                                 type: String),

    FastlaneCore::ConfigItem.new(key: :app_id,
                                 env_name: 'HUAWEI_APPGALLERY_CONNECT_APP_ID',
                                 description: 'Huawei AppGallery Connect App ID',
                                 optional: false,
                                 type: String),

    FastlaneCore::ConfigItem.new(key: :metadata_path,
                                 env_name: 'HUAWEI_APPGALLERY_CONNECT_METADATA_PATH',
                                 description: 'Huawei Appgallery Connect Metadata Path. Default is fastalane/metadata/huawei',
                                 optional: true,
                                 type: String)
  ]
end

.descriptionObject



17
18
19
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_update_app_localization.rb', line 17

def self.description
  'Huawei AppGallery Connect Plugin'
end

.detailsObject



27
28
29
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_update_app_localization.rb', line 27

def self.details
  'Fastlane plugin to upload Android app to Huawei AppGallery Connect'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
62
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_update_app_localization.rb', line 59

def self.is_supported?(platform)
  [:android].include?(platform)
  true
end

.return_valueObject



25
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_update_app_localization.rb', line 25

def self.return_value; end

.run(params) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_update_app_localization.rb', line 7

def self.run(params)
  token = Helper::HuaweiAppgalleryConnectHelper.get_token(params[:client_id], params[:client_secret])

  if token.nil?
    UI.message('Cannot retrieve token, please check your client ID and client secret')
  else
    Helper::HuaweiAppgalleryConnectHelper.update_app_localization_info(token, params)
  end
end