ipp_quickbase_devkit 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +87 -0
- data/README.rdoc +112 -0
- data/doc/QuickBaseClient.rb.htm +1896 -0
- data/doc/ReleaseNotes.txt +43 -0
- data/doc/qbc.makeCSVFile.qbc +4 -0
- data/doc/qbc.makeCSVFile.rb +4 -0
- data/doc/quickbase_adapter.rb.htm +399 -0
- data/examples/cookbookfiles/QuickBaseAPICookbook.html +2590 -0
- data/examples/cookbookfiles/addChangeRemoveUserRole.rb +21 -0
- data/examples/cookbookfiles/addOrEditRecord.rb +10 -0
- data/examples/cookbookfiles/application_object.rb +55 -0
- data/examples/cookbookfiles/applyRubyFormulas.rb +10 -0
- data/examples/cookbookfiles/average.rb +27 -0
- data/examples/cookbookfiles/backupApplication.rb +8 -0
- data/examples/cookbookfiles/cacheSchemas.rb +53 -0
- data/examples/cookbookfiles/calculateRunningTotals.rb +11 -0
- data/examples/cookbookfiles/copyrecords.rb +73 -0
- data/examples/cookbookfiles/count.rb +26 -0
- data/examples/cookbookfiles/createRecordNavigatorHTML.rb +42 -0
- data/examples/cookbookfiles/createReportDashboard.rb +35 -0
- data/examples/cookbookfiles/createTable.rb +12 -0
- data/examples/cookbookfiles/deviation.rb +25 -0
- data/examples/cookbookfiles/downloadCookbook.rb +97 -0
- data/examples/cookbookfiles/downloadFile.rb +10 -0
- data/examples/cookbookfiles/downloadFilesToFolder.rb +81 -0
- data/examples/cookbookfiles/downloadToTextFile.rb +64 -0
- data/examples/cookbookfiles/dumpSchema.rb +11 -0
- data/examples/cookbookfiles/duplicateRecord.rb +8 -0
- data/examples/cookbookfiles/dynamicMethods.rb +33 -0
- data/examples/cookbookfiles/editRecords.rb +15 -0
- data/examples/cookbookfiles/findJohnsLast10Records.rb +17 -0
- data/examples/cookbookfiles/findRubyRecords.rb +17 -0
- data/examples/cookbookfiles/formatCurrency.rb +24 -0
- data/examples/cookbookfiles/formatDate.rb +10 -0
- data/examples/cookbookfiles/formatDuration.rb +27 -0
- data/examples/cookbookfiles/formatPercent.rb +24 -0
- data/examples/cookbookfiles/getAllValuesForFields.rb +18 -0
- data/examples/cookbookfiles/getAppDTMInfo.rb +29 -0
- data/examples/cookbookfiles/getApplicationVariable.rb +5 -0
- data/examples/cookbookfiles/getChildTableDBID.rb +11 -0
- data/examples/cookbookfiles/getColumnListForReport.rb +6 -0
- data/examples/cookbookfiles/getFieldChoices.rb +13 -0
- data/examples/cookbookfiles/getFieldIDs.rb +6 -0
- data/examples/cookbookfiles/getFieldNames.rb +6 -0
- data/examples/cookbookfiles/getLastModTime.rb +8 -0
- data/examples/cookbookfiles/getLastRecModTime.rb +8 -0
- data/examples/cookbookfiles/getNumRecords.rb +8 -0
- data/examples/cookbookfiles/getNumTables.rb +4 -0
- data/examples/cookbookfiles/getRecord.rb +5 -0
- data/examples/cookbookfiles/getRecordDisplayURL.rb +13 -0
- data/examples/cookbookfiles/getRecordsAddedToday.rb +20 -0
- data/examples/cookbookfiles/getRecordsAsJSON.rb +6 -0
- data/examples/cookbookfiles/getReportNames.rb +25 -0
- data/examples/cookbookfiles/getRoleInfo.rb +48 -0
- data/examples/cookbookfiles/getServerStatus.rb +11 -0
- data/examples/cookbookfiles/getSortListForReport.rb +6 -0
- data/examples/cookbookfiles/getTableIDs.rb +6 -0
- data/examples/cookbookfiles/getTableName.rb +8 -0
- data/examples/cookbookfiles/getTableNames.rb +25 -0
- data/examples/cookbookfiles/getTimeCreated.rb +8 -0
- data/examples/cookbookfiles/getTimeInMilliseconds.rb +5 -0
- data/examples/cookbookfiles/getUserInfo.rb +26 -0
- data/examples/cookbookfiles/getUserRole.rb +15 -0
- data/examples/cookbookfiles/intranet.rb +101 -0
- data/examples/cookbookfiles/isAverageField.rb +17 -0
- data/examples/cookbookfiles/isDbidString.rb +8 -0
- data/examples/cookbookfiles/isTotalField.rb +16 -0
- data/examples/cookbookfiles/iterateDBPages.rb +8 -0
- data/examples/cookbookfiles/iterateFilteredRecords.rb +12 -0
- data/examples/cookbookfiles/iterateJoinRecords.rb +68 -0
- data/examples/cookbookfiles/iterateRecordInfos.rb +8 -0
- data/examples/cookbookfiles/iterateRecords.rb +23 -0
- data/examples/cookbookfiles/iterateSummaryRecords.rb +13 -0
- data/examples/cookbookfiles/iterateUnionRecords.rb +38 -0
- data/examples/cookbookfiles/listAccessibleApplications.rb +6 -0
- data/examples/cookbookfiles/logRequestAndResponseXML.rb +8 -0
- data/examples/cookbookfiles/lookupFieldPropertyByName.rb +62 -0
- data/examples/cookbookfiles/lookupFieldTypeByName.rb +10 -0
- data/examples/cookbookfiles/makeCSVFile.rb +4 -0
- data/examples/cookbookfiles/makeSlideShow.rb +42 -0
- data/examples/cookbookfiles/makerecs.rb +64 -0
- data/examples/cookbookfiles/max.rb +26 -0
- data/examples/cookbookfiles/min.rb +26 -0
- data/examples/cookbookfiles/percent.rb +29 -0
- data/examples/cookbookfiles/printChildElements.rb +54 -0
- data/examples/cookbookfiles/printNewRecords.rb +12 -0
- data/examples/cookbookfiles/processRESTRequest.rb +21 -0
- data/examples/cookbookfiles/provisionAndInviteNewUser.rb +13 -0
- data/examples/cookbookfiles/purgeRecords.rb +15 -0
- data/examples/cookbookfiles/quickbase_adapter.rb.htm +397 -0
- data/examples/cookbookfiles/quickbase_record_finder.zip +0 -0
- data/examples/cookbookfiles/recordAndFieldIterator.rb +24 -0
- data/examples/cookbookfiles/runImport.rb +9 -0
- data/examples/cookbookfiles/runQuickBaseTwitterConnector.rb +41 -0
- data/examples/cookbookfiles/sendToQuickBase.rb +33 -0
- data/examples/cookbookfiles/setDBvar.rb +6 -0
- data/examples/cookbookfiles/showRequestAndResponseXML.rb +8 -0
- data/examples/cookbookfiles/sqlQuery.rb +11 -0
- data/examples/cookbookfiles/stopOnError.rb +10 -0
- data/examples/cookbookfiles/sum.rb +26 -0
- data/examples/cookbookfiles/twitterFromQuickBase.rb +42 -0
- data/examples/cookbookfiles/twitterWithQuickBase.rb +36 -0
- data/examples/cookbookfiles/uploadCSVData.rb +20 -0
- data/examples/cookbookfiles/uploadExcelData.rb +22 -0
- data/examples/cookbookfiles/uploadFileEveryHour.rb +18 -0
- data/examples/cookbookfiles/uploadFileIntoNewRecord.rb +8 -0
- data/examples/cookbookfiles/uploadFilesFromFolder.exe +0 -0
- data/examples/cookbookfiles/uploadFilesFromFolder.rb +69 -0
- data/examples/cookbookfiles/useCompanyURL.rb +12 -0
- data/examples/cookbookfiles/userRoles.rb +49 -0
- data/examples/cookbookfiles/watchCommunityForum.rb +5 -0
- data/examples/cookbookfiles/wikifyTable.rb +29 -0
- data/examples/cookbookfiles/xmlShortcuts.rb +33 -0
- data/examples/pmp/app/controllers/application.rb +7 -0
- data/examples/pmp/app/controllers/contacts_controller.rb +8 -0
- data/examples/pmp/app/controllers/document_library_controller.rb +2 -0
- data/examples/pmp/app/controllers/issues_controller.rb +5 -0
- data/examples/pmp/app/controllers/projects_controller.rb +22 -0
- data/examples/pmp/app/controllers/resources_controller.rb +2 -0
- data/examples/pmp/app/controllers/tasks_controller.rb +13 -0
- data/examples/pmp/app/controllers/time_cards_controller.rb +5 -0
- data/examples/pmp/app/helpers/application_helper.rb +3 -0
- data/examples/pmp/app/helpers/contacts_helper.rb +2 -0
- data/examples/pmp/app/helpers/document_library_helper.rb +2 -0
- data/examples/pmp/app/helpers/issues_helper.rb +2 -0
- data/examples/pmp/app/helpers/projects_helper.rb +2 -0
- data/examples/pmp/app/helpers/resources_helper.rb +2 -0
- data/examples/pmp/app/helpers/tasks_helper.rb +2 -0
- data/examples/pmp/app/helpers/time_cards_helper.rb +2 -0
- data/examples/pmp/app/models/contacts.rb +26 -0
- data/examples/pmp/app/models/document_library.rb +2 -0
- data/examples/pmp/app/models/issues.rb +6 -0
- data/examples/pmp/app/models/projects.rb +26 -0
- data/examples/pmp/app/models/resources.rb +2 -0
- data/examples/pmp/app/models/tasks.rb +12 -0
- data/examples/pmp/app/models/time_cards.rb +7 -0
- data/examples/pmp/app/schemas/contacts.xml +1 -0
- data/examples/pmp/app/schemas/document_library.xml +1 -0
- data/examples/pmp/app/schemas/issues.xml +1 -0
- data/examples/pmp/app/schemas/pmp.xml +1 -0
- data/examples/pmp/app/schemas/projects.xml +1 -0
- data/examples/pmp/app/schemas/readme.txt +8 -0
- data/examples/pmp/app/schemas/resources.xml +1 -0
- data/examples/pmp/app/schemas/tasks.xml +1 -0
- data/examples/pmp/app/schemas/time_cards.xml +1 -0
- data/examples/pmp/app/views/contacts/companies.rhtml +31 -0
- data/examples/pmp/app/views/contacts/project_contacts.rhtml +31 -0
- data/examples/pmp/app/views/issues/filter_issues.rhtml +26 -0
- data/examples/pmp/app/views/layouts/application.rhtml +56 -0
- data/examples/pmp/app/views/projects/all_projects.rhtml +33 -0
- data/examples/pmp/app/views/projects/home.rhtml +11 -0
- data/examples/pmp/app/views/projects/my_open_projects.rhtml +27 -0
- data/examples/pmp/app/views/projects/open_projects.rhtml +44 -0
- data/examples/pmp/app/views/projects/project_sorted_by_company.rhtml +40 -0
- data/examples/pmp/app/views/projects/projects_sorted_by_priority.rhtml +30 -0
- data/examples/pmp/app/views/projects/updated_projects.rhtml +0 -0
- data/examples/pmp/app/views/tasks/all_tasks.rhtml +27 -0
- data/examples/pmp/app/views/tasks/search.rhtml +23 -0
- data/examples/pmp/app/views/tasks/search2.rhtml +23 -0
- data/examples/pmp/app/views/tasks/search3.rhtml +23 -0
- data/examples/pmp/app/views/time_cards/summary.rhtml +38 -0
- data/examples/pmp/config/boot.rb +45 -0
- data/examples/pmp/config/database.yml +30 -0
- data/examples/pmp/config/environment.rb +60 -0
- data/examples/pmp/config/environments/development.rb +21 -0
- data/examples/pmp/config/environments/production.rb +18 -0
- data/examples/pmp/config/environments/test.rb +19 -0
- data/examples/pmp/config/routes.rb +23 -0
- data/examples/pmp/db/migrate/001_create_projects.rb +10 -0
- data/examples/pmp/db/migrate/002_create_tasks.rb +10 -0
- data/examples/pmp/db/migrate/003_create_issues.rb +10 -0
- data/examples/pmp/db/migrate/004_create_document_libraries.rb +10 -0
- data/examples/pmp/db/migrate/005_create_resources.rb +10 -0
- data/examples/pmp/db/migrate/006_create_time_cards.rb +10 -0
- data/examples/pmp/db/migrate/007_create_contacts.rb +10 -0
- data/examples/pmp/public/404.html +30 -0
- data/examples/pmp/public/500.html +30 -0
- data/examples/pmp/public/app.index.html +277 -0
- data/examples/pmp/public/dispatch.cgi +10 -0
- data/examples/pmp/public/dispatch.fcgi +24 -0
- data/examples/pmp/public/dispatch.rb +10 -0
- data/examples/pmp/public/favicon.ico +0 -0
- data/examples/pmp/public/images/rails.png +0 -0
- data/examples/pmp/public/javascripts/application.js +2 -0
- data/examples/pmp/public/javascripts/controls.js +833 -0
- data/examples/pmp/public/javascripts/dragdrop.js +942 -0
- data/examples/pmp/public/javascripts/effects.js +1088 -0
- data/examples/pmp/public/javascripts/prototype.js +2515 -0
- data/examples/pmp/public/robots.txt +1 -0
- data/examples/pmp/test/fixtures/contacts.yml +5 -0
- data/examples/pmp/test/fixtures/document_libraries.yml +5 -0
- data/examples/pmp/test/fixtures/issues.yml +5 -0
- data/examples/pmp/test/fixtures/projects.yml +5 -0
- data/examples/pmp/test/fixtures/resources.yml +5 -0
- data/examples/pmp/test/fixtures/tasks.yml +5 -0
- data/examples/pmp/test/fixtures/time_cards.yml +5 -0
- data/examples/pmp/test/functional/contacts_controller_test.rb +18 -0
- data/examples/pmp/test/functional/document_library_controller_test.rb +18 -0
- data/examples/pmp/test/functional/issues_controller_test.rb +18 -0
- data/examples/pmp/test/functional/projects_controller_test.rb +18 -0
- data/examples/pmp/test/functional/resources_controller_test.rb +18 -0
- data/examples/pmp/test/functional/tasks_controller_test.rb +18 -0
- data/examples/pmp/test/functional/time_cards_controller_test.rb +18 -0
- data/examples/pmp/test/test_helper.rb +28 -0
- data/examples/pmp/test/unit/contacts_test.rb +10 -0
- data/examples/pmp/test/unit/document_library_test.rb +10 -0
- data/examples/pmp/test/unit/issues_test.rb +10 -0
- data/examples/pmp/test/unit/projects_test.rb +10 -0
- data/examples/pmp/test/unit/resources_test.rb +10 -0
- data/examples/pmp/test/unit/tasks_test.rb +10 -0
- data/examples/pmp/test/unit/time_cards_test.rb +10 -0
- data/lib/QuickBaseClient.rb +5054 -0
- data/lib/QuickBaseCommandLineClient.rb +401 -0
- data/lib/QuickBaseContactsAppBuilder.rb +419 -0
- data/lib/QuickBaseEmailer.rb +334 -0
- data/lib/QuickBaseEventNotifier.rb +592 -0
- data/lib/QuickBaseMisc.rb +96 -0
- data/lib/QuickBaseObjects.rb +566 -0
- data/lib/QuickBaseRSSGenerator.rb +286 -0
- data/lib/QuickBaseTextData.rb +545 -0
- data/lib/QuickBaseTwitterConnector.rb +300 -0
- data/lib/QuickBaseWebClient.rb +126 -0
- data/lib/WorkPlaceClient.rb +45 -0
- data/lib/qbc.makeCSVFile.qbc +4 -0
- data/lib/qbc.makeCSVFile.rb +17 -0
- data/lib/quickbase_adapter.rb +320 -0
- data/lib/runFieldEntryDialog.rb +151 -0
- data/lib/runOfflineFieldEntryDialog.rb +203 -0
- data/rakefile +100 -0
- data/test/run_tests.bat +7 -0
- data/test/spec_all_tests.rb +13 -0
- data/test/spec_smoke_tests.rb +58 -0
- data/test/spec_workplace_addrecord_test.rb +46 -0
- data/test/spec_workplace_base_test.rb +57 -0
- data/test/spec_workplace_editrecord_test.rb +38 -0
- data/test/spec_workplace_json_test.rb +38 -0
- data/test/spec_workplace_objects_test.rb +39 -0
- data/test/spec_workplace_smoke_tests.rb +45 -0
- metadata +353 -0
@@ -0,0 +1,8 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseClient'
|
3
|
+
|
4
|
+
# change "username" "password" to your QuickBase username and password
|
5
|
+
qbc = QuickBase::Client.new("username","password")
|
6
|
+
qbc.getDBInfo("8emtadvk")
|
7
|
+
lastModifiedTimeString = qbc.formatFieldValue(qbc.lastModifiedTime,"timestamp")
|
8
|
+
puts "The last thing modified in the QuickBase Community Forum was at #{lastModifiedTimeString} (#{qbc.lastModifiedTime})."
|
@@ -0,0 +1,8 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseClient'
|
3
|
+
|
4
|
+
# change "username" "password" to your QuickBase username and password
|
5
|
+
qbc = QuickBase::Client.new("username","password")
|
6
|
+
qbc.getDBInfo("8emtadvk")
|
7
|
+
lastRecModTimeString = qbc.formatFieldValue(qbc.lastRecModTime,"timestamp")
|
8
|
+
puts "A record was last modified in the QuickBase Community Forum at #{lastRecModTimeString} (#{qbc.lastRecModTime})."
|
@@ -0,0 +1,8 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseClient'
|
3
|
+
|
4
|
+
# change "username" "password" to your QuickBase username and password
|
5
|
+
qbc = QuickBase::Client.new("username","password")
|
6
|
+
numRecords = qbc.getNumRecords("8emtadvk")
|
7
|
+
puts "There are #{numRecords} in the QuickBase Community Forum database"
|
8
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseMisc'
|
3
|
+
|
4
|
+
r = QuickBase::Misc.decimalToBase32(24105)
|
5
|
+
puts "<a href=\"https://www.quickbase.com/db/8emtadvk?a=dr&r=#{r}\">Ruby API home page</a>"
|
6
|
+
|
7
|
+
=begin
|
8
|
+
|
9
|
+
The above code prints this HTML link -
|
10
|
+
|
11
|
+
<a href="https://www.quickbase.com/db/8emtadvk?a=dr&r=ztj">Ruby API home page</a>
|
12
|
+
|
13
|
+
=end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseClient'
|
3
|
+
require 'Date'
|
4
|
+
|
5
|
+
# change "username" "password" to your QuickBase username and password
|
6
|
+
qbc = QuickBase::Client.new("username","password")
|
7
|
+
|
8
|
+
today = Date.today
|
9
|
+
today = today.strftime("%m-%d-%Y")
|
10
|
+
communityForumRecords = qbc.getAllValuesForFields("8emtadvk",["Subject","Message"],"{'1'.EX.'#{today}'}",nil,nil,"6.10")
|
11
|
+
|
12
|
+
puts "\n --- QuickBase Community Forum Records added today ---\n\n"
|
13
|
+
|
14
|
+
numRecords = communityForumRecords["Subject"].length
|
15
|
+
(0..(numRecords-1)).each{|index|
|
16
|
+
print "\nSubject: "
|
17
|
+
print communityForumRecords["Subject"][index]
|
18
|
+
puts "\nMessage:"
|
19
|
+
puts communityForumRecords["Message"][index].gsub!("<BR/>","\n")
|
20
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'QuickBaseClient'
|
2
|
+
|
3
|
+
qbc = QuickBase::Client.new
|
4
|
+
|
5
|
+
# list the reports from the Formula Functions Reference table in the QuickBase Support Center
|
6
|
+
puts qbc.getReportNames("6ewwzuuj")
|
7
|
+
|
8
|
+
=begin
|
9
|
+
|
10
|
+
The above code prints the list below:-
|
11
|
+
|
12
|
+
All Functions
|
13
|
+
All Functions and Operators
|
14
|
+
Boolean Functions
|
15
|
+
Formula Export View
|
16
|
+
gsa_formula functions ref
|
17
|
+
List All
|
18
|
+
List Changes
|
19
|
+
Number Functions
|
20
|
+
Operators - Binary
|
21
|
+
Operators - Unary
|
22
|
+
Text Functions
|
23
|
+
Time and Date Functions
|
24
|
+
|
25
|
+
=end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseClient'
|
3
|
+
|
4
|
+
qbc = QuickBase::Client.new
|
5
|
+
|
6
|
+
puts "\nRoles in the QuickBase Community Forum\n\n"
|
7
|
+
|
8
|
+
qbc.getRoleInfo("bbqm84dzy") { |role|
|
9
|
+
puts "id: #{role.attributes['id']}"
|
10
|
+
puts "name: #{role.elements['name'].text}"
|
11
|
+
puts "access id: #{role.elements['access'].attributes['id']}"
|
12
|
+
puts "access name: #{role.elements['access'].text}"
|
13
|
+
puts "============================="
|
14
|
+
}
|
15
|
+
|
16
|
+
=begin
|
17
|
+
|
18
|
+
Output of the above script:
|
19
|
+
|
20
|
+
Roles in the QuickBase Community Forum
|
21
|
+
|
22
|
+
id: 10
|
23
|
+
name: Viewer
|
24
|
+
access id: 3
|
25
|
+
access name: Basic Access
|
26
|
+
=============================
|
27
|
+
id: 11
|
28
|
+
name: Participant
|
29
|
+
access id: 3
|
30
|
+
access name: Basic Access
|
31
|
+
=============================
|
32
|
+
id: 12
|
33
|
+
name: Administrator
|
34
|
+
access id: 1
|
35
|
+
access name: Administrator
|
36
|
+
=============================
|
37
|
+
id: 17
|
38
|
+
name: Product Manager
|
39
|
+
access id: 1
|
40
|
+
access name: Administrator
|
41
|
+
=============================
|
42
|
+
id: 18
|
43
|
+
name: Participant with Modify Own
|
44
|
+
access id: 3
|
45
|
+
access name: Basic Access
|
46
|
+
=============================
|
47
|
+
|
48
|
+
=end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'QuickBaseClient'
|
2
|
+
|
3
|
+
qbc = QuickBase::Client.new
|
4
|
+
serverStatus = qbc.getServerStatus
|
5
|
+
|
6
|
+
puts "\nversion: #{serverStatus['version']}"
|
7
|
+
puts "users: #{serverStatus['users']}"
|
8
|
+
puts "groups: #{serverStatus['groups']}"
|
9
|
+
puts "databases: #{serverStatus['databases']}"
|
10
|
+
puts "uptime: #{serverStatus['uptime']}"
|
11
|
+
puts "updays: #{serverStatus['updays']}"
|
@@ -0,0 +1,6 @@
|
|
1
|
+
require 'QuickBaseClient'
|
2
|
+
|
3
|
+
qbc = QuickBase::Client.new
|
4
|
+
qbc.getSchema("8emtadvk")
|
5
|
+
puts "Sort fields for QuickBase Community Forum 'List Changes' report: #{qbc.getSortListForQuery(nil,'List Changes')}"
|
6
|
+
puts "Sort fields for QuickBase Community Forum 'List Changes' report: #{qbc.getSortListForQuery('2',nil)}"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseClient'
|
3
|
+
|
4
|
+
qbc = QuickBase::Client.new
|
5
|
+
tableNames = qbc.getTableNames("bbtt9cjr6")
|
6
|
+
puts "\nTables in the QuickBase Application Library:\n\n"
|
7
|
+
puts tableNames.join( "\n")
|
8
|
+
|
9
|
+
=begin
|
10
|
+
Output of the above script:
|
11
|
+
|
12
|
+
Tables in the QuickBase Application Library:
|
13
|
+
|
14
|
+
Applications
|
15
|
+
Versions
|
16
|
+
Files
|
17
|
+
Reviews
|
18
|
+
Activity Log
|
19
|
+
Bookmarks
|
20
|
+
Feedback
|
21
|
+
Featured Apps
|
22
|
+
Categories
|
23
|
+
|
24
|
+
=end
|
25
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseClient'
|
3
|
+
|
4
|
+
# change "username" "password" to your QuickBase username and password
|
5
|
+
qbc = QuickBase::Client.new("username","password")
|
6
|
+
qbc.getDBInfo("8emtadvk")
|
7
|
+
createdTimeString = qbc.formatFieldValue(qbc.createdTime,"timestamp")
|
8
|
+
puts "The QuickBase Community Forum was created #{createdTimeString} (#{qbc.createdTime})."
|
@@ -0,0 +1,5 @@
|
|
1
|
+
require 'QuickBaseMisc'
|
2
|
+
|
3
|
+
puts "\n\nThe time now in milliseconds is #{QuickBase::Misc.time_in_milliseconds}."
|
4
|
+
puts "\nThe time in milliseconds at the beginning of today was #{QuickBase::Misc.time_in_milliseconds(Date.today)}."
|
5
|
+
puts "\nThe time in milliseconds at this time tomorrow will be #{QuickBase::Misc.time_in_milliseconds(DateTime.now + 1)}."
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseClient'
|
3
|
+
|
4
|
+
def displayUserInfo( qbc, emailAddress = nil)
|
5
|
+
|
6
|
+
qbc.getUserInfo emailAddress
|
7
|
+
|
8
|
+
puts "name : #{qbc.name}"
|
9
|
+
puts "first name : #{qbc.firstName}"
|
10
|
+
puts "last name : #{qbc.lastName}"
|
11
|
+
puts "login : #{qbc.login}"
|
12
|
+
puts "email : #{qbc.email}"
|
13
|
+
puts "screen name : #{qbc.screenName}"
|
14
|
+
puts "externalAuth: #{qbc.externalAuth}"
|
15
|
+
puts "user id : #{qbc.userid}"
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
qbc = QuickBase::Client.new("username","password")
|
21
|
+
|
22
|
+
puts "\n\nInformation in QuickBase about the person running this script:\n\n"
|
23
|
+
displayUserInfo(qbc)
|
24
|
+
|
25
|
+
puts "\n\nInformation in QuickBase about fred_flinstone@internet.com:\n\n"
|
26
|
+
displayUserInfo(qbc, "fred_flinstone@internet.com")
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
require 'QuickBaseClient'
|
3
|
+
|
4
|
+
qbc = QuickBase::Client.new("username","password")
|
5
|
+
|
6
|
+
qbc.getUserInfo( "fred_flinstone@internet.com")
|
7
|
+
|
8
|
+
qbc.getUserRole("bbqm84dzy",qbc.userid)
|
9
|
+
|
10
|
+
puts "user id : #{qbc.userid}"
|
11
|
+
puts "user name: #{qbc.username}"
|
12
|
+
puts "role id : #{qbc.roleid}"
|
13
|
+
puts "role name: #{qbc.rolename}"
|
14
|
+
puts "access id: #{qbc.accessid}"
|
15
|
+
puts "access : #{qbc.access}"
|
@@ -0,0 +1,101 @@
|
|
1
|
+
|
2
|
+
require 'rubygems'
|
3
|
+
require 'ramaze'
|
4
|
+
require 'QuickBaseClient'
|
5
|
+
require 'cgi'
|
6
|
+
|
7
|
+
#-----------------------------------------------------------
|
8
|
+
class MainController < Ramaze::Controller
|
9
|
+
|
10
|
+
map '/'
|
11
|
+
layout :page
|
12
|
+
|
13
|
+
#-----------------------------------------------------------
|
14
|
+
def index
|
15
|
+
@title = "Intranet"
|
16
|
+
html = "<form method=\"post\" action=\"/listQuickBaseApplications\">"
|
17
|
+
html << "<p>User name:<input type=\"text\" name=\"username\"></input></p>"
|
18
|
+
html << "<p>Password :<input type=\"text\" name=\"password\"></input></p>"
|
19
|
+
html << "<input type=\"submit\" name=\"my_quickbase\" value=\"My QuickBase.\">"
|
20
|
+
html << "</form>"
|
21
|
+
end
|
22
|
+
|
23
|
+
#-----------------------------------------------------------
|
24
|
+
def listQuickBaseApplications
|
25
|
+
@title = "My QuickBase"
|
26
|
+
if request['username'] and request['password']
|
27
|
+
@qbc = QuickBase::Client.new(request['username'], request['password'])
|
28
|
+
if @qbc and @qbc.requestSucceeded
|
29
|
+
html = ""
|
30
|
+
grantedDBname = ""
|
31
|
+
grantedDBid = ""
|
32
|
+
dbproc = proc { |element|
|
33
|
+
if element.is_a?(REXML::Element)
|
34
|
+
if element.has_text?
|
35
|
+
if element.name == "dbname"
|
36
|
+
grantedDBname = element.text
|
37
|
+
elsif element.name == "dbid"
|
38
|
+
grantedDBid = element.text
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
}
|
43
|
+
@qbc.grantedDBs("1","1","1"){|grantedDB|
|
44
|
+
@qbc.processChildElements(grantedDB,true,dbproc)
|
45
|
+
html << "<br>(<a href=\"/showSchema/#{CGI.escape(request['username'])}/#{CGI.escape(request['password'])}/#{grantedDBid}/#{CGI.escape(grantedDBname)}\">schema</a>) <a href=\"https://www.quickbase.com/db/#{grantedDBid}\">#{grantedDBname}</a>"
|
46
|
+
}
|
47
|
+
html
|
48
|
+
else
|
49
|
+
"<p><b>Oops - something went wrong while connecting to QuickBase.<br>Please check your username and password.</b></p>"
|
50
|
+
end
|
51
|
+
else
|
52
|
+
"<p><b>Oops - please specifiy your QuickBase username and password.</b></p>"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
#-----------------------------------------------------------
|
57
|
+
def showSchema(username,password,dbid,dbname)
|
58
|
+
@title = "Schema for #{dbname}"
|
59
|
+
html = "Oops - couldn't find the schema for that table."
|
60
|
+
@qbc = QuickBase::Client.new(username,password)
|
61
|
+
if @qbc and @qbc.requestSucceeded
|
62
|
+
@qbc.getSchema(dbid)
|
63
|
+
if @qbc.requestSucceeded
|
64
|
+
schema = ""
|
65
|
+
|
66
|
+
# if you get 'undefined variable transitive' from the next line
|
67
|
+
# edit rexml\document.rb and change 'trans=false' to ''transitive=false'
|
68
|
+
@qbc.qdbapi.write(schema, 3)
|
69
|
+
|
70
|
+
schema.gsub!("<","<")
|
71
|
+
schema.gsub!(">",">")
|
72
|
+
html = "<pre>#{schema}</pre>"
|
73
|
+
end
|
74
|
+
end
|
75
|
+
html
|
76
|
+
end
|
77
|
+
|
78
|
+
#-----------------------------------------------------------
|
79
|
+
def error
|
80
|
+
"<p><b>Sorry - that is not a valid web page on this web site.</b></p>"
|
81
|
+
end
|
82
|
+
|
83
|
+
#-----------------------------------------------------------
|
84
|
+
def page
|
85
|
+
%{
|
86
|
+
<html>
|
87
|
+
<head>
|
88
|
+
<title>#@title</title>
|
89
|
+
</head>
|
90
|
+
<body>
|
91
|
+
<h2>#@title</h2><a href ="/index">Home</a>
|
92
|
+
<hr>
|
93
|
+
#@content
|
94
|
+
</body>
|
95
|
+
</html>
|
96
|
+
}
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
Ramaze.start
|
101
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'QuickBaseClient'
|
2
|
+
|
3
|
+
qbc = QuickBase::Client.new
|
4
|
+
|
5
|
+
qbc.getSchema("93htvp8y")
|
6
|
+
|
7
|
+
if qbc.isAverageField?("Subject")
|
8
|
+
puts "The 'Subject' field in the QuickBase Community Forum has an Average at the bottom of reports."
|
9
|
+
else
|
10
|
+
puts "The 'Subject' field in the QuickBase Community Forum does not have a Average at the bottom of reports."
|
11
|
+
end
|
12
|
+
|
13
|
+
if qbc.isAverageField?("# of Posts")
|
14
|
+
puts "The '# of Posts' field in the QuickBase Community Forum has a Average at the bottom of reports."
|
15
|
+
else
|
16
|
+
puts "The '# of Posts' field in the QuickBase Community Forum does not have a Average at the bottom of reports."
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'QuickBaseClient'
|
2
|
+
|
3
|
+
qbc = QuickBase::Client.new
|
4
|
+
|
5
|
+
qbc.getSchema("8emtadvk")
|
6
|
+
if qbc.isTotalField?("Subject")
|
7
|
+
puts "The 'Subject' field in the QuickBase Community Forum has a Total at the bottom of reports."
|
8
|
+
else
|
9
|
+
puts "The 'Subject' field in the QuickBase Community Forum does not have a Total at the bottom of reports."
|
10
|
+
end
|
11
|
+
|
12
|
+
if qbc.isTotalField?("# of Posts")
|
13
|
+
puts "The '# of Posts' field in the QuickBase Community Forum has a Total at the bottom of reports."
|
14
|
+
else
|
15
|
+
puts "The '# of Posts' field in the QuickBase Community Forum does not have a Total at the bottom of reports."
|
16
|
+
end
|