advantage_quickbase 0.3.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/quickbase.rb +13 -3
  2. metadata +2 -2
data/lib/quickbase.rb CHANGED
@@ -3,8 +3,7 @@ require 'nokogiri'
3
3
  require 'json'
4
4
  require 'csv'
5
5
 
6
- require_relative 'user'
7
- require_relative 'table'
6
+ Dir['lib/*.rb'].each {|file| require_relative file.gsub!(/lib\//, "")}
8
7
 
9
8
  module AdvantageQuickbase
10
9
  class API
@@ -13,7 +12,7 @@ module AdvantageQuickbase
13
12
 
14
13
  include User
15
14
  include Table
16
-
15
+
17
16
  def initialize( domain, username, password, app_token=nil, ticket=nil)
18
17
  @domain = domain
19
18
 
@@ -63,6 +62,11 @@ module AdvantageQuickbase
63
62
  options[ :clist ] = normalize_list( options[:clist] )
64
63
  options[ :slist ] = normalize_list( options[:slist] )
65
64
 
65
+ # Empty clist now loads all columns instead of "default"
66
+ if options[ :clist ].to_s.empty?
67
+ options[ :clist ] = 'a'
68
+ end
69
+
66
70
  result = send_request( :doQuery, db_id, options )
67
71
 
68
72
  return_json = []
@@ -98,6 +102,12 @@ module AdvantageQuickbase
98
102
  get_tag_value( result, :rid ).to_s == record_id.to_s
99
103
  end
100
104
 
105
+ def purge_records ( db_id, options={} )
106
+ result = send_request( :purgeRecords, db_id, options )
107
+
108
+ get_tag_value( result, :num_records_deleted ).to_s
109
+ end
110
+
101
111
  def import_from_csv( db_id, data_array, columns )
102
112
  columns = normalize_list( columns )
103
113
  xml = build_csv_xml( data_array, columns )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advantage_quickbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2014-04-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Concise implementation of select Quickbase API functions
14
+ description: Fast, concise implementation of select Quickbase API functions
15
15
  email: liquid.ise@gmail.com
16
16
  executables: []
17
17
  extensions: []