factchecktools

package
v0.10.1-0...-16c3d6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package factchecktools provides access to the Fact Check Tools API.

For product documentation, see: https://developers.google.com/fact-check/tools/api/

Creating a client

Usage example:

import "google.golang.org/api/factchecktools/v1alpha1"
...
ctx := context.Background()
factchecktoolsService, err := factchecktools.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

factchecktoolsService, err := factchecktools.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
factchecktoolsService, err := factchecktools.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

View Source
const (
	// View your email address
	UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaimsSearchCall

type ClaimsSearchCall struct {
	// contains filtered or unexported fields
}

func (*ClaimsSearchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ClaimsSearchCall) Do

Do executes the "factchecktools.claims.search" call. Exactly one of *GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchRespons e or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchRespons e.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ClaimsSearchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ClaimsSearchCall) Header

func (c *ClaimsSearchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*ClaimsSearchCall) IfNoneMatch

func (c *ClaimsSearchCall) IfNoneMatch(entityTag string) *ClaimsSearchCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*ClaimsSearchCall) LanguageCode

func (c *ClaimsSearchCall) LanguageCode(languageCode string) *ClaimsSearchCall

LanguageCode sets the optional parameter "languageCode": The BCP-47 language code, such as "en-US" or "sr-Latn". Can be used to restrict results by language, though we do not currently consider the region.

func (*ClaimsSearchCall) MaxAgeDays

func (c *ClaimsSearchCall) MaxAgeDays(maxAgeDays int64) *ClaimsSearchCall

MaxAgeDays sets the optional parameter "maxAgeDays": The maximum age of the returned search results, in days. Age is determined by either claim date or review date, whichever is newer.

func (*ClaimsSearchCall) Offset

func (c *ClaimsSearchCall) Offset(offset int64) *ClaimsSearchCall

Offset sets the optional parameter "offset": An integer that specifies the current offset (that is, starting result location) in search results. This field is only considered if `page_token` is unset. For example, 0 means to return results starting from the first matching result, and 10 means to return from the 11th result.

func (*ClaimsSearchCall) PageSize

func (c *ClaimsSearchCall) PageSize(pageSize int64) *ClaimsSearchCall

PageSize sets the optional parameter "pageSize": The pagination size. We will return up to that many results. Defaults to 10 if not set.

func (*ClaimsSearchCall) PageToken

func (c *ClaimsSearchCall) PageToken(pageToken string) *ClaimsSearchCall

PageToken sets the optional parameter "pageToken": The pagination token. You may provide the `next_page_token` returned from a previous List request, if any, in order to get the next page. All other fields must have the same values as in the previous request.

func (*ClaimsSearchCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*ClaimsSearchCall) Query

func (c *ClaimsSearchCall) Query(query string) *ClaimsSearchCall

Query sets the optional parameter "query": Textual query string. Required unless `review_publisher_site_filter` is specified.

func (*ClaimsSearchCall) ReviewPublisherSiteFilter

func (c *ClaimsSearchCall) ReviewPublisherSiteFilter(reviewPublisherSiteFilter string) *ClaimsSearchCall

ReviewPublisherSiteFilter sets the optional parameter "reviewPublisherSiteFilter": The review publisher site to filter results by, e.g. nytimes.com.

type ClaimsService

type ClaimsService struct {
	// contains filtered or unexported fields
}

func NewClaimsService

func NewClaimsService(s *Service) *ClaimsService

func (*ClaimsService) Search

func (r *ClaimsService) Search() *ClaimsSearchCall

Search: Search through fact-checked claims.

type GoogleFactcheckingFactchecktoolsV1alpha1Claim

type GoogleFactcheckingFactchecktoolsV1alpha1Claim struct {
	// ClaimDate: The date that the claim was made.
	ClaimDate string `json:"claimDate,omitempty"`

	// ClaimReview: One or more reviews of this claim (namely, a
	// fact-checking article).
	ClaimReview []*GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview `json:"claimReview,omitempty"`

	// Claimant: A person or organization stating the claim. For instance,
	// "John Doe".
	Claimant string `json:"claimant,omitempty"`

	// Text: The claim text. For instance, "Crime has doubled in the last 2
	// years."
	Text string `json:"text,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ClaimDate") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ClaimDate") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1Claim: Information about the claim.

func (*GoogleFactcheckingFactchecktoolsV1alpha1Claim) MarshalJSON

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor struct {
	// ImageUrl: Corresponds to `ClaimReview.itemReviewed.author.image`.
	ImageUrl string `json:"imageUrl,omitempty"`

	// JobTitle: Corresponds to `ClaimReview.itemReviewed.author.jobTitle`.
	JobTitle string `json:"jobTitle,omitempty"`

	// Name: A person or organization stating the claim. For instance, "John
	// Doe".<br>
	// Corresponds to `ClaimReview.itemReviewed.author.name`.
	Name string `json:"name,omitempty"`

	// SameAs: Corresponds to `ClaimReview.itemReviewed.author.sameAs`.
	SameAs string `json:"sameAs,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ImageUrl") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ImageUrl") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor: Information about the claim author.

