abusiveexperiencereport
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package abusiveexperiencereport provides access to the Abusive Experience Report API.
For product documentation, see:https://developers.google.com/abusive-experience-report/
Library status¶
These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.
When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.
Creating a client¶
Usage example:
import "google.golang.org/api/abusiveexperiencereport/v1"...ctx := context.Background()abusiveexperiencereportService, err := abusiveexperiencereport.NewService(ctx)
In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:
abusiveexperiencereportService, err := abusiveexperiencereport.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)abusiveexperiencereportService, err := abusiveexperiencereport.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seegoogle.golang.org/api/option.ClientOption for details on options.
Index¶
- type Service
- type SiteSummaryResponse
- type SitesGetCall
- func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall
- func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*SiteSummaryResponse, error)
- func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall
- func (c *SitesGetCall) Header() http.Header
- func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall
- type SitesService
- type ViolatingSitesListCall
- func (c *ViolatingSitesListCall) Context(ctx context.Context) *ViolatingSitesListCall
- func (c *ViolatingSitesListCall) Do(opts ...googleapi.CallOption) (*ViolatingSitesResponse, error)
- func (c *ViolatingSitesListCall) Fields(s ...googleapi.Field) *ViolatingSitesListCall
- func (c *ViolatingSitesListCall) Header() http.Header
- func (c *ViolatingSitesListCall) IfNoneMatch(entityTag string) *ViolatingSitesListCall
- type ViolatingSitesResponse
- type ViolatingSitesService
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentSites *SitesServiceViolatingSites *ViolatingSitesService// contains filtered or unexported fields} funcNewdeprecated
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.
funcNewService¶added inv0.3.0
NewService creates a new Service.
typeSiteSummaryResponse¶
type SiteSummaryResponse struct {// AbusiveStatus: The site's Abusive Experience Report status.//// Possible values:// "UNKNOWN" - Not reviewed.// "PASSING" - Passing.// "FAILING" - Failing.AbusiveStatusstring `json:"abusiveStatus,omitempty"`// EnforcementTime: The time at which enforcement// (https://support.google.com/webtools/answer/7538608) against the site began// or will begin. Not set when the filter_status is OFF.EnforcementTimestring `json:"enforcementTime,omitempty"`// FilterStatus: The site's enforcement status// (https://support.google.com/webtools/answer/7538608).//// Possible values:// "UNKNOWN" - N/A.// "ON" - Enforcement is on.// "OFF" - Enforcement is off.// "PAUSED" - Enforcement is paused.// "PENDING" - Enforcement is pending.FilterStatusstring `json:"filterStatus,omitempty"`// LastChangeTime: The time at which the site's status last changed.LastChangeTimestring `json:"lastChangeTime,omitempty"`// ReportUrl: A link to the full Abusive Experience Report for the site. Not// set in ViolatingSitesResponse. Note that you must complete the Search// Console verification process// (https://support.google.com/webmasters/answer/9008080) for the site before// you can access the full report.ReportUrlstring `json:"reportUrl,omitempty"`// ReviewedSite: The name of the reviewed site, e.g. `google.com`.ReviewedSitestring `json:"reviewedSite,omitempty"`// UnderReview: Whether the site is currently under review.UnderReviewbool `json:"underReview,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "AbusiveStatus") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AbusiveStatus") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}SiteSummaryResponse: Response message for GetSiteSummary.
func (SiteSummaryResponse)MarshalJSON¶
func (sSiteSummaryResponse) MarshalJSON() ([]byte,error)
typeSitesGetCall¶
type SitesGetCall struct {// contains filtered or unexported fields}func (*SitesGetCall)Context¶
func (c *SitesGetCall) Context(ctxcontext.Context) *SitesGetCall
Context sets the context to be used in this call's Do method.
func (*SitesGetCall)Do¶
func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*SiteSummaryResponse,error)
Do executes the "abusiveexperiencereport.sites.get" call.Any non-2xx status code is an error. Response headers are in either*SiteSummaryResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*SitesGetCall)Fields¶
func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*SitesGetCall)Header¶
func (c *SitesGetCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*SitesGetCall)IfNoneMatch¶
func (c *SitesGetCall) IfNoneMatch(entityTagstring) *SitesGetCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeSitesService¶
type SitesService struct {// contains filtered or unexported fields}funcNewSitesService¶
func NewSitesService(s *Service) *SitesService
func (*SitesService)Get¶
func (r *SitesService) Get(namestring) *SitesGetCall
Get: Gets a site's Abusive Experience Report summary.
- name: The name of the site whose summary to get, e.g.`sites/http%3A%2F%2Fwww.google.com%2F`. Format: `sites/{site}`.
typeViolatingSitesListCall¶
type ViolatingSitesListCall struct {// contains filtered or unexported fields}func (*ViolatingSitesListCall)Context¶
func (c *ViolatingSitesListCall) Context(ctxcontext.Context) *ViolatingSitesListCall
Context sets the context to be used in this call's Do method.
func (*ViolatingSitesListCall)Do¶
func (c *ViolatingSitesListCall) Do(opts ...googleapi.CallOption) (*ViolatingSitesResponse,error)
Do executes the "abusiveexperiencereport.violatingSites.list" call.Any non-2xx status code is an error. Response headers are in either*ViolatingSitesResponse.ServerResponse.Header or (if a response was returnedat all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.
func (*ViolatingSitesListCall)Fields¶
func (c *ViolatingSitesListCall) Fields(s ...googleapi.Field) *ViolatingSitesListCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.
func (*ViolatingSitesListCall)Header¶
func (c *ViolatingSitesListCall) Header()http.Header
Header returns a http.Header that can be modified by the caller to addheaders to the request.
func (*ViolatingSitesListCall)IfNoneMatch¶
func (c *ViolatingSitesListCall) IfNoneMatch(entityTagstring) *ViolatingSitesListCall
IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.
typeViolatingSitesResponse¶
type ViolatingSitesResponse struct {// ViolatingSites: The list of violating sites.ViolatingSites []*SiteSummaryResponse `json:"violatingSites,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ViolatingSites") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ViolatingSites") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}ViolatingSitesResponse: Response message for ListViolatingSites.
func (ViolatingSitesResponse)MarshalJSON¶
func (sViolatingSitesResponse) MarshalJSON() ([]byte,error)
typeViolatingSitesService¶
type ViolatingSitesService struct {// contains filtered or unexported fields}funcNewViolatingSitesService¶
func NewViolatingSitesService(s *Service) *ViolatingSitesService
func (*ViolatingSitesService)List¶
func (r *ViolatingSitesService) List() *ViolatingSitesListCall
List: Lists sites that are failing in the Abusive Experience Report.