telerivet 1.4.1 → 1.4.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 697a171fa7f4dd7705e613d73bf33fd107c928c4
4
- data.tar.gz: 62ef06d6e833150e6e0a46973b69367928e91aa3
3
+ metadata.gz: a8d93278a1028f9ff5744fa1eebb37b9e57f2883
4
+ data.tar.gz: 95865ab958259080cadebf2fc7351e0d0ce5563a
5
5
  SHA512:
6
- metadata.gz: 241260c22dec5140842dcd15dcf92aa0d0db1d53bcf12e3868e32460f655e33e81a2512b5d4dac31191c9e42e28333cb316d4aea7681fdb1afcd08818e122415
7
- data.tar.gz: fabe4e4197badab25b4de98449b50ef6ae2c64c3f14d56c6d1f5cb0ea490ebaacffe7dec528399017f13468be5a037593e82127c6a46ca0d1dce57dcf13eab95
6
+ metadata.gz: 364d571be0d300d075acd89004956619270bcf95b676e5dc6694f97a6e95f2a5143348213f22ce2d77e4355aad8c95539f360d795562996c601160b709929f9f
7
+ data.tar.gz: 3b19fcd0e413b8e4e4f2199ecba6ad424031a038e22cc169403b32a60c8e4e717230cb2fc8eb4ea188237cc4eaa5e6c23fdd1b742d3b57ae16e5958defb8ed5b
@@ -9,7 +9,7 @@ module Telerivet
9
9
  class API
10
10
  attr_reader :num_requests
11
11
 
12
- @@client_version = '1.4.1'
12
+ @@client_version = '1.4.2'
13
13
 
14
14
  #
15
15
  # Initializes a client handle to the Telerivet REST API.
@@ -25,6 +25,18 @@ module Telerivet
25
25
  # * Number of rows in the table
26
26
  # * Read-only
27
27
  #
28
+ # - show_add_row (bool)
29
+ # * Whether to allow adding or importing rows via the web app
30
+ # * Updatable via API
31
+ #
32
+ # - show_stats (bool)
33
+ # * Whether to show row statistics in the web app
34
+ # * Updatable via API
35
+ #
36
+ # - show_contact_columns (bool)
37
+ # * Whether to show 'Contact Name' and 'Phone Number' columns in the web app
38
+ # * Updatable via API
39
+ #
28
40
  # - vars (Hash)
29
41
  # * Custom variables stored for this data table
30
42
  # * Updatable via API
@@ -136,8 +148,9 @@ class DataTable < Entity
136
148
 
137
149
  #
138
150
  # Gets a list of all fields (columns) defined for this data table. The return value is an
139
- # array of objects with the properties 'name' and 'variable'. (Fields are automatically
140
- # created any time a DataRow's 'vars' property is updated.)
151
+ # array of objects with the properties 'name', 'variable', 'type', 'order', 'readonly', and
152
+ # 'lookup_key'. (Fields are automatically created any time a DataRow's 'vars' property is
153
+ # updated.)
141
154
  #
142
155
  # Returns:
143
156
  # array
@@ -146,6 +159,37 @@ class DataTable < Entity
146
159
  return @api.do_request("GET", get_base_api_path() + "/fields")
147
160
  end
148
161
 
162
+ #
163
+ # Allows customizing how a field (column) is displayed in the Telerivet web app.
164
+ #
165
+ # Arguments:
166
+ # - variable
167
+ # * The variable name of the field to create or update.
168
+ # * Required
169
+ #
170
+ # - options (Hash)
171
+ #
172
+ # - name (string, max 64 characters)
173
+ # * Display name for the field
174
+ #
175
+ # - type (string)
176
+ # * Field type
177
+ # * Allowed values: text, long_text, number, boolean, email, url, audio, phone_number,
178
+ # date, date_time, groups, route
179
+ #
180
+ # - order (int)
181
+ # * Order in which to display the field
182
+ #
183
+ # - readonly (bool)
184
+ # * Set to true to prevent editing the field in the Telerivet web app
185
+ #
186
+ # Returns:
187
+ # object
188
+ #
189
+ def set_field_metadata(variable, options = nil)
190
+ return @api.do_request("POST", get_base_api_path() + "/fields/#{variable}", options)
191
+ end
192
+
149
193
  #
150
194
  # Returns the number of rows for each value of a given variable. This can be used to get the
151
195
  # total number of responses for each choice in a poll, without making a separate query for
@@ -194,6 +238,30 @@ class DataTable < Entity
194
238
  get('num_rows')
195
239
  end
196
240
 
241
+ def show_add_row
242
+ get('show_add_row')
243
+ end
244
+
245
+ def show_add_row=(value)
246
+ set('show_add_row', value)
247
+ end
248
+
249
+ def show_stats
250
+ get('show_stats')
251
+ end
252
+
253
+ def show_stats=(value)
254
+ set('show_stats', value)
255
+ end
256
+
257
+ def show_contact_columns
258
+ get('show_contact_columns')
259
+ end
260
+
261
+ def show_contact_columns=(value)
262
+ set('show_contact_columns', value)
263
+ end
264
+
197
265
  def project_id
198
266
  get('project_id')
199
267
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telerivet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Young
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-19 00:00:00.000000000 Z
11
+ date: 2018-08-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby client library for Telerivet REST API
14
14
  email: support@telerivet.com