func (*GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor) MarshalJSON

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating struct {
	// BestRating: For numeric ratings, the best value possible in the scale
	// from worst to
	// best.<br>
	// Corresponds to `ClaimReview.reviewRating.bestRating`.
	BestRating int64 `json:"bestRating,omitempty"`

	// ImageUrl: Corresponds to `ClaimReview.reviewRating.image`.
	ImageUrl string `json:"imageUrl,omitempty"`

	// RatingExplanation: Corresponds to
	// `ClaimReview.reviewRating.ratingExplanation`.
	RatingExplanation string `json:"ratingExplanation,omitempty"`

	// RatingValue: A numeric rating of this claim, in the range worstRating
	// — bestRating
	// inclusive.<br>
	// Corresponds to `ClaimReview.reviewRating.ratingValue`.
	RatingValue int64 `json:"ratingValue,omitempty"`

	// TextualRating: The truthfulness rating as a human-readible short word
	// or phrase.<br>
	// Corresponds to `ClaimReview.reviewRating.alternateName`.
	TextualRating string `json:"textualRating,omitempty"`

	// WorstRating: For numeric ratings, the worst value possible in the
	// scale from worst to
	// best.<br>
	// Corresponds to `ClaimReview.reviewRating.worstRating`.
	WorstRating int64 `json:"worstRating,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BestRating") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BestRating") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating: Information about the claim rating.

func (*GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating) MarshalJSON

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview struct {
	// LanguageCode: The language this review was written in. For instance,
	// "en" or "de".
	LanguageCode string `json:"languageCode,omitempty"`

	// Publisher: The publisher of this claim review.
	Publisher *GoogleFactcheckingFactchecktoolsV1alpha1Publisher `json:"publisher,omitempty"`

	// ReviewDate: The date the claim was reviewed.
	ReviewDate string `json:"reviewDate,omitempty"`

	// TextualRating: Textual rating. For instance, "Mostly false".
	TextualRating string `json:"textualRating,omitempty"`

	// Title: The title of this claim review, if it can be determined.
	Title string `json:"title,omitempty"`

	// Url: The URL of this claim review.
	Url string `json:"url,omitempty"`

	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "LanguageCode") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview: Information about a claim review.

func (*GoogleFactcheckingFactchecktoolsV1alpha1ClaimReview) MarshalJSON

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor struct {
	// ImageUrl: Corresponds to `ClaimReview.author.image`.
	ImageUrl string `json:"imageUrl,omitempty"`

	// Name: Name of the organization that is publishing the fact
	// check.<br>
	// Corresponds to `ClaimReview.author.name`.
	Name string `json:"name,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ImageUrl") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ImageUrl") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor: Information about the claim review author.

