lib/provider/fogbugz.rb
# Providers must define an authorize method. This is used to initialize and set authentication
# parameters to access the API
Providers must define an authorize method. This is used to initialize and set authentication
parameters to access the API
Providers must define an authorize method . This is used to initialize and set authentication parameters to access the API
def authorize(auth = {})
      @authentication ||= TicketMaster::Authenticator.new(auth)
      auth = @authentication
      unless auth.uri? && auth.password?
        raise TicketMaster::Exception.new "Please provide the uri and email and password, or an API token"
      end
      begin
        if auth.email.present?
          @fogbugz = ::Fogbugz::Interface.new(:email => auth.email, 
            :uri => auth.uri, :password => auth.password)
          TicketMaster::Provider::Fogbugz.api = @fogbugz
          @fogbugz.authenticate
        else
          @fogbugz = ::Fogbugz::Interface.new(:uri => auth.uri, :token => auth.password)
          TicketMaster::Provider::Fogbugz.api = @fogbugz
        end
      rescue Exception => ex
        warn "There was a problem authenticaticating #{ex.message}"
      end
    end
def authorize ( auth = { } ) @authentication ||= TicketMaster :: Authenticator . new ( auth ) auth = @authentication unless auth . uri? && auth . password? raise TicketMaster :: Exception . new "Please provide the uri and email and password, or an API token" end begin if auth . email . present? @fogbugz = :: Fogbugz :: Interface . new ( :email => auth . email , :uri => auth . uri , :password => auth . password ) TicketMaster :: Provider :: Fogbugz . api = @fogbugz @fogbugz . authenticate else @fogbugz = :: Fogbugz :: Interface . new ( :uri => auth . uri , :token => auth . password ) TicketMaster :: Provider :: Fogbugz . api = @fogbugz end rescue Exception => ex warn "There was a problem authenticaticating #{ex.message}" end end
Providers must define an authorize method.
Providers must define an authorize method .
auth
<not_specific>