Method: QuickBase::Client.processDatabase

Defined in:
lib/QuickBaseClient.rb

.processDatabase(username, password, appname, chainAPIcalls = nil) ⇒ Object

  • creates a QuickBase::Client,

    • signs into QuickBase

    • connects to a specific application

    • runs code in the associated block

    • signs out of QuickBase

    e.g. QuickBase::Client.processDatabase( “user”, “password”, “my DB” ) { |qbClient,dbid| qbClient.getDBInfo( dbid ) }



3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
# File 'lib/QuickBaseClient.rb', line 3121

def Client.processDatabase( username, password, appname, chainAPIcalls = nil )
   if username and password and appname and block_given?
      begin
         qbClient = Client.new( username, password, appname )
         @chainAPIcalls = chainAPIcalls
         yield qbClient, qbClient.dbid
      rescue StandardError
      ensure
         qbClient.signOut
         @chainAPIcalls = nil
      end
   end
end