Sha256: eaeced5c9c9aa0864d5b9bc1526be15bd3e77b3e188ee2143052fce0aec221db

Contents?: true

Size: 1.51 KB

Versions: 13

Compression:

Stored size: 1.51 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: team_id = nil, team_name: team_name = nil)
        @client.select_team(team_id: team_id, team_name: team_name)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fastlane-2.93.0.beta.20180418050020 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.92.1 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.93.0.beta.20180417050013 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.92.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.92.0.beta.20180416050023 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.92.0.beta.20180415050019 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.92.0.beta.20180414050023 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.91.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.91.0.beta.20180413050017 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0.beta.20180412050111 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0.beta.20180411050056 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0.beta.20180410050128 spaceship/lib/spaceship/tunes/spaceship.rb