google-apis-factchecktools_v1alpha1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-factchecktools_v1alpha1.rb +15 -0
- data/lib/google/apis/factchecktools_v1alpha1.rb +36 -0
- data/lib/google/apis/factchecktools_v1alpha1/classes.rb +455 -0
- data/lib/google/apis/factchecktools_v1alpha1/gem_version.rb +28 -0
- data/lib/google/apis/factchecktools_v1alpha1/representations.rb +208 -0
- data/lib/google/apis/factchecktools_v1alpha1/service.rb +299 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a4ee9eca1561d8fc4039943fc17a0c7640eac9f1ef032938b391ec9924d1e151
|
4
|
+
data.tar.gz: 327daacd26e8de7c7e1fcd28d3c78ee6db65e7777ccb8514b6903f2ce1a803c3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a2ec3777af650d57e0df82dabba8fc2719139d0563383142747d49a46942b3564429d4e79d50f85d2561ad0e40ed069015144d7ee75a150592499b615b7cd61f
|
7
|
+
data.tar.gz: 7f83da24f77b6d060d97cedb8a1828123ae4f90ec3097ec5d66ece2b4fa3950316ee10ce568156b2b9d874167f2cb81755cefcf886e5f164f070cd39edf6ea8b
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-factchecktools_v1alpha1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/factchecktools_v1alpha1/*.rb
|
9
|
+
lib/google/apis/factchecktools_v1alpha1.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1alpha1 of the Fact Check Tools API
|
2
|
+
|
3
|
+
This is a simple client library for version V1alpha1 of the Fact Check Tools API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/factchecktools.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-factchecktools_v1alpha1', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-factchecktools_v1alpha1
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/factchecktools_v1alpha1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::FactchecktoolsV1alpha1::FactCheckToolsService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Factchecktools service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Fact Check Tools API, see the {Google::Apis::FactchecktoolsV1alpha1::FactCheckToolsService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-factchecktools_v1alpha1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://developers.google.com/fact-check/tools/api/) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
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/factchecktools_v1alpha1"
|
@@ -0,0 +1,36 @@
|
|
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/factchecktools_v1alpha1/service.rb'
|
16
|
+
require 'google/apis/factchecktools_v1alpha1/classes.rb'
|
17
|
+
require 'google/apis/factchecktools_v1alpha1/representations.rb'
|
18
|
+
require 'google/apis/factchecktools_v1alpha1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Fact Check Tools API
|
23
|
+
#
|
24
|
+
#
|
25
|
+
#
|
26
|
+
# @see https://developers.google.com/fact-check/tools/api/
|
27
|
+
module FactchecktoolsV1alpha1
|
28
|
+
# Version of the Fact Check Tools API this client connects to.
|
29
|
+
# This is NOT the gem version.
|
30
|
+
VERSION = 'V1alpha1'
|
31
|
+
|
32
|
+
# View your email address
|
33
|
+
AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,455 @@
|
|
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
|
+
# Information about the claim.
|
26
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1Claim
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# The date that the claim was made.
|
30
|
+
# Corresponds to the JSON property `claimDate`
|
31
|
+
# @return [String]
|
32
|
+
attr_accessor :claim_date
|
33
|
+
|
34
|
+
# One or more reviews of this claim (namely, a fact-checking article).
|
35
|
+
# Corresponds to the JSON property `claimReview`
|
36
|
+
# @return [Array<Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview>]
|
37
|
+
attr_accessor :claim_review
|
38
|
+
|
39
|
+
# A person or organization stating the claim. For instance, "John Doe".
|
40
|
+
# Corresponds to the JSON property `claimant`
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :claimant
|
43
|
+
|
44
|
+
# The claim text. For instance, "Crime has doubled in the last 2 years."
|
45
|
+
# Corresponds to the JSON property `text`
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :text
|
48
|
+
|
49
|
+
def initialize(**args)
|
50
|
+
update!(**args)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Update properties of this object
|
54
|
+
def update!(**args)
|
55
|
+
@claim_date = args[:claim_date] if args.key?(:claim_date)
|
56
|
+
@claim_review = args[:claim_review] if args.key?(:claim_review)
|
57
|
+
@claimant = args[:claimant] if args.key?(:claimant)
|
58
|
+
@text = args[:text] if args.key?(:text)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Information about the claim author.
|
63
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor
|
64
|
+
include Google::Apis::Core::Hashable
|
65
|
+
|
66
|
+
# Corresponds to `ClaimReview.itemReviewed.author.image`.
|
67
|
+
# Corresponds to the JSON property `imageUrl`
|
68
|
+
# @return [String]
|
69
|
+
attr_accessor :image_url
|
70
|
+
|
71
|
+
# Corresponds to `ClaimReview.itemReviewed.author.jobTitle`.
|
72
|
+
# Corresponds to the JSON property `jobTitle`
|
73
|
+
# @return [String]
|
74
|
+
attr_accessor :job_title
|
75
|
+
|
76
|
+
# A person or organization stating the claim. For instance, "John Doe".
|
77
|
+
# Corresponds to `ClaimReview.itemReviewed.author.name`.
|
78
|
+
# Corresponds to the JSON property `name`
|
79
|
+
# @return [String]
|
80
|
+
attr_accessor :name
|
81
|
+
|
82
|
+
# Corresponds to `ClaimReview.itemReviewed.author.sameAs`.
|
83
|
+
# Corresponds to the JSON property `sameAs`
|
84
|
+
# @return [String]
|
85
|
+
attr_accessor :same_as
|
86
|
+
|
87
|
+
def initialize(**args)
|
88
|
+
update!(**args)
|
89
|
+
end
|
90
|
+
|
91
|
+
# Update properties of this object
|
92
|
+
def update!(**args)
|
93
|
+
@image_url = args[:image_url] if args.key?(:image_url)
|
94
|
+
@job_title = args[:job_title] if args.key?(:job_title)
|
95
|
+
@name = args[:name] if args.key?(:name)
|
96
|
+
@same_as = args[:same_as] if args.key?(:same_as)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# Information about the claim rating.
|
101
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating
|
102
|
+
include Google::Apis::Core::Hashable
|
103
|
+
|
104
|
+
# For numeric ratings, the best value possible in the scale from worst to best.
|
105
|
+
# Corresponds to `ClaimReview.reviewRating.bestRating`.
|
106
|
+
# Corresponds to the JSON property `bestRating`
|
107
|
+
# @return [Fixnum]
|
108
|
+
attr_accessor :best_rating
|
109
|
+
|
110
|
+
# Corresponds to `ClaimReview.reviewRating.image`.
|
111
|
+
# Corresponds to the JSON property `imageUrl`
|
112
|
+
# @return [String]
|
113
|
+
attr_accessor :image_url
|
114
|
+
|
115
|
+
# Corresponds to `ClaimReview.reviewRating.ratingExplanation`.
|
116
|
+
# Corresponds to the JSON property `ratingExplanation`
|
117
|
+
# @return [String]
|
118
|
+
attr_accessor :rating_explanation
|
119
|
+
|
120
|
+
# A numeric rating of this claim, in the range worstRating — bestRating
|
121
|
+
# inclusive. Corresponds to `ClaimReview.reviewRating.ratingValue`.
|
122
|
+
# Corresponds to the JSON property `ratingValue`
|
123
|
+
# @return [Fixnum]
|
124
|
+
attr_accessor :rating_value
|
125
|
+
|
126
|
+
# The truthfulness rating as a human-readible short word or phrase. Corresponds
|
127
|
+
# to `ClaimReview.reviewRating.alternateName`.
|
128
|
+
# Corresponds to the JSON property `textualRating`
|
129
|
+
# @return [String]
|
130
|
+
attr_accessor :textual_rating
|
131
|
+
|
132
|
+
# For numeric ratings, the worst value possible in the scale from worst to best.
|
133
|
+
# Corresponds to `ClaimReview.reviewRating.worstRating`.
|
134
|
+
# Corresponds to the JSON property `worstRating`
|
135
|
+
# @return [Fixnum]
|
136
|
+
attr_accessor :worst_rating
|
137
|
+
|
138
|
+
def initialize(**args)
|
139
|
+
update!(**args)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Update properties of this object
|
143
|
+
def update!(**args)
|
144
|
+
@best_rating = args[:best_rating] if args.key?(:best_rating)
|
145
|
+
@image_url = args[:image_url] if args.key?(:image_url)
|
146
|
+
@rating_explanation = args[:rating_explanation] if args.key?(:rating_explanation)
|
147
|
+
@rating_value = args[:rating_value] if args.key?(:rating_value)
|
148
|
+
@textual_rating = args[:textual_rating] if args.key?(:textual_rating)
|
149
|
+
@worst_rating = args[:worst_rating] if args.key?(:worst_rating)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# Information about a claim review.
|
154
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview
|
155
|
+
include Google::Apis::Core::Hashable
|
156
|
+
|
157
|
+
# The language this review was written in. For instance, "en" or "de".
|
158
|
+
# Corresponds to the JSON property `languageCode`
|
159
|
+
# @return [String]
|
160
|
+
attr_accessor :language_code
|
161
|
+
|
162
|
+
# Information about the publisher.
|
163
|
+
# Corresponds to the JSON property `publisher`
|
164
|
+
# @return [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1Publisher]
|
165
|
+
attr_accessor :publisher
|
166
|
+
|
167
|
+
# The date the claim was reviewed.
|
168
|
+
# Corresponds to the JSON property `reviewDate`
|
169
|
+
# @return [String]
|
170
|
+
attr_accessor :review_date
|
171
|
+
|
172
|
+
# Textual rating. For instance, "Mostly false".
|
173
|
+
# Corresponds to the JSON property `textualRating`
|
174
|
+
# @return [String]
|
175
|
+
attr_accessor :textual_rating
|
176
|
+
|
177
|
+
# The title of this claim review, if it can be determined.
|
178
|
+
# Corresponds to the JSON property `title`
|
179
|
+
# @return [String]
|
180
|
+
attr_accessor :title
|
181
|
+
|
182
|
+
# The URL of this claim review.
|
183
|
+
# Corresponds to the JSON property `url`
|
184
|
+
# @return [String]
|
185
|
+
attr_accessor :url
|
186
|
+
|
187
|
+
def initialize(**args)
|
188
|
+
update!(**args)
|
189
|
+
end
|
190
|
+
|
191
|
+
# Update properties of this object
|
192
|
+
def update!(**args)
|
193
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
194
|
+
@publisher = args[:publisher] if args.key?(:publisher)
|
195
|
+
@review_date = args[:review_date] if args.key?(:review_date)
|
196
|
+
@textual_rating = args[:textual_rating] if args.key?(:textual_rating)
|
197
|
+
@title = args[:title] if args.key?(:title)
|
198
|
+
@url = args[:url] if args.key?(:url)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# Information about the claim review author.
|
203
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor
|
204
|
+
include Google::Apis::Core::Hashable
|
205
|
+
|
206
|
+
# Corresponds to `ClaimReview.author.image`.
|
207
|
+
# Corresponds to the JSON property `imageUrl`
|
208
|
+
# @return [String]
|
209
|
+
attr_accessor :image_url
|
210
|
+
|
211
|
+
# Name of the organization that is publishing the fact check. Corresponds to `
|
212
|
+
# ClaimReview.author.name`.
|
213
|
+
# Corresponds to the JSON property `name`
|
214
|
+
# @return [String]
|
215
|
+
attr_accessor :name
|
216
|
+
|
217
|
+
def initialize(**args)
|
218
|
+
update!(**args)
|
219
|
+
end
|
220
|
+
|
221
|
+
# Update properties of this object
|
222
|
+
def update!(**args)
|
223
|
+
@image_url = args[:image_url] if args.key?(:image_url)
|
224
|
+
@name = args[:name] if args.key?(:name)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
# Fields for an individual `ClaimReview` element. Except for sub-messages that
|
229
|
+
# group fields together, each of these fields correspond those in https://schema.
|
230
|
+
# org/ClaimReview. We list the precise mapping for each field.
|
231
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup
|
232
|
+
include Google::Apis::Core::Hashable
|
233
|
+
|
234
|
+
# A list of links to works in which this claim appears, aside from the one
|
235
|
+
# specified in `claim_first_appearance`. Corresponds to `ClaimReview.
|
236
|
+
# itemReviewed[@type=Claim].appearance.url`.
|
237
|
+
# Corresponds to the JSON property `claimAppearances`
|
238
|
+
# @return [Array<String>]
|
239
|
+
attr_accessor :claim_appearances
|
240
|
+
|
241
|
+
# Information about the claim author.
|
242
|
+
# Corresponds to the JSON property `claimAuthor`
|
243
|
+
# @return [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor]
|
244
|
+
attr_accessor :claim_author
|
245
|
+
|
246
|
+
# The date when the claim was made or entered public discourse. Corresponds to `
|
247
|
+
# ClaimReview.itemReviewed.datePublished`.
|
248
|
+
# Corresponds to the JSON property `claimDate`
|
249
|
+
# @return [String]
|
250
|
+
attr_accessor :claim_date
|
251
|
+
|
252
|
+
# A link to a work in which this claim first appears. Corresponds to `
|
253
|
+
# ClaimReview.itemReviewed[@type=Claim].firstAppearance.url`.
|
254
|
+
# Corresponds to the JSON property `claimFirstAppearance`
|
255
|
+
# @return [String]
|
256
|
+
attr_accessor :claim_first_appearance
|
257
|
+
|
258
|
+
# The location where this claim was made. Corresponds to `ClaimReview.
|
259
|
+
# itemReviewed.name`.
|
260
|
+
# Corresponds to the JSON property `claimLocation`
|
261
|
+
# @return [String]
|
262
|
+
attr_accessor :claim_location
|
263
|
+
|
264
|
+
# A short summary of the claim being evaluated. Corresponds to `ClaimReview.
|
265
|
+
# claimReviewed`.
|
266
|
+
# Corresponds to the JSON property `claimReviewed`
|
267
|
+
# @return [String]
|
268
|
+
attr_accessor :claim_reviewed
|
269
|
+
|
270
|
+
# Information about the claim rating.
|
271
|
+
# Corresponds to the JSON property `rating`
|
272
|
+
# @return [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating]
|
273
|
+
attr_accessor :rating
|
274
|
+
|
275
|
+
# This field is optional, and will default to the page URL. We provide this
|
276
|
+
# field to allow you the override the default value, but the only permitted
|
277
|
+
# override is the page URL plus an optional anchor link ("page jump").
|
278
|
+
# Corresponds to `ClaimReview.url`
|
279
|
+
# Corresponds to the JSON property `url`
|
280
|
+
# @return [String]
|
281
|
+
attr_accessor :url
|
282
|
+
|
283
|
+
def initialize(**args)
|
284
|
+
update!(**args)
|
285
|
+
end
|
286
|
+
|
287
|
+
# Update properties of this object
|
288
|
+
def update!(**args)
|
289
|
+
@claim_appearances = args[:claim_appearances] if args.key?(:claim_appearances)
|
290
|
+
@claim_author = args[:claim_author] if args.key?(:claim_author)
|
291
|
+
@claim_date = args[:claim_date] if args.key?(:claim_date)
|
292
|
+
@claim_first_appearance = args[:claim_first_appearance] if args.key?(:claim_first_appearance)
|
293
|
+
@claim_location = args[:claim_location] if args.key?(:claim_location)
|
294
|
+
@claim_reviewed = args[:claim_reviewed] if args.key?(:claim_reviewed)
|
295
|
+
@rating = args[:rating] if args.key?(:rating)
|
296
|
+
@url = args[:url] if args.key?(:url)
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
# Holds one or more instances of `ClaimReview` markup for a webpage.
|
301
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage
|
302
|
+
include Google::Apis::Core::Hashable
|
303
|
+
|
304
|
+
# Information about the claim review author.
|
305
|
+
# Corresponds to the JSON property `claimReviewAuthor`
|
306
|
+
# @return [Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor]
|
307
|
+
attr_accessor :claim_review_author
|
308
|
+
|
309
|
+
# A list of individual claim reviews for this page. Each item in the list
|
310
|
+
# corresponds to one `ClaimReview` element.
|
311
|
+
# Corresponds to the JSON property `claimReviewMarkups`
|
312
|
+
# @return [Array<Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup>]
|
313
|
+
attr_accessor :claim_review_markups
|
314
|
+
|
315
|
+
# The name of this `ClaimReview` markup page resource, in the form of `pages/`
|
316
|
+
# page_id``. Except for update requests, this field is output-only and should
|
317
|
+
# not be set by the user.
|
318
|
+
# Corresponds to the JSON property `name`
|
319
|
+
# @return [String]
|
320
|
+
attr_accessor :name
|
321
|
+
|
322
|
+
# The URL of the page associated with this `ClaimReview` markup. While every
|
323
|
+
# individual `ClaimReview` has its own URL field, semantically this is a page-
|
324
|
+
# level field, and each `ClaimReview` on this page will use this value unless
|
325
|
+
# individually overridden. Corresponds to `ClaimReview.url`
|
326
|
+
# Corresponds to the JSON property `pageUrl`
|
327
|
+
# @return [String]
|
328
|
+
attr_accessor :page_url
|
329
|
+
|
330
|
+
# The date when the fact check was published. Similar to the URL, semantically
|
331
|
+
# this is a page-level field, and each `ClaimReview` on this page will contain
|
332
|
+
# the same value. Corresponds to `ClaimReview.datePublished`
|
333
|
+
# Corresponds to the JSON property `publishDate`
|
334
|
+
# @return [String]
|
335
|
+
attr_accessor :publish_date
|
336
|
+
|
337
|
+
# The version ID for this markup. Except for update requests, this field is
|
338
|
+
# output-only and should not be set by the user.
|
339
|
+
# Corresponds to the JSON property `versionId`
|
340
|
+
# @return [String]
|
341
|
+
attr_accessor :version_id
|
342
|
+
|
343
|
+
def initialize(**args)
|
344
|
+
update!(**args)
|
345
|
+
end
|
346
|
+
|
347
|
+
# Update properties of this object
|
348
|
+
def update!(**args)
|
349
|
+
@claim_review_author = args[:claim_review_author] if args.key?(:claim_review_author)
|
350
|
+
@claim_review_markups = args[:claim_review_markups] if args.key?(:claim_review_markups)
|
351
|
+
@name = args[:name] if args.key?(:name)
|
352
|
+
@page_url = args[:page_url] if args.key?(:page_url)
|
353
|
+
@publish_date = args[:publish_date] if args.key?(:publish_date)
|
354
|
+
@version_id = args[:version_id] if args.key?(:version_id)
|
355
|
+
end
|
356
|
+
end
|
357
|
+
|
358
|
+
# Response from searching fact-checked claims.
|
359
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse
|
360
|
+
include Google::Apis::Core::Hashable
|
361
|
+
|
362
|
+
# The list of claims and all of their associated information.
|
363
|
+
# Corresponds to the JSON property `claims`
|
364
|
+
# @return [Array<Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1Claim>]
|
365
|
+
attr_accessor :claims
|
366
|
+
|
367
|
+
# The next pagination token in the Search response. It should be used as the `
|
368
|
+
# page_token` for the following request. An empty value means no more results.
|
369
|
+
# Corresponds to the JSON property `nextPageToken`
|
370
|
+
# @return [String]
|
371
|
+
attr_accessor :next_page_token
|
372
|
+
|
373
|
+
def initialize(**args)
|
374
|
+
update!(**args)
|
375
|
+
end
|
376
|
+
|
377
|
+
# Update properties of this object
|
378
|
+
def update!(**args)
|
379
|
+
@claims = args[:claims] if args.key?(:claims)
|
380
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
384
|
+
# Response from listing `ClaimReview` markup.
|
385
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse
|
386
|
+
include Google::Apis::Core::Hashable
|
387
|
+
|
388
|
+
# The result list of pages of `ClaimReview` markup.
|
389
|
+
# Corresponds to the JSON property `claimReviewMarkupPages`
|
390
|
+
# @return [Array<Google::Apis::FactchecktoolsV1alpha1::GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage>]
|
391
|
+
attr_accessor :claim_review_markup_pages
|
392
|
+
|
393
|
+
# The next pagination token in the Search response. It should be used as the `
|
394
|
+
# page_token` for the following request. An empty value means no more results.
|
395
|
+
# Corresponds to the JSON property `nextPageToken`
|
396
|
+
# @return [String]
|
397
|
+
attr_accessor :next_page_token
|
398
|
+
|
399
|
+
def initialize(**args)
|
400
|
+
update!(**args)
|
401
|
+
end
|
402
|
+
|
403
|
+
# Update properties of this object
|
404
|
+
def update!(**args)
|
405
|
+
@claim_review_markup_pages = args[:claim_review_markup_pages] if args.key?(:claim_review_markup_pages)
|
406
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
407
|
+
end
|
408
|
+
end
|
409
|
+
|
410
|
+
# Information about the publisher.
|
411
|
+
class GoogleFactcheckingFactchecktoolsV1alpha1Publisher
|
412
|
+
include Google::Apis::Core::Hashable
|
413
|
+
|
414
|
+
# The name of this publisher. For instance, "Awesome Fact Checks".
|
415
|
+
# Corresponds to the JSON property `name`
|
416
|
+
# @return [String]
|
417
|
+
attr_accessor :name
|
418
|
+
|
419
|
+
# Host-level site name, without the protocol or "www" prefix. For instance, "
|
420
|
+
# awesomefactchecks.com". This value of this field is based purely on the claim
|
421
|
+
# review URL.
|
422
|
+
# Corresponds to the JSON property `site`
|
423
|
+
# @return [String]
|
424
|
+
attr_accessor :site
|
425
|
+
|
426
|
+
def initialize(**args)
|
427
|
+
update!(**args)
|
428
|
+
end
|
429
|
+
|
430
|
+
# Update properties of this object
|
431
|
+
def update!(**args)
|
432
|
+
@name = args[:name] if args.key?(:name)
|
433
|
+
@site = args[:site] if args.key?(:site)
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
438
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
439
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
440
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
441
|
+
# `Empty` is empty JSON object ````.
|
442
|
+
class GoogleProtobufEmpty
|
443
|
+
include Google::Apis::Core::Hashable
|
444
|
+
|
445
|
+
def initialize(**args)
|
446
|
+
update!(**args)
|
447
|
+
end
|
448
|
+
|
449
|
+
# Update properties of this object
|
450
|
+
def update!(**args)
|
451
|
+
end
|
452
|
+
end
|
453
|
+
end
|
454
|
+
end
|
455
|
+
end
|