Sha256: cab5277ce9207c60ebb80416c9de3138c745ecb4939bdb5798867e1ff25db5cc

Contents?: true

Size: 1.27 KB

Versions: 114

Compression:

Stored size: 1.27 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
      def select_team
        @client.select_team
      end
    end
  end
end

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
fastlane-2.90.0.beta.20180409050033 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0.beta.20180408050113 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0.beta.20180407050037 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0.beta.20180406050006 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0.beta.20180405050125 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0.beta.20180404050031 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.90.0.beta.20180403050108 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.89.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.89.0.beta.20180402050042 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.89.0.beta.20180401050120 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.89.0.beta.20180331050023 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.89.0.beta.20180330050046 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.89.0.beta.20180329050050 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.89.0.beta.20180328050040 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.88.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.88.0.beta.20180327050037 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.88.0.beta.20180325050025 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.88.0.beta.20180324050059 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.87.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.87.0.beta.20180323050014 spaceship/lib/spaceship/tunes/spaceship.rb