func (*GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor) MarshalJSON

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup struct {
	// ClaimAppearances: A list of links to works in which this claim
	// appears, aside from the one
	// specified in `claim_first_appearance`.<br>
	// Corresponds to
	// `ClaimReview.itemReviewed[@type=Claim].appearance.url`.
	ClaimAppearances []string `json:"claimAppearances,omitempty"`

	// ClaimAuthor: Info about the author of this claim.
	ClaimAuthor *GoogleFactcheckingFactchecktoolsV1alpha1ClaimAuthor `json:"claimAuthor,omitempty"`

	// ClaimDate: The date when the claim was made or entered public
	// discourse.<br>
	// Corresponds to `ClaimReview.itemReviewed.datePublished`.
	ClaimDate string `json:"claimDate,omitempty"`

	// ClaimFirstAppearance: A link to a work in which this claim first
	// appears.<br>
	// Corresponds to
	// `ClaimReview.itemReviewed[@type=Claim].firstAppearance.url`.
	ClaimFirstAppearance string `json:"claimFirstAppearance,omitempty"`

	// ClaimLocation: The location where this claim was
	// made.<br>
	// Corresponds to `ClaimReview.itemReviewed.name`.
	ClaimLocation string `json:"claimLocation,omitempty"`

	// ClaimReviewed: A short summary of the claim being
	// evaluated.<br>
	// Corresponds to `ClaimReview.claimReviewed`.
	ClaimReviewed string `json:"claimReviewed,omitempty"`

	// Rating: Info about the rating of this claim review.
	Rating *GoogleFactcheckingFactchecktoolsV1alpha1ClaimRating `json:"rating,omitempty"`

	// Url: This field is optional, and will default to the page URL. We
	// provide this
	// field to allow you the override the default value, but the only
	// permitted
	// override is the page URL plus an optional anchor link ("page
	// jump").<br>
	// Corresponds to `ClaimReview.url`
	Url string `json:"url,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ClaimAppearances") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ClaimAppearances") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup: Fields for an individual `ClaimReview` element. Except for sub-messages that group fields together, each of these fields correspond those in https://schema.org/ClaimReview. We list the precise mapping for each field.

func (*GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup) MarshalJSON

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage

type GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage struct {
	// ClaimReviewAuthor: Info about the author of this claim
	// review.
	// Similar to the above, semantically these are page-level fields, and
	// each
	// `ClaimReview` on this page will contain the same values.
	ClaimReviewAuthor *GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewAuthor `json:"claimReviewAuthor,omitempty"`

	// ClaimReviewMarkups: A list of individual claim reviews for this
	// page.
	// Each item in the list corresponds to one `ClaimReview` element.
	ClaimReviewMarkups []*GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkup `json:"claimReviewMarkups,omitempty"`

	// Name: The name of this `ClaimReview` markup page resource, in the
	// form of
	// `pages/{page_id}`. Except for update requests, this field is
	// output-only
	// and should not be set by the user.
	Name string `json:"name,omitempty"`

	// PageUrl: The URL of the page associated with this `ClaimReview`
	// markup.
	// While every individual `ClaimReview` has its own URL field,
	// semantically
	// this is a page-level field, and each `ClaimReview` on this page will
	// use
	// this value unless individually overridden.<br>
	// Corresponds to `ClaimReview.url`
	PageUrl string `json:"pageUrl,omitempty"`

	// PublishDate: The date when the fact check was published.
	// Similar to the URL, semantically this is a page-level field, and
	// each
	// `ClaimReview` on this page will contain the same
	// value.<br>
	// Corresponds to `ClaimReview.datePublished`
	PublishDate string `json:"publishDate,omitempty"`

	// VersionId: The version ID for this markup. Except for update
	// requests, this field is
	// output-only and should not be set by the user.
	VersionId string `json:"versionId,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "ClaimReviewAuthor")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ClaimReviewAuthor") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage: Holds one or more instances of `ClaimReview` markup for a webpage.

func (*GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage) MarshalJSON

type GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse

type GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse struct {
	// Claims: The list of claims and all of their associated information.
	Claims []*GoogleFactcheckingFactchecktoolsV1alpha1Claim `json:"claims,omitempty"`

	// NextPageToken: The next pagination token in the Search response. It
	// should be used as the
	// `page_token` for the following request. An empty value means no
	// more
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Claims") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Claims") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse : Response from searching fact-checked claims.

func (*GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse) MarshalJSON

type GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse

type GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse struct {
	// ClaimReviewMarkupPages: The result list of pages of `ClaimReview`
	// markup.
	ClaimReviewMarkupPages []*GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage `json:"claimReviewMarkupPages,omitempty"`

	// NextPageToken: The next pagination token in the Search response. It
	// should be used as the
	// `page_token` for the following request. An empty value means no
	// more
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g.
	// "ClaimReviewMarkupPages") to unconditionally include in API requests.
	// By default, fields with empty values are omitted from API requests.
	// However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ClaimReviewMarkupPages")
	// to include in API requests with the JSON null value. By default,
	// fields with empty values are omitted from API requests. However, any
	// field with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResp onse: Response from listing `ClaimReview` markup.

func (*GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse) MarshalJSON

type GoogleFactcheckingFactchecktoolsV1alpha1Publisher

type GoogleFactcheckingFactchecktoolsV1alpha1Publisher struct {
	// Name: The name of this publisher. For instance, "Awesome Fact
	// Checks".
	Name string `json:"name,omitempty"`

	// Site: Host-level site name, without the protocol or "www" prefix. For
	// instance,
	// "awesomefactchecks.com". This value of this field is based purely on
	// the
	// claim review URL.
	Site string `json:"site,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Name") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Name") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleFactcheckingFactchecktoolsV1alpha1Publisher: Information about the publisher.

func (*GoogleFactcheckingFactchecktoolsV1alpha1Publisher) MarshalJSON

type GoogleProtobufEmpty

type GoogleProtobufEmpty struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

GoogleProtobufEmpty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:

service Foo {
  rpc Bar(google.protobuf.Empty) returns

(google.protobuf.Empty);

}

The JSON representation for `Empty` is empty JSON object `{}`.

type PagesCreateCall

type PagesCreateCall struct {
	// contains filtered or unexported fields
}

func (*PagesCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PagesCreateCall) Do

Do executes the "factchecktools.pages.create" call. Exactly one of *GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage.ServerR esponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PagesCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PagesCreateCall) Header

func (c *PagesCreateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type PagesDeleteCall

type PagesDeleteCall struct {
	// contains filtered or unexported fields
}

func (*PagesDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PagesDeleteCall) Do

Do executes the "factchecktools.pages.delete" call. Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PagesDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PagesDeleteCall) Header

func (c *PagesDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type PagesGetCall

type PagesGetCall struct {
	// contains filtered or unexported fields
}

func (*PagesGetCall) Context

func (c *PagesGetCall) Context(ctx context.Context) *PagesGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PagesGetCall) Do

Do executes the "factchecktools.pages.get" call. Exactly one of *GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage.ServerR esponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PagesGetCall) Fields

func (c *PagesGetCall) Fields(s ...googleapi.Field) *PagesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PagesGetCall) Header

func (c *PagesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*PagesGetCall) IfNoneMatch

func (c *PagesGetCall) IfNoneMatch(entityTag string) *PagesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type PagesListCall

type PagesListCall struct {
	// contains filtered or unexported fields
}

func (*PagesListCall) Context

func (c *PagesListCall) Context(ctx context.Context) *PagesListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PagesListCall) Do

Do executes the "factchecktools.pages.list" call. Exactly one of *GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesRes ponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesRes ponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PagesListCall) Fields

func (c *PagesListCall) Fields(s ...googleapi.Field) *PagesListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PagesListCall) Header

func (c *PagesListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*PagesListCall) IfNoneMatch

func (c *PagesListCall) IfNoneMatch(entityTag string) *PagesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*PagesListCall) Offset

func (c *PagesListCall) Offset(offset int64) *PagesListCall

Offset sets the optional parameter "offset": An integer that specifies the current offset (that is, starting result location) in search results. This field is only considered if `page_token` is unset, and if the request is not for a specific URL. For example, 0 means to return results starting from the first matching result, and 10 means to return from the 11th result.

func (*PagesListCall) Organization

func (c *PagesListCall) Organization(organization string) *PagesListCall

Organization sets the optional parameter "organization": The organization for which we want to fetch markups for. For instance, "site.com". Cannot be specified along with an URL.

func (*PagesListCall) PageSize

func (c *PagesListCall) PageSize(pageSize int64) *PagesListCall

PageSize sets the optional parameter "pageSize": The pagination size. We will return up to that many results. Defaults to 10 if not set. Has no effect if a URL is requested.

func (*PagesListCall) PageToken

func (c *PagesListCall) PageToken(pageToken string) *PagesListCall

PageToken sets the optional parameter "pageToken": The pagination token. You may provide the `next_page_token` returned from a previous List request, if any, in order to get the next page. All other fields must have the same values as in the previous request.

func (*PagesListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*PagesListCall) Url

func (c *PagesListCall) Url(url string) *PagesListCall

Url sets the optional parameter "url": The URL from which to get `ClaimReview` markup. There will be at most one result. If markup is associated with a more canonical version of the URL provided, we will return that URL instead. Cannot be specified along with an organization.

type PagesService

type PagesService struct {
	// contains filtered or unexported fields
}

func NewPagesService

func NewPagesService(s *Service) *PagesService

func (*PagesService) Create

func (r *PagesService) Create(googlefactcheckingfactchecktoolsv1alpha1claimreviewmarkuppage *GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage) *PagesCreateCall

Create: Create `ClaimReview` markup on a page.

func (*PagesService) Delete

func (r *PagesService) Delete(name string) *PagesDeleteCall

Delete: Delete all `ClaimReview` markup on a page.

func (*PagesService) Get

func (r *PagesService) Get(name string) *PagesGetCall

Get: Get all `ClaimReview` markup on a page.

func (*PagesService) List

func (r *PagesService) List() *PagesListCall

List: List the `ClaimReview` markup pages for a specific URL or for an organization.

func (*PagesService) Update

func (r *PagesService) Update(name string, googlefactcheckingfactchecktoolsv1alpha1claimreviewmarkuppage *GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage) *PagesUpdateCall

Update: Update for all `ClaimReview` markup on a page

Note that this is a full update. To retain the existing `ClaimReview` markup on a page, first perform a Get operation, then modify the returned markup, and finally call Update with the entire `ClaimReview` markup as the body.

type PagesUpdateCall

type PagesUpdateCall struct {
	// contains filtered or unexported fields
}

func (*PagesUpdateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PagesUpdateCall) Do

Do executes the "factchecktools.pages.update" call. Exactly one of *GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage.ServerR esponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PagesUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PagesUpdateCall) Header

func (c *PagesUpdateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Claims *ClaimsService

	Pages *PagesService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL