google-apis-factchecktools_v1alpha1 0.1.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.
@@ -0,0 +1,28 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Google
16
+ module Apis
17
+ module FactchecktoolsV1alpha1
18
+ # Version of the google-apis-factchecktools_v1alpha1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20200801"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,208 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module FactchecktoolsV1alpha1
24
+
25
+ class GoogleFactcheckingFactchecktoolsV1alpha1Claim
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class GoogleFactcheckingFactchecktoolsV1alpha1Publisher
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class GoogleProtobufEmpty
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class GoogleFactcheckingFactchecktoolsV1alpha1Claim
92
+ # @private
93
+ class Representation < Google::Apis::Core::JsonRepresentation
94
+ property :claim_date, as: 'claimDate'
95
+ collection :claim_review, as: 'claimReview', class: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview, decorator: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview::Representation
96
+
97
+ property :claimant, as: 'claimant'
98
+ property :text, as: 'text'
99
+ end
100
+ end
101
+
102
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor
103
+ # @private
104
+ class Representation < Google::Apis::Core::JsonRepresentation
105
+ property :image_url, as: 'imageUrl'
106
+ property :job_title, as: 'jobTitle'
107
+ property :name, as: 'name'
108
+ property :same_as, as: 'sameAs'
109
+ end
110
+ end
111
+
112
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating
113
+ # @private
114
+ class Representation < Google::Apis::Core::JsonRepresentation
115
+ property :best_rating, as: 'bestRating'
116
+ property :image_url, as: 'imageUrl'
117
+ property :rating_explanation, as: 'ratingExplanation'
118
+ property :rating_value, as: 'ratingValue'
119
+ property :textual_rating, as: 'textualRating'
120
+ property :worst_rating, as: 'worstRating'
121
+ end
122
+ end
123
+
124
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview
125
+ # @private
126
+ class Representation < Google::Apis::Core::JsonRepresentation
127
+ property :language_code, as: 'languageCode'
128
+ property :publisher, as: 'publisher', class: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1Publisher, decorator: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1Publisher::Representation
129
+
130
+ property :review_date, as: 'reviewDate'
131
+ property :textual_rating, as: 'textualRating'
132
+ property :title, as: 'title'
133
+ property :url, as: 'url'
134
+ end
135
+ end
136
+
137
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor
138
+ # @private
139
+ class Representation < Google::Apis::Core::JsonRepresentation
140
+ property :image_url, as: 'imageUrl'
141
+ property :name, as: 'name'
142
+ end
143
+ end
144
+
145
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup
146
+ # @private
147
+ class Representation < Google::Apis::Core::JsonRepresentation
148
+ collection :claim_appearances, as: 'claimAppearances'
149
+ property :claim_author, as: 'claimAuthor', class: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor, decorator: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor::Representation
150
+
151
+ property :claim_date, as: 'claimDate'
152
+ property :claim_first_appearance, as: 'claimFirstAppearance'
153
+ property :claim_location, as: 'claimLocation'
154
+ property :claim_reviewed, as: 'claimReviewed'
155
+ property :rating, as: 'rating', class: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating, decorator: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating::Representation
156
+
157
+ property :url, as: 'url'
158
+ end
159
+ end
160
+
161
+ class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage
162
+ # @private
163
+ class Representation < Google::Apis::Core::JsonRepresentation
164
+ property :claim_review_author, as: 'claimReviewAuthor', class: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor, decorator: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor::Representation
165
+
166
+ collection :claim_review_markups, as: 'claimReviewMarkups', class: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup, decorator: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup::Representation
167
+
168
+ property :name, as: 'name'
169
+ property :page_url, as: 'pageUrl'
170
+ property :publish_date, as: 'publishDate'
171
+ property :version_id, as: 'versionId'
172
+ end
173
+ end
174
+
175
+ class GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse
176
+ # @private
177
+ class Representation < Google::Apis::Core::JsonRepresentation
178
+ collection :claims, as: 'claims', class: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1Claim, decorator: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1Claim::Representation
179
+
180
+ property :next_page_token, as: 'nextPageToken'
181
+ end
182
+ end
183
+
184
+ class GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse
185
+ # @private
186
+ class Representation < Google::Apis::Core::JsonRepresentation
187
+ collection :claim_review_markup_pages, as: 'claimReviewMarkupPages', class: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage, decorator: Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage::Representation
188
+
189
+ property :next_page_token, as: 'nextPageToken'
190
+ end
191
+ end
192
+
193
+ class GoogleFactcheckingFactchecktoolsV1alpha1Publisher
194
+ # @private
195
+ class Representation < Google::Apis::Core::JsonRepresentation
196
+ property :name, as: 'name'
197
+ property :site, as: 'site'
198
+ end
199
+ end
200
+
201
+ class GoogleProtobufEmpty
202
+ # @private
203
+ class Representation < Google::Apis::Core::JsonRepresentation
204
+ end
205
+ end
206
+ end
207
+ end
208
+ end
@@ -0,0 +1,299 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module FactchecktoolsV1alpha1
23
+ # Fact Check Tools API
24
+ #
25
+ #
26
+ #
27
+ # @example
28
+ # require 'google/apis/factchecktools_v1alpha1'
29
+ #
30
+ # Factchecktools = Google::Apis::FactchecktoolsV1alpha1 # Alias the module
31
+ # service = Factchecktools::FactCheckToolsService.new
32
+ #
33
+ # @see https://developers.google.com/fact-check/tools/api/
34
+ class FactCheckToolsService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://factchecktools.googleapis.com/', '',
47
+ client_name: 'google-apis-factchecktools_v1alpha1',
48
+ client_version: Google::Apis::FactchecktoolsV1alpha1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Search through fact-checked claims.
53
+ # @param [String] language_code
54
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". Can be used to
55
+ # restrict results by language, though we do not currently consider the region.
56
+ # @param [Fixnum] max_age_days
57
+ # The maximum age of the returned search results, in days. Age is determined by
58
+ # either claim date or review date, whichever is newer.
59
+ # @param [Fixnum] offset
60
+ # An integer that specifies the current offset (that is, starting result
61
+ # location) in search results. This field is only considered if `page_token` is
62
+ # unset. For example, 0 means to return results starting from the first matching
63
+ # result, and 10 means to return from the 11th result.
64
+ # @param [Fixnum] page_size
65
+ # The pagination size. We will return up to that many results. Defaults to 10 if
66
+ # not set.
67
+ # @param [String] page_token
68
+ # The pagination token. You may provide the `next_page_token` returned from a
69
+ # previous List request, if any, in order to get the next page. All other fields
70
+ # must have the same values as in the previous request.
71
+ # @param [String] query
72
+ # Textual query string. Required unless `review_publisher_site_filter` is
73
+ # specified.
74
+ # @param [String] review_publisher_site_filter
75
+ # The review publisher site to filter results by, e.g. nytimes.com.
76
+ # @param [String] fields
77
+ # Selector specifying which fields to include in a partial response.
78
+ # @param [String] quota_user
79
+ # Available to use for quota purposes for server-side applications. Can be any
80
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
81
+ # @param [Google::Apis::RequestOptions] options
82
+ # Request-specific options
83
+ #
84
+ # @yield [result, err] Result & error if block supplied
85
+ # @yieldparam result [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse] parsed result object
86
+ # @yieldparam err [StandardError] error object if request failed
87
+ #
88
+ # @return [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse]
89
+ #
90
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
91
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
92
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
93
+ def search_claims(language_code: nil, max_age_days: nil, offset: nil, page_size: nil, page_token: nil, query: nil, review_publisher_site_filter: nil, fields: nil, quota_user: nil, options: nil, &block)
94
+ command = make_simple_command(:get, 'v1alpha1/claims:search', options)
95
+ command.response_representation = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse::Representation
96
+ command.response_class = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse
97
+ command.query['languageCode'] = language_code unless language_code.nil?
98
+ command.query['maxAgeDays'] = max_age_days unless max_age_days.nil?
99
+ command.query['offset'] = offset unless offset.nil?
100
+ command.query['pageSize'] = page_size unless page_size.nil?
101
+ command.query['pageToken'] = page_token unless page_token.nil?
102
+ command.query['query'] = query unless query.nil?
103
+ command.query['reviewPublisherSiteFilter'] = review_publisher_site_filter unless review_publisher_site_filter.nil?
104
+ command.query['fields'] = fields unless fields.nil?
105
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
106
+ execute_or_queue_command(command, &block)
107
+ end
108
+
109
+ # Create `ClaimReview` markup on a page.
110
+ # @param [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage] google_factchecking_factchecktools_v1alpha1_claim_review_markup_page_object
111
+ # @param [String] fields
112
+ # Selector specifying which fields to include in a partial response.
113
+ # @param [String] quota_user
114
+ # Available to use for quota purposes for server-side applications. Can be any
115
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
116
+ # @param [Google::Apis::RequestOptions] options
117
+ # Request-specific options
118
+ #
119
+ # @yield [result, err] Result & error if block supplied
120
+ # @yieldparam result [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage] parsed result object
121
+ # @yieldparam err [StandardError] error object if request failed
122
+ #
123
+ # @return [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage]
124
+ #
125
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
126
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
127
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
128
+ def create_page(google_factchecking_factchecktools_v1alpha1_claim_review_markup_page_object = nil, fields: nil, quota_user: nil, options: nil, &block)
129
+ command = make_simple_command(:post, 'v1alpha1/pages', options)
130
+ command.request_representation = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage::Representation
131
+ command.request_object = google_factchecking_factchecktools_v1alpha1_claim_review_markup_page_object
132
+ command.response_representation = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage::Representation
133
+ command.response_class = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage
134
+ command.query['fields'] = fields unless fields.nil?
135
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
136
+ execute_or_queue_command(command, &block)
137
+ end
138
+
139
+ # Delete all `ClaimReview` markup on a page.
140
+ # @param [String] name
141
+ # The name of the resource to delete, in the form of `pages/`page_id``.
142
+ # @param [String] fields
143
+ # Selector specifying which fields to include in a partial response.
144
+ # @param [String] quota_user
145
+ # Available to use for quota purposes for server-side applications. Can be any
146
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
147
+ # @param [Google::Apis::RequestOptions] options
148
+ # Request-specific options
149
+ #
150
+ # @yield [result, err] Result & error if block supplied
151
+ # @yieldparam result [Google::Apis::FactchecktoolsV1alpha1::GoogleProtobufEmpty] parsed result object
152
+ # @yieldparam err [StandardError] error object if request failed
153
+ #
154
+ # @return [Google::Apis::FactchecktoolsV1alpha1::GoogleProtobufEmpty]
155
+ #
156
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
157
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
158
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
159
+ def delete_page(name, fields: nil, quota_user: nil, options: nil, &block)
160
+ command = make_simple_command(:delete, 'v1alpha1/{+name}', options)
161
+ command.response_representation = Google::Apis::FactchecktoolsV1alpha1::GoogleProtobufEmpty::Representation
162
+ command.response_class = Google::Apis::FactchecktoolsV1alpha1::GoogleProtobufEmpty
163
+ command.params['name'] = name unless name.nil?
164
+ command.query['fields'] = fields unless fields.nil?
165
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
166
+ execute_or_queue_command(command, &block)
167
+ end
168
+
169
+ # Get all `ClaimReview` markup on a page.
170
+ # @param [String] name
171
+ # The name of the resource to get, in the form of `pages/`page_id``.
172
+ # @param [String] fields
173
+ # Selector specifying which fields to include in a partial response.
174
+ # @param [String] quota_user
175
+ # Available to use for quota purposes for server-side applications. Can be any
176
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
177
+ # @param [Google::Apis::RequestOptions] options
178
+ # Request-specific options
179
+ #
180
+ # @yield [result, err] Result & error if block supplied
181
+ # @yieldparam result [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage] parsed result object
182
+ # @yieldparam err [StandardError] error object if request failed
183
+ #
184
+ # @return [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage]
185
+ #
186
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
187
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
188
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
189
+ def get_page(name, fields: nil, quota_user: nil, options: nil, &block)
190
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
191
+ command.response_representation = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage::Representation
192
+ command.response_class = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage
193
+ command.params['name'] = name unless name.nil?
194
+ command.query['fields'] = fields unless fields.nil?
195
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
196
+ execute_or_queue_command(command, &block)
197
+ end
198
+
199
+ # List the `ClaimReview` markup pages for a specific URL or for an organization.
200
+ # @param [Fixnum] offset
201
+ # An integer that specifies the current offset (that is, starting result
202
+ # location) in search results. This field is only considered if `page_token` is
203
+ # unset, and if the request is not for a specific URL. For example, 0 means to
204
+ # return results starting from the first matching result, and 10 means to return
205
+ # from the 11th result.
206
+ # @param [String] organization
207
+ # The organization for which we want to fetch markups for. For instance, "site.
208
+ # com". Cannot be specified along with an URL.
209
+ # @param [Fixnum] page_size
210
+ # The pagination size. We will return up to that many results. Defaults to 10 if
211
+ # not set. Has no effect if a URL is requested.
212
+ # @param [String] page_token
213
+ # The pagination token. You may provide the `next_page_token` returned from a
214
+ # previous List request, if any, in order to get the next page. All other fields
215
+ # must have the same values as in the previous request.
216
+ # @param [String] url
217
+ # The URL from which to get `ClaimReview` markup. There will be at most one
218
+ # result. If markup is associated with a more canonical version of the URL
219
+ # provided, we will return that URL instead. Cannot be specified along with an
220
+ # organization.
221
+ # @param [String] fields
222
+ # Selector specifying which fields to include in a partial response.
223
+ # @param [String] quota_user
224
+ # Available to use for quota purposes for server-side applications. Can be any
225
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
226
+ # @param [Google::Apis::RequestOptions] options
227
+ # Request-specific options
228
+ #
229
+ # @yield [result, err] Result & error if block supplied
230
+ # @yieldparam result [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse] parsed result object
231
+ # @yieldparam err [StandardError] error object if request failed
232
+ #
233
+ # @return [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse]
234
+ #
235
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
236
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
237
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
238
+ def list_pages(offset: nil, organization: nil, page_size: nil, page_token: nil, url: nil, fields: nil, quota_user: nil, options: nil, &block)
239
+ command = make_simple_command(:get, 'v1alpha1/pages', options)
240
+ command.response_representation = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse::Representation
241
+ command.response_class = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse
242
+ command.query['offset'] = offset unless offset.nil?
243
+ command.query['organization'] = organization unless organization.nil?
244
+ command.query['pageSize'] = page_size unless page_size.nil?
245
+ command.query['pageToken'] = page_token unless page_token.nil?
246
+ command.query['url'] = url unless url.nil?
247
+ command.query['fields'] = fields unless fields.nil?
248
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
249
+ execute_or_queue_command(command, &block)
250
+ end
251
+
252
+ # Update for all `ClaimReview` markup on a page Note that this is a full update.
253
+ # To retain the existing `ClaimReview` markup on a page, first perform a Get
254
+ # operation, then modify the returned markup, and finally call Update with the
255
+ # entire `ClaimReview` markup as the body.
256
+ # @param [String] name
257
+ # The name of this `ClaimReview` markup page resource, in the form of `pages/`
258
+ # page_id``. Except for update requests, this field is output-only and should
259
+ # not be set by the user.
260
+ # @param [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage] google_factchecking_factchecktools_v1alpha1_claim_review_markup_page_object
261
+ # @param [String] fields
262
+ # Selector specifying which fields to include in a partial response.
263
+ # @param [String] quota_user
264
+ # Available to use for quota purposes for server-side applications. Can be any
265
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
266
+ # @param [Google::Apis::RequestOptions] options
267
+ # Request-specific options
268
+ #
269
+ # @yield [result, err] Result & error if block supplied
270
+ # @yieldparam result [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage] parsed result object
271
+ # @yieldparam err [StandardError] error object if request failed
272
+ #
273
+ # @return [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage]
274
+ #
275
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
276
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
277
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
278
+ def update_page(name, google_factchecking_factchecktools_v1alpha1_claim_review_markup_page_object = nil, fields: nil, quota_user: nil, options: nil, &block)
279
+ command = make_simple_command(:put, 'v1alpha1/{+name}', options)
280
+ command.request_representation = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage::Representation
281
+ command.request_object = google_factchecking_factchecktools_v1alpha1_claim_review_markup_page_object
282
+ command.response_representation = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage::Representation
283
+ command.response_class = Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage
284
+ command.params['name'] = name unless name.nil?
285
+ command.query['fields'] = fields unless fields.nil?
286
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
287
+ execute_or_queue_command(command, &block)
288
+ end
289
+
290
+ protected
291
+
292
+ def apply_command_defaults(command)
293
+ command.query['key'] = key unless key.nil?
294
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
295
+ end
296
+ end
297
+ end
298
+ end
299
+ end