quickbase_client 1.0.17 → 1.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGES +2 -0
  2. data/README.rdoc +4 -0
  3. data/lib/QuickBaseClient.rb +14 -12
  4. metadata +2 -2
data/CHANGES CHANGED
@@ -1,5 +1,7 @@
1
1
  == Change History
2
2
 
3
+ 1.0.18 - 09/16/2011 - editRecord() now supports using optional key field as a record identifier.
4
+
3
5
  1.0.17 - 09/05/2011 - Added getFileDownloadURL().
4
6
 
5
7
  1.0.16 - 07/14/2011 - Added support for new API_CopyMasterDetail call.
data/README.rdoc CHANGED
@@ -31,6 +31,10 @@ More information about the QuickBase Client is available here -
31
31
 
32
32
  == Change History
33
33
 
34
+ 1.0.18 - 09/16/2011 - editRecord() now supports using optional key field as a record identifier.
35
+
36
+ 1.0.17 - 09/05/2011 - Added getFileDownloadURL().
37
+
34
38
  1.0.16 - 07/14/2011 - Added support for new API_CopyMasterDetail call.
35
39
 
36
40
  1.0.15 - 06/02/2011 - Fixed downloadFile problem caused by httpclient update.
@@ -41,7 +41,7 @@ class Client
41
41
  attr_reader :email, :errcode, :errdetail, :errtext, :excludeparents, :externalAuth, :fform
42
42
  attr_reader :fid, :fids, :field, :fields, :field_data, :field_data_list, :fieldTypeLabelMap, :fieldValue, :fileContents, :fileUploadToken, :firstName, :fmt, :fname, :fnames, :fvlist
43
43
  attr_reader :hours, :HTML, :httpConnection, :id, :ignoreError, :includeancestors
44
- attr_reader :jht, :jsa, :key_fid, :keepData, :label, :lastAccessTime
44
+ attr_reader :jht, :jsa, :key_fid, :key, :keepData, :label, :lastAccessTime
45
45
  attr_reader :lastError, :lastModifiedTime, :lastName, :lastPaymentDate, :lastRecModTime, :login
46
46
  attr_reader :mgrID, :mgrName, :mode, :modify, :name
47
47
  attr_reader :newappname, :newowner, :newdbdesc, :newdbid, :newdbname
@@ -2191,12 +2191,13 @@ class Client
2191
2191
  alias _downloadFile _downLoadFile
2192
2192
 
2193
2193
  # API_EditRecord
2194
- def editRecord( dbid, rid, fvlist, disprec = nil, fform = nil, ignoreError = nil, update_id = nil, msInUTC =nil )
2194
+ def editRecord( dbid, rid, fvlist, disprec = nil, fform = nil, ignoreError = nil, update_id = nil, msInUTC =nil, key = nil )
2195
2195
 
2196
- @dbid, @rid, @fvlist, @disprec, @fform, @ignoreError, @update_id, @msInUTC = dbid, rid, fvlist, disprec, fform, ignoreError, update_id, msInUTC
2196
+ @dbid, @rid, @fvlist, @disprec, @fform, @ignoreError, @update_id, @msInUTC, @key = dbid, rid, fvlist, disprec, fform, ignoreError, update_id, msInUTC, key
2197
2197
  setFieldValues( fvlist, false ) if fvlist.is_a?(Hash)
2198
2198
 
2199
- xmlRequestData = toXML( :rid, @rid )
2199
+ xmlRequestData = toXML( :rid, @rid ) if @rid
2200
+ xmlRequestData = toXML( :key, @key ) if @key
2200
2201
  @fvlist.each{ |fv| xmlRequestData << fv } #see addFieldValuePair, clearFieldValuePairList, @fvlist
2201
2202
  xmlRequestData << toXML( :disprec, @disprec ) if @disprec
2202
2203
  xmlRequestData << toXML( :fform, @fform ) if @fform
@@ -3038,9 +3039,9 @@ class Client
3038
3039
  # -----------------------------------------------------------------------------------------------
3039
3040
 
3040
3041
  # Use this if you aren't sure whether a particular record already exists or not
3041
- def addOrEditRecord( dbid, fvlist, rid = nil, disprec = nil, fform = nil, ignoreError = nil, update_id = nil )
3042
- if rid
3043
- editRecord( dbid, rid, fvlist, disprec, fform, ignoreError, update_id )
3042
+ def addOrEditRecord( dbid, fvlist, rid = nil, disprec = nil, fform = nil, ignoreError = nil, update_id = nil, key = nil )
3043
+ if rid or key
3044
+ editRecord( dbid, rid, fvlist, disprec, fform, ignoreError, update_id, key )
3044
3045
  if !@requestSucceeded
3045
3046
  addRecord( dbid, fvlist, disprec, fform, ignoreError, update_id )
3046
3047
  end
@@ -3159,13 +3160,14 @@ class Client
3159
3160
 
3160
3161
  # Change a named field's value in the active record.
3161
3162
  # e.g. setFieldValue( "Location", "Miami" )
3162
- def setFieldValue( fieldName, fieldValue, dbid = nil, rid = nil )
3163
+ def setFieldValue( fieldName, fieldValue, dbid = nil, rid = nil, key =nil )
3163
3164
  @dbid ||= dbid
3164
3165
  @rid ||= rid
3165
- if @dbid and @rid
3166
+ @key ||= key
3167
+ if @dbid and (@rid or @key)
3166
3168
  clearFieldValuePairList
3167
3169
  addFieldValuePair( fieldName, nil, nil, fieldValue )
3168
- editRecord( @dbid, @rid, @fvlist )
3170
+ editRecord( @dbid, @rid, @fvlist, nil, nil, nil, nil, nil, @key )
3169
3171
  end
3170
3172
  end
3171
3173
 
@@ -3177,8 +3179,8 @@ class Client
3177
3179
  fields.each{ |fieldName,fieldValue|
3178
3180
  addFieldValuePair( fieldName, nil, nil, fieldValue )
3179
3181
  }
3180
- if editRecord and @dbid and @rid
3181
- editRecord( @dbid, @rid, @fvlist )
3182
+ if editRecord and @dbid and (@rid or @key)
3183
+ editRecord( @dbid, @rid, @fvlist, nil, nil, nil, nil, nil, @key )
3182
3184
  end
3183
3185
  end
3184
3186
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quickbase_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.17
4
+ version: 1.0.18
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-05 00:00:00.000000000Z
12
+ date: 2011-09-16 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Wraps the QuickBase HTTP API and adds classes and methods to minimize
15
15
  the amount of code needed to get useful things done. This is a minimal subset of