Integrating QuickBase With Web Services - Gareth Lewis

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Integrating QuickBase With Web Services - Gareth Lewis - Presentation Transcript

    1. Integrating QuickBase with Web Services
      Gareth Lewis, QuickBase User & Author of the QuickBase API Cookbook
    2. 2
      Wrote Ruby SDK for QuickBase in 2005
      to solve for project progress charting needs
      Why use the Ruby SDK for QuickBase?
      You have a problem that can't be solved in the browser with QuickBase or Javascript.
      You have to use the QuickBase API.
      You want a simple language that just does what it's told and is friendly to work with.
      You don't want to write a bunch of code just to get basic things accomplished.
      If you don't like how the Ruby SDK does something, change the source code.
    3. 3
      Get Ruby and the SDK
      The SDK works with Ruby version 1.8.6 or higher.
      It works with JRuby but not with IronRuby, yet.
      Get Ruby: 1-Click installer for Windows:
      http://rubyforge.org/frs/download.php/47082/ruby186-27_rc2.exe
      Get Ruby: Other O.S.:
      http://rubyforge.org/frs/?group_id=426&release_id=27644
      Get JRuby: http://jruby.org/download
      Get the SDK from code.intuit.com
      QuickBase API CookBook:
      https://www.quickbase.com/db/bcdcajmrf
    4. 4
      Ruby SDK Basics
      Put Ruby code in a file with a .rb extension (e.g. authenticate.rb), and run it
      by typing ruby authenticate.rb
      authenticate.rb:
      require 'QuickBaseClient'
      qbc = QuickBase::Client.new("username","password")
      qbc2 = QuickBase::Client.new; qbc2.authenticate("username","password")
      addRecord.rb:
      require 'QuickBaseClient'
      qbc = QuickBase::Client.new("username","password")
      recordId, update_id = qbc.addRecord("bcdcajmrf",{"Name" => "Fred"})
      editRecord.rb:
      require 'QuickBaseClient‘
      qbc = QuickBase::Client.new("username","password")
      qbc.editRecord("bcdcajmrf","1",{"Name" => "Fred"})
      doQuery.rb:
      require 'QuickBaseClient'
      QuickBase::Client.new("username","password").doQuery("bcdcajmrg") {
      |record_xml| print record_xml}
      signOut.rb:
      require 'QuickBaseClient'
      qbc = QuickBase::Client.new("username","password")
      qbc.signOut
    5. 5
      Integration and Automation with Ruby
      Other examples using Ruby:
      • Ruby Scripts as Windows .EXE files
      • Search for records from a command-line
      • QuickBase + 'desktop' applications
      • Watir (Web application testing in Ruby) - Browser automation using Ruby
      • Rails Integration
      (Link to complete examples)
    6. require 'QuickBaseTwitterConnector' # Installed with SDK
      QuickBase::TwitterConnector.new # Starts an interactive session
       
       Please enter the Quickbase username to use for this session: fred_flintstone@internet.com
      Please enter the Quickbase password to use for this session: wilma
      Please enter the Twitter username to use for this session: fred_flintstone
      Please enter the Twitter password to use for this session: wilma
       
      Please enter a number to select the connection type:
       
      1 - Send Twitter messages to QuickBase.
      2 - Send QuickBase messages to Twitter.
      3 - Exchange messages between QuickBase and Twitter.
      4 - Send automated replies from QuickBase to Twitter.
      5 - All the above.
       
      5
       
      Getting 'friends' Twitter Status since Fri, 28 Mar 2008 13:47:24 -0700.
      Getting Direct Messages from Twitter since Fri, 28 Mar 2008 13:47:24 -0700.
      Sending messages from QuickBase to Twitter added since Fri, 28 Mar 2008 13:47:24 -0700.
      Getting Direct Messages from Twitter since Fri, 28 Mar 2008 13:47:24 -0700.
      Automated Direct Message sent to wilma_flintstone: what's for dinner?: rex ribs
       
      6
      Twitter Connector : background process polls QuickBase and Twitter for new records and tweets, sends data in both directions.
    7. 7
      Send HTML Email
      require 'QuickBaseEmailer‘
      def send_email( subject, message, bccRecipients )
      emailBody = "Content-Type: text/html; "
      emailBody << "<HTML><BODY>"
      emailBody << message
      emailBody << "</BODY></HTML>"
      qbe = QuickBase::Emailer.new( "fred@bedrock.com", "wilma" )
      qbe.sendBccEmail( "fred@bedrock.com", # from
      ["fred@bedrock.com", "wilma@bedrock.com"], # to
      bccRecipients, # BCC
      subject,
      emailBody,
      "mail.bedrock.com", # SMTP email server
      25, # SMTP email port
      nil )
      end
      qbc = QuickBase::Client.new( "fred@bedrock.com", "wilma" )
      loop {
      qbc.iterateRecords( "bdcvpsxpy", [ "Record ID#", "subject", "message", "bccRecipients" ],
      nil, nil, "Pending Emails Report" ) { |record |
      send_email( record["subject"], record["message"], record["bccRecipients"].split(/,/) )
      qbc.editRecord( "bdcvpsxpy", record["Record ID#"], { "sent" => "1" } )
      # Exclude from Pending Emails Report
      }
      sleep( 5 ) # wait 5 minutes then check for more emails
      }
      Usage Case Scenario:
      Professional services tech team automates customer requests
      - Customer calls in a request
      - Employee enters request into QuickBase
      - Then calls/emails team to find a technician for the job
      - Now the process is entirely automated with the email script
      Saves 15 minutes per case…
    8. 8
      One RSS feed for multiple tables
      require 'QuickBaseRSSGenerator'
      qbc = QuickBase::Client.new( "username", "password" )
      qbRSSgen = QuickBase::RSSGenerator.new( qbc )
      qbRSSgen.setTitle( "QuickBase Forum/KnowledgeBase RSS" )
      qbRSSgen.setLink( "main" )
      qbRSSgen.setDescription( "RSS view of QuickBase Community Forum and KnowledgeBase" )
      qbRSSgen.addTable("8emtadvk", "Community Forum", { "title" => "6", "description" => "10" }, # Field IDs
      nil, nil, "List Changes", 75 ) # 75 records
      qbRSSgen.addTable( "6mztyxu8", "KnowledgeBase", { "title" => "5", "description" => "6" },
      "{'6'.CT.'API'}", # API KnowledgeBase entries
      nil, nil, 50 ) # 50 records
      rssText = qbRSSgen.generateRSStext
      File.open( "QuickBaseInfoRSS.xml", "w" ) { |file| file.write( rssText ) } # upload to QuickBase ?!
    9. 9
      Summary
      QuickBase is great
      There are a some things that can only be done
      outside the browser, via the API
      Ruby is not the answer to Life, the Universe and Everything
      Ruby will not waste your time
      Ruby is a very pleasant language with tons
      of excellent libraries
      The Ruby SDK aims to help you get QuickBase API
      work done quickly, even if you've never used Ruby
      The examples in this presentation show some of
      what can be done, and how to do it
      See you in the QuickBase Innovation Network !

    + intuitquickbaseintuitquickbase, 1 month ago

    custom

    181 views, 0 favs, 2 embeds more stats

    f you have to use the QuickBase API outside the bro more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 181
      • 146 on SlideShare
      • 35 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 3
    Most viewed embeds
    • 34 views on http://quickbase.intuit.com
    • 1 views on https://quickbase.intuit.com

    more

    All embeds
    • 34 views on http://quickbase.intuit.com
    • 1 views on https://quickbase.intuit.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories