google-apis-forms_v1 0.15.0 → 0.17.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a83ee3c33edde1820617e0dca8430d3a5d300ba6a048f5bb3b0252ad1f1cfe7d
|
4
|
+
data.tar.gz: 9cb8f811fb95e8564415e0a4dfeb434595dbb49f9989479b283ea88067793887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ad7deb0f0c027ea7288425d90f46ab60a02978654662eceb30cfc44cb75d2656ab3a557fbe9a472473cbbe0c61a756bcc3da467033abc8dcc3a5d2833318e5a
|
7
|
+
data.tar.gz: 86a9f9f3342127c38111ca023f535ee90872a8575df6bf5fe3359b00ee0e2646e2e5f2321586ab1976ad2988803ecd6fa0586c629ba9369f901041c4363a56f4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Release history for google-apis-forms_v1
|
2
2
|
|
3
|
+
### v0.17.0 (2025-04-06)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20250325
|
6
|
+
|
7
|
+
### v0.16.0 (2025-03-16)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20250304
|
10
|
+
|
3
11
|
### v0.15.0 (2025-02-26)
|
4
12
|
|
5
13
|
* Regenerated from discovery document revision 20250218
|
@@ -542,8 +542,14 @@ module Google
|
|
542
542
|
# @return [String]
|
543
543
|
attr_accessor :linked_sheet_id
|
544
544
|
|
545
|
+
# The publishing settings of a form.
|
546
|
+
# Corresponds to the JSON property `publishSettings`
|
547
|
+
# @return [Google::Apis::FormsV1::PublishSettings]
|
548
|
+
attr_accessor :publish_settings
|
549
|
+
|
545
550
|
# Output only. The form URI to share with responders. This opens a page that
|
546
|
-
# allows the user to submit responses but not edit the questions.
|
551
|
+
# allows the user to submit responses but not edit the questions. For forms that
|
552
|
+
# have `publish_settings` value set, this will be the published form URI.
|
547
553
|
# Corresponds to the JSON property `responderUri`
|
548
554
|
# @return [String]
|
549
555
|
attr_accessor :responder_uri
|
@@ -553,10 +559,12 @@ module Google
|
|
553
559
|
# of the revision ID may change over time, so it should be treated opaquely. A
|
554
560
|
# returned revision ID is only guaranteed to be valid for 24 hours after it has
|
555
561
|
# been returned and cannot be shared across users. If the revision ID is
|
556
|
-
# unchanged between calls, then the form has not changed. Conversely,
|
557
|
-
# ID (for the same form and user) usually means the form has
|
558
|
-
# however, a changed ID can also be due to internal factors such
|
559
|
-
# changes.
|
562
|
+
# unchanged between calls, then the form *content* has not changed. Conversely,
|
563
|
+
# a changed ID (for the same form and user) usually means the form *content* has
|
564
|
+
# been updated; however, a changed ID can also be due to internal factors such
|
565
|
+
# as ID format changes. Form content excludes form metadata, including: *
|
566
|
+
# sharing settings (who has access to the form) * `publish_settings` (if the
|
567
|
+
# form supports publishing and if it is published)
|
560
568
|
# Corresponds to the JSON property `revisionId`
|
561
569
|
# @return [String]
|
562
570
|
attr_accessor :revision_id
|
@@ -576,6 +584,7 @@ module Google
|
|
576
584
|
@info = args[:info] if args.key?(:info)
|
577
585
|
@items = args[:items] if args.key?(:items)
|
578
586
|
@linked_sheet_id = args[:linked_sheet_id] if args.key?(:linked_sheet_id)
|
587
|
+
@publish_settings = args[:publish_settings] if args.key?(:publish_settings)
|
579
588
|
@responder_uri = args[:responder_uri] if args.key?(:responder_uri)
|
580
589
|
@revision_id = args[:revision_id] if args.key?(:revision_id)
|
581
590
|
@settings = args[:settings] if args.key?(:settings)
|
@@ -1117,6 +1126,53 @@ module Google
|
|
1117
1126
|
end
|
1118
1127
|
end
|
1119
1128
|
|
1129
|
+
# The publishing settings of a form.
|
1130
|
+
class PublishSettings
|
1131
|
+
include Google::Apis::Core::Hashable
|
1132
|
+
|
1133
|
+
# The publishing state of a form.
|
1134
|
+
# Corresponds to the JSON property `publishState`
|
1135
|
+
# @return [Google::Apis::FormsV1::PublishState]
|
1136
|
+
attr_accessor :publish_state
|
1137
|
+
|
1138
|
+
def initialize(**args)
|
1139
|
+
update!(**args)
|
1140
|
+
end
|
1141
|
+
|
1142
|
+
# Update properties of this object
|
1143
|
+
def update!(**args)
|
1144
|
+
@publish_state = args[:publish_state] if args.key?(:publish_state)
|
1145
|
+
end
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
# The publishing state of a form.
|
1149
|
+
class PublishState
|
1150
|
+
include Google::Apis::Core::Hashable
|
1151
|
+
|
1152
|
+
# Required. Whether the form accepts responses. If `is_published` is set to `
|
1153
|
+
# false`, this field is forced to `false`.
|
1154
|
+
# Corresponds to the JSON property `isAcceptingResponses`
|
1155
|
+
# @return [Boolean]
|
1156
|
+
attr_accessor :is_accepting_responses
|
1157
|
+
alias_method :is_accepting_responses?, :is_accepting_responses
|
1158
|
+
|
1159
|
+
# Required. Whether the form is published and visible to others.
|
1160
|
+
# Corresponds to the JSON property `isPublished`
|
1161
|
+
# @return [Boolean]
|
1162
|
+
attr_accessor :is_published
|
1163
|
+
alias_method :is_published?, :is_published
|
1164
|
+
|
1165
|
+
def initialize(**args)
|
1166
|
+
update!(**args)
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
# Update properties of this object
|
1170
|
+
def update!(**args)
|
1171
|
+
@is_accepting_responses = args[:is_accepting_responses] if args.key?(:is_accepting_responses)
|
1172
|
+
@is_published = args[:is_published] if args.key?(:is_published)
|
1173
|
+
end
|
1174
|
+
end
|
1175
|
+
|
1120
1176
|
# Any question. The specific type of question is known by its `kind`.
|
1121
1177
|
class Question
|
1122
1178
|
include Google::Apis::Core::Hashable
|
@@ -1443,6 +1499,58 @@ module Google
|
|
1443
1499
|
end
|
1444
1500
|
end
|
1445
1501
|
|
1502
|
+
# Updates the publish settings of a Form.
|
1503
|
+
class SetPublishSettingsRequest
|
1504
|
+
include Google::Apis::Core::Hashable
|
1505
|
+
|
1506
|
+
# The publishing settings of a form.
|
1507
|
+
# Corresponds to the JSON property `publishSettings`
|
1508
|
+
# @return [Google::Apis::FormsV1::PublishSettings]
|
1509
|
+
attr_accessor :publish_settings
|
1510
|
+
|
1511
|
+
# Optional. The `publish_settings` fields to update. This field mask accepts the
|
1512
|
+
# following values: * `publish_state`: Updates or replaces all `publish_state`
|
1513
|
+
# settings. * `"*"`: Updates or replaces all `publish_settings` fields.
|
1514
|
+
# Corresponds to the JSON property `updateMask`
|
1515
|
+
# @return [String]
|
1516
|
+
attr_accessor :update_mask
|
1517
|
+
|
1518
|
+
def initialize(**args)
|
1519
|
+
update!(**args)
|
1520
|
+
end
|
1521
|
+
|
1522
|
+
# Update properties of this object
|
1523
|
+
def update!(**args)
|
1524
|
+
@publish_settings = args[:publish_settings] if args.key?(:publish_settings)
|
1525
|
+
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
1526
|
+
end
|
1527
|
+
end
|
1528
|
+
|
1529
|
+
# The response of a `SetPublishSettings` request.
|
1530
|
+
class SetPublishSettingsResponse
|
1531
|
+
include Google::Apis::Core::Hashable
|
1532
|
+
|
1533
|
+
# Required. The ID of the Form. This is same as the `Form.form_id` field.
|
1534
|
+
# Corresponds to the JSON property `formId`
|
1535
|
+
# @return [String]
|
1536
|
+
attr_accessor :form_id
|
1537
|
+
|
1538
|
+
# The publishing settings of a form.
|
1539
|
+
# Corresponds to the JSON property `publishSettings`
|
1540
|
+
# @return [Google::Apis::FormsV1::PublishSettings]
|
1541
|
+
attr_accessor :publish_settings
|
1542
|
+
|
1543
|
+
def initialize(**args)
|
1544
|
+
update!(**args)
|
1545
|
+
end
|
1546
|
+
|
1547
|
+
# Update properties of this object
|
1548
|
+
def update!(**args)
|
1549
|
+
@form_id = args[:form_id] if args.key?(:form_id)
|
1550
|
+
@publish_settings = args[:publish_settings] if args.key?(:publish_settings)
|
1551
|
+
end
|
1552
|
+
end
|
1553
|
+
|
1446
1554
|
# An answer to a question represented as text.
|
1447
1555
|
class TextAnswer
|
1448
1556
|
include Google::Apis::Core::Hashable
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module FormsV1
|
18
18
|
# Version of the google-apis-forms_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.17.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
22
|
GENERATOR_VERSION = "0.16.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20250325"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -232,6 +232,18 @@ module Google
|
|
232
232
|
include Google::Apis::Core::JsonObjectSupport
|
233
233
|
end
|
234
234
|
|
235
|
+
class PublishSettings
|
236
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
237
|
+
|
238
|
+
include Google::Apis::Core::JsonObjectSupport
|
239
|
+
end
|
240
|
+
|
241
|
+
class PublishState
|
242
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
243
|
+
|
244
|
+
include Google::Apis::Core::JsonObjectSupport
|
245
|
+
end
|
246
|
+
|
235
247
|
class Question
|
236
248
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
237
249
|
|
@@ -292,6 +304,18 @@ module Google
|
|
292
304
|
include Google::Apis::Core::JsonObjectSupport
|
293
305
|
end
|
294
306
|
|
307
|
+
class SetPublishSettingsRequest
|
308
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
309
|
+
|
310
|
+
include Google::Apis::Core::JsonObjectSupport
|
311
|
+
end
|
312
|
+
|
313
|
+
class SetPublishSettingsResponse
|
314
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
315
|
+
|
316
|
+
include Google::Apis::Core::JsonObjectSupport
|
317
|
+
end
|
318
|
+
|
295
319
|
class TextAnswer
|
296
320
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
297
321
|
|
@@ -554,6 +578,8 @@ module Google
|
|
554
578
|
collection :items, as: 'items', class: Google::Apis::FormsV1::Item, decorator: Google::Apis::FormsV1::Item::Representation
|
555
579
|
|
556
580
|
property :linked_sheet_id, as: 'linkedSheetId'
|
581
|
+
property :publish_settings, as: 'publishSettings', class: Google::Apis::FormsV1::PublishSettings, decorator: Google::Apis::FormsV1::PublishSettings::Representation
|
582
|
+
|
557
583
|
property :responder_uri, as: 'responderUri'
|
558
584
|
property :revision_id, as: 'revisionId'
|
559
585
|
property :settings, as: 'settings', class: Google::Apis::FormsV1::FormSettings, decorator: Google::Apis::FormsV1::FormSettings::Representation
|
@@ -727,6 +753,22 @@ module Google
|
|
727
753
|
end
|
728
754
|
end
|
729
755
|
|
756
|
+
class PublishSettings
|
757
|
+
# @private
|
758
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
759
|
+
property :publish_state, as: 'publishState', class: Google::Apis::FormsV1::PublishState, decorator: Google::Apis::FormsV1::PublishState::Representation
|
760
|
+
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
764
|
+
class PublishState
|
765
|
+
# @private
|
766
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
767
|
+
property :is_accepting_responses, as: 'isAcceptingResponses'
|
768
|
+
property :is_published, as: 'isPublished'
|
769
|
+
end
|
770
|
+
end
|
771
|
+
|
730
772
|
class Question
|
731
773
|
# @private
|
732
774
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -839,6 +881,24 @@ module Google
|
|
839
881
|
end
|
840
882
|
end
|
841
883
|
|
884
|
+
class SetPublishSettingsRequest
|
885
|
+
# @private
|
886
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
887
|
+
property :publish_settings, as: 'publishSettings', class: Google::Apis::FormsV1::PublishSettings, decorator: Google::Apis::FormsV1::PublishSettings::Representation
|
888
|
+
|
889
|
+
property :update_mask, as: 'updateMask'
|
890
|
+
end
|
891
|
+
end
|
892
|
+
|
893
|
+
class SetPublishSettingsResponse
|
894
|
+
# @private
|
895
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
896
|
+
property :form_id, as: 'formId'
|
897
|
+
property :publish_settings, as: 'publishSettings', class: Google::Apis::FormsV1::PublishSettings, decorator: Google::Apis::FormsV1::PublishSettings::Representation
|
898
|
+
|
899
|
+
end
|
900
|
+
end
|
901
|
+
|
842
902
|
class TextAnswer
|
843
903
|
# @private
|
844
904
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -91,6 +91,10 @@ module Google
|
|
91
91
|
# items, you must first call forms.create to create an empty form with a title
|
92
92
|
# and (optional) document title, and then call forms.update to add the items.
|
93
93
|
# @param [Google::Apis::FormsV1::Form] form_object
|
94
|
+
# @param [Boolean] unpublished
|
95
|
+
# Optional. Whether the form is unpublished. If set to `true`, the form doesn't
|
96
|
+
# accept responses. If set to `false` or unset, the form is published and
|
97
|
+
# accepts responses.
|
94
98
|
# @param [String] fields
|
95
99
|
# Selector specifying which fields to include in a partial response.
|
96
100
|
# @param [String] quota_user
|
@@ -108,12 +112,13 @@ module Google
|
|
108
112
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
109
113
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
110
114
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
111
|
-
def create_form(form_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
115
|
+
def create_form(form_object = nil, unpublished: nil, fields: nil, quota_user: nil, options: nil, &block)
|
112
116
|
command = make_simple_command(:post, 'v1/forms', options)
|
113
117
|
command.request_representation = Google::Apis::FormsV1::Form::Representation
|
114
118
|
command.request_object = form_object
|
115
119
|
command.response_representation = Google::Apis::FormsV1::Form::Representation
|
116
120
|
command.response_class = Google::Apis::FormsV1::Form
|
121
|
+
command.query['unpublished'] = unpublished unless unpublished.nil?
|
117
122
|
command.query['fields'] = fields unless fields.nil?
|
118
123
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
119
124
|
execute_or_queue_command(command, &block)
|
@@ -149,6 +154,40 @@ module Google
|
|
149
154
|
execute_or_queue_command(command, &block)
|
150
155
|
end
|
151
156
|
|
157
|
+
# Updates the publish settings of a form. Legacy forms aren't supported because
|
158
|
+
# they don't have the `publish_settings` field.
|
159
|
+
# @param [String] form_id
|
160
|
+
# Required. The ID of the form. You can get the id from `Form.form_id` field.
|
161
|
+
# @param [Google::Apis::FormsV1::SetPublishSettingsRequest] set_publish_settings_request_object
|
162
|
+
# @param [String] fields
|
163
|
+
# Selector specifying which fields to include in a partial response.
|
164
|
+
# @param [String] quota_user
|
165
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
166
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
167
|
+
# @param [Google::Apis::RequestOptions] options
|
168
|
+
# Request-specific options
|
169
|
+
#
|
170
|
+
# @yield [result, err] Result & error if block supplied
|
171
|
+
# @yieldparam result [Google::Apis::FormsV1::SetPublishSettingsResponse] parsed result object
|
172
|
+
# @yieldparam err [StandardError] error object if request failed
|
173
|
+
#
|
174
|
+
# @return [Google::Apis::FormsV1::SetPublishSettingsResponse]
|
175
|
+
#
|
176
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
177
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
178
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
179
|
+
def set_form_publish_settings(form_id, set_publish_settings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
180
|
+
command = make_simple_command(:post, 'v1/forms/{formId}:setPublishSettings', options)
|
181
|
+
command.request_representation = Google::Apis::FormsV1::SetPublishSettingsRequest::Representation
|
182
|
+
command.request_object = set_publish_settings_request_object
|
183
|
+
command.response_representation = Google::Apis::FormsV1::SetPublishSettingsResponse::Representation
|
184
|
+
command.response_class = Google::Apis::FormsV1::SetPublishSettingsResponse
|
185
|
+
command.params['formId'] = form_id unless form_id.nil?
|
186
|
+
command.query['fields'] = fields unless fields.nil?
|
187
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
188
|
+
execute_or_queue_command(command, &block)
|
189
|
+
end
|
190
|
+
|
152
191
|
# Get one response from the form.
|
153
192
|
# @param [String] form_id
|
154
193
|
# Required. The form ID.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-forms_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-04-16 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: google-apis-core
|
@@ -57,7 +57,7 @@ licenses:
|
|
57
57
|
metadata:
|
58
58
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
59
59
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-forms_v1/CHANGELOG.md
|
60
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-forms_v1/v0.
|
60
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-forms_v1/v0.17.0
|
61
61
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-forms_v1
|
62
62
|
rdoc_options: []
|
63
63
|
require_paths:
|