type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Sites *SitesService ViolatingSites *ViolatingSitesService // contains filtered or unexported fields }
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(ctx context.Context, opts ...option.ClientOption) (*Service, error)
NewService creates a new Service.
SiteSummaryResponse: Response message for GetSiteSummary.
type SiteSummaryResponse struct { // AbusiveStatus: The site's Abusive Experience Report status. // // Possible values: // "UNKNOWN" - Not reviewed. // "PASSING" - Passing. // "FAILING" - Failing. AbusiveStatus string `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. EnforcementTime string `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. FilterStatus string `json:"filterStatus,omitempty"` // LastChangeTime: The time at which the site's status last changed. LastChangeTime string `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. ReportUrl string `json:"reportUrl,omitempty"` // ReviewedSite: The name of the reviewed site, e.g. `google.com`. ReviewedSite string `json:"reviewedSite,omitempty"` // UnderReview: Whether the site is currently under review. UnderReview bool `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:"-"` }
func (s *SiteSummaryResponse) MarshalJSON() ([]byte, error)
type SitesGetCall struct {
// contains filtered or unexported fields
}
func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall
Context sets the context to be used in this call's Do method.
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 at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (c *SitesGetCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall
IfNoneMatch sets an 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.
type SitesService struct {
// contains filtered or unexported fields
}
func NewSitesService(s *Service) *SitesService
func (r *SitesService) Get(name string) *SitesGetCall
Get: Gets a site's Abusive Experience Report summary.
type ViolatingSitesListCall struct {
// contains filtered or unexported fields
}
func (c *ViolatingSitesListCall) Context(ctx context.Context) *ViolatingSitesListCall
Context sets the context to be used in this call's Do method.
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 returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (c *ViolatingSitesListCall) Fields(s ...googleapi.Field) *ViolatingSitesListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.
func (c *ViolatingSitesListCall) Header() http.Header
Header returns a http.Header that can be modified by the caller to add headers to the request.
func (c *ViolatingSitesListCall) IfNoneMatch(entityTag string) *ViolatingSitesListCall
IfNoneMatch sets an 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.
ViolatingSitesResponse: Response message for ListViolatingSites.
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:"-"` }
func (s *ViolatingSitesResponse) MarshalJSON() ([]byte, error)
type ViolatingSitesService struct {
// contains filtered or unexported fields
}
func NewViolatingSitesService(s *Service) *ViolatingSitesService
func (r *ViolatingSitesService) List() *ViolatingSitesListCall
List: Lists sites that are failing in the Abusive Experience Report.