Class: Fastlane::Actions::FirebaseListAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::FirebaseListAction
- Defined in:
- lib/fastlane/plugin/firebase/actions/firebase_list_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
25 26 27 |
# File 'lib/fastlane/plugin/firebase/actions/firebase_list_action.rb', line 25 def self. ["Tomas Kohout"] end |
.available_options ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/fastlane/plugin/firebase/actions/firebase_list_action.rb', line 38 def self. [ FastlaneCore::ConfigItem.new(key: :username, env_name: "FIREBASE_USERNAME", description: "Username for your google account", optional: false), FastlaneCore::ConfigItem.new(key: :project_number, env_name: "FIREBASE_PROJECT_NUMBER", description: "Project number", optional: true) ] end |
.description ⇒ Object
21 22 23 |
# File 'lib/fastlane/plugin/firebase/actions/firebase_list_action.rb', line 21 def self.description "An unofficial tool to access Firebase" end |
.details ⇒ Object
33 34 35 36 |
# File 'lib/fastlane/plugin/firebase/actions/firebase_list_action.rb', line 33 def self.details # Optional: "Firebase helps you list your projects, create applications, download configuration files and more..." end |
.is_supported?(platform) ⇒ Boolean
51 52 53 54 55 56 57 |
# File 'lib/fastlane/plugin/firebase/actions/firebase_list_action.rb', line 51 def self.is_supported?(platform) # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md # # [:ios, :mac, :android].include?(platform) true end |
.return_value ⇒ Object
29 30 31 |
# File 'lib/fastlane/plugin/firebase/actions/firebase_list_action.rb', line 29 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fastlane/plugin/firebase/actions/firebase_list_action.rb', line 6 def self.run(params) manager = Firebase::Manager.new # Login api = manager.login(params[:username]) # List projects projects = api.project_list() projects.each_with_index { |p, i| UI. "#{i+1}. #{p["displayName"]}" p["clientSummary"].sort {|left, right| left["clientId"] <=> right["clientId"] }.each_with_index { |client, j| UI. " - #{client["clientId"]} (#{client["displayName"]})" } } end |