Sha256: 1a1c69eff07aa3f919566826f334ab1946100b0091e11dcca1e1568aad64c904

Contents?: true

Size: 1.49 KB

Versions: 43

Compression:

Stored size: 1.49 KB

Contents

require_relative 'tunes_client'

module Spaceship
  module Tunes
    class << self
      # This client stores the default client when using the lazy syntax
      # Spaceship.app instead of using the spaceship launcher
      attr_accessor :client

      # Authenticates with Apple's web services. This method has to be called once
      # to generate a valid session. The session will automatically be used from then
      # on.
      #
      # This method will automatically use the username from the Appfile (if available)
      # and fetch the password from the Keychain (if available)
      #
      # @param user (String) (optional): The username (usually the email address)
      # @param password (String) (optional): The password
      #
      # @raise InvalidUserCredentialsError: raised if authentication failed
      #
      # @return (Spaceship::Client) The client the login method was called for
      def login(user = nil, password = nil)
        @client = TunesClient.login(user, password)
      end

      # Open up the team selection for the user (if necessary).
      #
      # If the user is in multiple teams, a team selection is shown.
      # The user can then select a team by entering the number
      #
      # @param team_id (String) (optional): The ID of a iTunesConnect team
      # @param team_name (String) (optional): The name of a iTunesConnect team
      def select_team(team_id: nil, team_name: nil)
        @client.select_team(team_id: team_id, team_name: team_name)
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
fastlane-2.99.1 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.99.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.98.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.97.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.1 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180521050117 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180520050019 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180519050103 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180518050116 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180517050058 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180516050022 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180515050025 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180514050029 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180513050015 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180512050121 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180511050050 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.96.0.beta.20180510050112 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.95.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.95.0.beta.20180509050014 spaceship/lib/spaceship/tunes/spaceship.rb