Class: Fastlane::Actions::GalaxyStoreDeveloperInfoAction

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

Constant Summary collapse

PUB_SCOPE =
"publishing"

Class Method Summary collapse

Class Method Details

.authorsObject



23
24
25
# File 'lib/fastlane/plugin/galaxy_store_developer/actions/galaxy_store_developer_info.rb', line 23

def self.authors
  ["Rim Ganiev"]
end

.available_optionsObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/fastlane/plugin/galaxy_store_developer/actions/galaxy_store_developer_info.rb', line 35

def self.available_options
  [
      FastlaneCore::ConfigItem.new(key: :sa_id,
                                   env_name: "GALAXY_STORE_DEVELOPER_SA_ID",
                                   description: "Service Account (SA) ID",
                                   optional: false,
                                   type: String),
      FastlaneCore::ConfigItem.new(key: :key_path,
                                   env_name: "GALAXY_STORE_DEVELOPER_SA_KEY_PATH",
                                   description: "Path for the SA's private key (PEM)",
                                   optional: false,
                                   type: String),
      FastlaneCore::ConfigItem.new(key: :app_id,
                                   env_name: "GALAXY_STORE_DEVELOPER_APP_ID",
                                   description: "Content ID of the app",
                                   optional: false,
                                   type: String)
  ]
end

.descriptionObject



19
20
21
# File 'lib/fastlane/plugin/galaxy_store_developer/actions/galaxy_store_developer_info.rb', line 19

def self.description
  "Samsung Developer API integration - Getting app info"
end

.detailsObject



31
32
33
# File 'lib/fastlane/plugin/galaxy_store_developer/actions/galaxy_store_developer_info.rb', line 31

def self.details
  "Fastlane plugin to interacting with Samsung Galaxy Store API"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


55
56
57
58
# File 'lib/fastlane/plugin/galaxy_store_developer/actions/galaxy_store_developer_info.rb', line 55

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

.return_valueObject



27
28
29
# File 'lib/fastlane/plugin/galaxy_store_developer/actions/galaxy_store_developer_info.rb', line 27

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/fastlane/plugin/galaxy_store_developer/actions/galaxy_store_developer_info.rb', line 10

def self.run(params)

  accessToken = Helper::GalaxyStoreDeveloperHelper.get_access_token(params[:sa_id], PUB_SCOPE, params[:key_path])

  response = Helper::GalaxyStoreDeveloperHelper.get_app_info(params[:sa_id], accessToken, params[:app_id])
  puts JSON.pretty_generate(response)

end