webmasters-gen.go 75 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325
  1. // Package webmasters provides access to the Search Console API.
  2. //
  3. // See https://developers.google.com/webmaster-tools/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/webmasters/v3"
  8. // ...
  9. // webmastersService, err := webmasters.New(oauthHttpClient)
  10. package webmasters // import "google.golang.org/api/webmasters/v3"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "webmasters:v3"
  41. const apiName = "webmasters"
  42. const apiVersion = "v3"
  43. const basePath = "https://www.googleapis.com/webmasters/v3/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage Search Console data for your verified sites
  47. WebmastersScope = "https://www.googleapis.com/auth/webmasters"
  48. // View Search Console data for your verified sites
  49. WebmastersReadonlyScope = "https://www.googleapis.com/auth/webmasters.readonly"
  50. )
  51. func New(client *http.Client) (*Service, error) {
  52. if client == nil {
  53. return nil, errors.New("client is nil")
  54. }
  55. s := &Service{client: client, BasePath: basePath}
  56. s.Searchanalytics = NewSearchanalyticsService(s)
  57. s.Sitemaps = NewSitemapsService(s)
  58. s.Sites = NewSitesService(s)
  59. s.Urlcrawlerrorscounts = NewUrlcrawlerrorscountsService(s)
  60. s.Urlcrawlerrorssamples = NewUrlcrawlerrorssamplesService(s)
  61. return s, nil
  62. }
  63. type Service struct {
  64. client *http.Client
  65. BasePath string // API endpoint base URL
  66. UserAgent string // optional additional User-Agent fragment
  67. Searchanalytics *SearchanalyticsService
  68. Sitemaps *SitemapsService
  69. Sites *SitesService
  70. Urlcrawlerrorscounts *UrlcrawlerrorscountsService
  71. Urlcrawlerrorssamples *UrlcrawlerrorssamplesService
  72. }
  73. func (s *Service) userAgent() string {
  74. if s.UserAgent == "" {
  75. return googleapi.UserAgent
  76. }
  77. return googleapi.UserAgent + " " + s.UserAgent
  78. }
  79. func NewSearchanalyticsService(s *Service) *SearchanalyticsService {
  80. rs := &SearchanalyticsService{s: s}
  81. return rs
  82. }
  83. type SearchanalyticsService struct {
  84. s *Service
  85. }
  86. func NewSitemapsService(s *Service) *SitemapsService {
  87. rs := &SitemapsService{s: s}
  88. return rs
  89. }
  90. type SitemapsService struct {
  91. s *Service
  92. }
  93. func NewSitesService(s *Service) *SitesService {
  94. rs := &SitesService{s: s}
  95. return rs
  96. }
  97. type SitesService struct {
  98. s *Service
  99. }
  100. func NewUrlcrawlerrorscountsService(s *Service) *UrlcrawlerrorscountsService {
  101. rs := &UrlcrawlerrorscountsService{s: s}
  102. return rs
  103. }
  104. type UrlcrawlerrorscountsService struct {
  105. s *Service
  106. }
  107. func NewUrlcrawlerrorssamplesService(s *Service) *UrlcrawlerrorssamplesService {
  108. rs := &UrlcrawlerrorssamplesService{s: s}
  109. return rs
  110. }
  111. type UrlcrawlerrorssamplesService struct {
  112. s *Service
  113. }
  114. type ApiDataRow struct {
  115. Clicks float64 `json:"clicks,omitempty"`
  116. Ctr float64 `json:"ctr,omitempty"`
  117. Impressions float64 `json:"impressions,omitempty"`
  118. Keys []string `json:"keys,omitempty"`
  119. Position float64 `json:"position,omitempty"`
  120. // ForceSendFields is a list of field names (e.g. "Clicks") to
  121. // unconditionally include in API requests. By default, fields with
  122. // empty values are omitted from API requests. However, any non-pointer,
  123. // non-interface field appearing in ForceSendFields will be sent to the
  124. // server regardless of whether the field is empty or not. This may be
  125. // used to include empty fields in Patch requests.
  126. ForceSendFields []string `json:"-"`
  127. }
  128. func (s *ApiDataRow) MarshalJSON() ([]byte, error) {
  129. type noMethod ApiDataRow
  130. raw := noMethod(*s)
  131. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  132. }
  133. type ApiDimensionFilter struct {
  134. Dimension string `json:"dimension,omitempty"`
  135. Expression string `json:"expression,omitempty"`
  136. Operator string `json:"operator,omitempty"`
  137. // ForceSendFields is a list of field names (e.g. "Dimension") to
  138. // unconditionally include in API requests. By default, fields with
  139. // empty values are omitted from API requests. However, any non-pointer,
  140. // non-interface field appearing in ForceSendFields will be sent to the
  141. // server regardless of whether the field is empty or not. This may be
  142. // used to include empty fields in Patch requests.
  143. ForceSendFields []string `json:"-"`
  144. }
  145. func (s *ApiDimensionFilter) MarshalJSON() ([]byte, error) {
  146. type noMethod ApiDimensionFilter
  147. raw := noMethod(*s)
  148. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  149. }
  150. type ApiDimensionFilterGroup struct {
  151. Filters []*ApiDimensionFilter `json:"filters,omitempty"`
  152. GroupType string `json:"groupType,omitempty"`
  153. // ForceSendFields is a list of field names (e.g. "Filters") to
  154. // unconditionally include in API requests. By default, fields with
  155. // empty values are omitted from API requests. However, any non-pointer,
  156. // non-interface field appearing in ForceSendFields will be sent to the
  157. // server regardless of whether the field is empty or not. This may be
  158. // used to include empty fields in Patch requests.
  159. ForceSendFields []string `json:"-"`
  160. }
  161. func (s *ApiDimensionFilterGroup) MarshalJSON() ([]byte, error) {
  162. type noMethod ApiDimensionFilterGroup
  163. raw := noMethod(*s)
  164. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  165. }
  166. type SearchAnalyticsQueryRequest struct {
  167. // AggregationType: [Optional; Default is "auto"] How data is
  168. // aggregated. If aggregated by property, all data for the same property
  169. // is aggregated; if aggregated by page, all data is aggregated by
  170. // canonical URI. If you filter or group by page, choose AUTO; otherwise
  171. // you can aggregate either by property or by page, depending on how you
  172. // want your data calculated; see the help documentation to learn how
  173. // data is calculated differently by site versus by page.
  174. //
  175. // Note: If you group or filter by page, you cannot aggregate by
  176. // property.
  177. //
  178. // If you specify any value other than AUTO, the aggregation type in the
  179. // result will match the requested type, or if you request an invalid
  180. // type, you will get an error. The API will never change your
  181. // aggregation type if the requested type is invalid.
  182. AggregationType string `json:"aggregationType,omitempty"`
  183. // DimensionFilterGroups: [Optional] Zero or more filters to apply to
  184. // the dimension grouping values; for example, 'query contains "buy"' to
  185. // see only data where the query string contains the substring "buy"
  186. // (not case-sensitive). You can filter by a dimension without grouping
  187. // by it.
  188. DimensionFilterGroups []*ApiDimensionFilterGroup `json:"dimensionFilterGroups,omitempty"`
  189. // Dimensions: [Optional] Zero or more dimensions to group results by.
  190. // Dimensions are the group-by values in the Search Analytics page.
  191. // Dimensions are combined to create a unique row key for each row.
  192. // Results are grouped in the order that you supply these dimensions.
  193. Dimensions []string `json:"dimensions,omitempty"`
  194. // EndDate: [Required] End date of the requested date range, in
  195. // YYYY-MM-DD format, in PST (UTC - 8:00). Must be greater than or equal
  196. // to the start date. This value is included in the range.
  197. EndDate string `json:"endDate,omitempty"`
  198. // RowLimit: [Optional; Default is 1000] The maximum number of rows to
  199. // return. Must be a number from 1 to 5,000 (inclusive).
  200. RowLimit int64 `json:"rowLimit,omitempty"`
  201. // SearchType: [Optional; Default is "web"] The search type to filter
  202. // for.
  203. SearchType string `json:"searchType,omitempty"`
  204. // StartDate: [Required] Start date of the requested date range, in
  205. // YYYY-MM-DD format, in PST time (UTC - 8:00). Must be less than or
  206. // equal to the end date. This value is included in the range.
  207. StartDate string `json:"startDate,omitempty"`
  208. // ForceSendFields is a list of field names (e.g. "AggregationType") to
  209. // unconditionally include in API requests. By default, fields with
  210. // empty values are omitted from API requests. However, any non-pointer,
  211. // non-interface field appearing in ForceSendFields will be sent to the
  212. // server regardless of whether the field is empty or not. This may be
  213. // used to include empty fields in Patch requests.
  214. ForceSendFields []string `json:"-"`
  215. }
  216. func (s *SearchAnalyticsQueryRequest) MarshalJSON() ([]byte, error) {
  217. type noMethod SearchAnalyticsQueryRequest
  218. raw := noMethod(*s)
  219. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  220. }
  221. // SearchAnalyticsQueryResponse: A list of rows, one per result, grouped
  222. // by key. Metrics in each row are aggregated for all data grouped by
  223. // that key either by page or property, as specified by the aggregation
  224. // type parameter.
  225. type SearchAnalyticsQueryResponse struct {
  226. // ResponseAggregationType: How the results were aggregated.
  227. ResponseAggregationType string `json:"responseAggregationType,omitempty"`
  228. // Rows: A list of rows grouped by the key values in the order given in
  229. // the query.
  230. Rows []*ApiDataRow `json:"rows,omitempty"`
  231. // ServerResponse contains the HTTP response code and headers from the
  232. // server.
  233. googleapi.ServerResponse `json:"-"`
  234. // ForceSendFields is a list of field names (e.g.
  235. // "ResponseAggregationType") to unconditionally include in API
  236. // requests. By default, fields with empty values are omitted from API
  237. // requests. However, any non-pointer, non-interface field appearing in
  238. // ForceSendFields will be sent to the server regardless of whether the
  239. // field is empty or not. This may be used to include empty fields in
  240. // Patch requests.
  241. ForceSendFields []string `json:"-"`
  242. }
  243. func (s *SearchAnalyticsQueryResponse) MarshalJSON() ([]byte, error) {
  244. type noMethod SearchAnalyticsQueryResponse
  245. raw := noMethod(*s)
  246. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  247. }
  248. // SitemapsListResponse: List of sitemaps.
  249. type SitemapsListResponse struct {
  250. // Sitemap: Contains detailed information about a specific URL submitted
  251. // as a sitemap.
  252. Sitemap []*WmxSitemap `json:"sitemap,omitempty"`
  253. // ServerResponse contains the HTTP response code and headers from the
  254. // server.
  255. googleapi.ServerResponse `json:"-"`
  256. // ForceSendFields is a list of field names (e.g. "Sitemap") to
  257. // unconditionally include in API requests. By default, fields with
  258. // empty values are omitted from API requests. However, any non-pointer,
  259. // non-interface field appearing in ForceSendFields will be sent to the
  260. // server regardless of whether the field is empty or not. This may be
  261. // used to include empty fields in Patch requests.
  262. ForceSendFields []string `json:"-"`
  263. }
  264. func (s *SitemapsListResponse) MarshalJSON() ([]byte, error) {
  265. type noMethod SitemapsListResponse
  266. raw := noMethod(*s)
  267. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  268. }
  269. // SitesListResponse: List of sites with access level information.
  270. type SitesListResponse struct {
  271. // SiteEntry: Contains permission level information about a Search
  272. // Console site. For more information, see Permissions in Search
  273. // Console.
  274. SiteEntry []*WmxSite `json:"siteEntry,omitempty"`
  275. // ServerResponse contains the HTTP response code and headers from the
  276. // server.
  277. googleapi.ServerResponse `json:"-"`
  278. // ForceSendFields is a list of field names (e.g. "SiteEntry") to
  279. // unconditionally include in API requests. By default, fields with
  280. // empty values are omitted from API requests. However, any non-pointer,
  281. // non-interface field appearing in ForceSendFields will be sent to the
  282. // server regardless of whether the field is empty or not. This may be
  283. // used to include empty fields in Patch requests.
  284. ForceSendFields []string `json:"-"`
  285. }
  286. func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
  287. type noMethod SitesListResponse
  288. raw := noMethod(*s)
  289. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  290. }
  291. // UrlCrawlErrorCount: An entry in a URL crawl errors time series.
  292. type UrlCrawlErrorCount struct {
  293. // Count: The error count at the given timestamp.
  294. Count int64 `json:"count,omitempty,string"`
  295. // Timestamp: The date and time when the crawl attempt took place, in
  296. // RFC 3339 format.
  297. Timestamp string `json:"timestamp,omitempty"`
  298. // ForceSendFields is a list of field names (e.g. "Count") to
  299. // unconditionally include in API requests. By default, fields with
  300. // empty values are omitted from API requests. However, any non-pointer,
  301. // non-interface field appearing in ForceSendFields will be sent to the
  302. // server regardless of whether the field is empty or not. This may be
  303. // used to include empty fields in Patch requests.
  304. ForceSendFields []string `json:"-"`
  305. }
  306. func (s *UrlCrawlErrorCount) MarshalJSON() ([]byte, error) {
  307. type noMethod UrlCrawlErrorCount
  308. raw := noMethod(*s)
  309. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  310. }
  311. // UrlCrawlErrorCountsPerType: Number of errors per day for a specific
  312. // error type (defined by platform and category).
  313. type UrlCrawlErrorCountsPerType struct {
  314. // Category: The crawl error type.
  315. Category string `json:"category,omitempty"`
  316. // Entries: The error count entries time series.
  317. Entries []*UrlCrawlErrorCount `json:"entries,omitempty"`
  318. // Platform: The general type of Googlebot that made the request (see
  319. // list of Googlebot user-agents for the user-agents used).
  320. Platform string `json:"platform,omitempty"`
  321. // ForceSendFields is a list of field names (e.g. "Category") to
  322. // unconditionally include in API requests. By default, fields with
  323. // empty values are omitted from API requests. However, any non-pointer,
  324. // non-interface field appearing in ForceSendFields will be sent to the
  325. // server regardless of whether the field is empty or not. This may be
  326. // used to include empty fields in Patch requests.
  327. ForceSendFields []string `json:"-"`
  328. }
  329. func (s *UrlCrawlErrorCountsPerType) MarshalJSON() ([]byte, error) {
  330. type noMethod UrlCrawlErrorCountsPerType
  331. raw := noMethod(*s)
  332. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  333. }
  334. // UrlCrawlErrorsCountsQueryResponse: A time series of the number of URL
  335. // crawl errors per error category and platform.
  336. type UrlCrawlErrorsCountsQueryResponse struct {
  337. // CountPerTypes: The time series of the number of URL crawl errors per
  338. // error category and platform.
  339. CountPerTypes []*UrlCrawlErrorCountsPerType `json:"countPerTypes,omitempty"`
  340. // ServerResponse contains the HTTP response code and headers from the
  341. // server.
  342. googleapi.ServerResponse `json:"-"`
  343. // ForceSendFields is a list of field names (e.g. "CountPerTypes") to
  344. // unconditionally include in API requests. By default, fields with
  345. // empty values are omitted from API requests. However, any non-pointer,
  346. // non-interface field appearing in ForceSendFields will be sent to the
  347. // server regardless of whether the field is empty or not. This may be
  348. // used to include empty fields in Patch requests.
  349. ForceSendFields []string `json:"-"`
  350. }
  351. func (s *UrlCrawlErrorsCountsQueryResponse) MarshalJSON() ([]byte, error) {
  352. type noMethod UrlCrawlErrorsCountsQueryResponse
  353. raw := noMethod(*s)
  354. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  355. }
  356. // UrlCrawlErrorsSample: Contains information about specific crawl
  357. // errors.
  358. type UrlCrawlErrorsSample struct {
  359. // FirstDetected: The time the error was first detected, in RFC 3339
  360. // format.
  361. FirstDetected string `json:"first_detected,omitempty"`
  362. // LastCrawled: The time when the URL was last crawled, in RFC 3339
  363. // format.
  364. LastCrawled string `json:"last_crawled,omitempty"`
  365. // PageUrl: The URL of an error, relative to the site.
  366. PageUrl string `json:"pageUrl,omitempty"`
  367. // ResponseCode: The HTTP response code, if any.
  368. ResponseCode int64 `json:"responseCode,omitempty"`
  369. // UrlDetails: Additional details about the URL, set only when calling
  370. // get().
  371. UrlDetails *UrlSampleDetails `json:"urlDetails,omitempty"`
  372. // ServerResponse contains the HTTP response code and headers from the
  373. // server.
  374. googleapi.ServerResponse `json:"-"`
  375. // ForceSendFields is a list of field names (e.g. "FirstDetected") to
  376. // unconditionally include in API requests. By default, fields with
  377. // empty values are omitted from API requests. However, any non-pointer,
  378. // non-interface field appearing in ForceSendFields will be sent to the
  379. // server regardless of whether the field is empty or not. This may be
  380. // used to include empty fields in Patch requests.
  381. ForceSendFields []string `json:"-"`
  382. }
  383. func (s *UrlCrawlErrorsSample) MarshalJSON() ([]byte, error) {
  384. type noMethod UrlCrawlErrorsSample
  385. raw := noMethod(*s)
  386. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  387. }
  388. // UrlCrawlErrorsSamplesListResponse: List of crawl error samples.
  389. type UrlCrawlErrorsSamplesListResponse struct {
  390. // UrlCrawlErrorSample: Information about the sample URL and its crawl
  391. // error.
  392. UrlCrawlErrorSample []*UrlCrawlErrorsSample `json:"urlCrawlErrorSample,omitempty"`
  393. // ServerResponse contains the HTTP response code and headers from the
  394. // server.
  395. googleapi.ServerResponse `json:"-"`
  396. // ForceSendFields is a list of field names (e.g. "UrlCrawlErrorSample")
  397. // to unconditionally include in API requests. By default, fields with
  398. // empty values are omitted from API requests. However, any non-pointer,
  399. // non-interface field appearing in ForceSendFields will be sent to the
  400. // server regardless of whether the field is empty or not. This may be
  401. // used to include empty fields in Patch requests.
  402. ForceSendFields []string `json:"-"`
  403. }
  404. func (s *UrlCrawlErrorsSamplesListResponse) MarshalJSON() ([]byte, error) {
  405. type noMethod UrlCrawlErrorsSamplesListResponse
  406. raw := noMethod(*s)
  407. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  408. }
  409. // UrlSampleDetails: Additional details about the URL, set only when
  410. // calling get().
  411. type UrlSampleDetails struct {
  412. // ContainingSitemaps: List of sitemaps pointing at this URL.
  413. ContainingSitemaps []string `json:"containingSitemaps,omitempty"`
  414. // LinkedFromUrls: A sample set of URLs linking to this URL.
  415. LinkedFromUrls []string `json:"linkedFromUrls,omitempty"`
  416. // ForceSendFields is a list of field names (e.g. "ContainingSitemaps")
  417. // to unconditionally include in API requests. By default, fields with
  418. // empty values are omitted from API requests. However, any non-pointer,
  419. // non-interface field appearing in ForceSendFields will be sent to the
  420. // server regardless of whether the field is empty or not. This may be
  421. // used to include empty fields in Patch requests.
  422. ForceSendFields []string `json:"-"`
  423. }
  424. func (s *UrlSampleDetails) MarshalJSON() ([]byte, error) {
  425. type noMethod UrlSampleDetails
  426. raw := noMethod(*s)
  427. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  428. }
  429. // WmxSite: Contains permission level information about a Search Console
  430. // site. For more information, see Permissions in Search Console.
  431. type WmxSite struct {
  432. // PermissionLevel: The user's permission level for the site.
  433. PermissionLevel string `json:"permissionLevel,omitempty"`
  434. // SiteUrl: The URL of the site.
  435. SiteUrl string `json:"siteUrl,omitempty"`
  436. // ServerResponse contains the HTTP response code and headers from the
  437. // server.
  438. googleapi.ServerResponse `json:"-"`
  439. // ForceSendFields is a list of field names (e.g. "PermissionLevel") to
  440. // unconditionally include in API requests. By default, fields with
  441. // empty values are omitted from API requests. However, any non-pointer,
  442. // non-interface field appearing in ForceSendFields will be sent to the
  443. // server regardless of whether the field is empty or not. This may be
  444. // used to include empty fields in Patch requests.
  445. ForceSendFields []string `json:"-"`
  446. }
  447. func (s *WmxSite) MarshalJSON() ([]byte, error) {
  448. type noMethod WmxSite
  449. raw := noMethod(*s)
  450. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  451. }
  452. // WmxSitemap: Contains detailed information about a specific URL
  453. // submitted as a sitemap.
  454. type WmxSitemap struct {
  455. // Contents: The various content types in the sitemap.
  456. Contents []*WmxSitemapContent `json:"contents,omitempty"`
  457. // Errors: Number of errors in the sitemap. These are issues with the
  458. // sitemap itself that need to be fixed before it can be processed
  459. // correctly.
  460. Errors int64 `json:"errors,omitempty,string"`
  461. // IsPending: If true, the sitemap has not been processed.
  462. IsPending bool `json:"isPending,omitempty"`
  463. // IsSitemapsIndex: If true, the sitemap is a collection of sitemaps.
  464. IsSitemapsIndex bool `json:"isSitemapsIndex,omitempty"`
  465. // LastDownloaded: Date & time in which this sitemap was last
  466. // downloaded. Date format is in RFC 3339 format (yyyy-mm-dd).
  467. LastDownloaded string `json:"lastDownloaded,omitempty"`
  468. // LastSubmitted: Date & time in which this sitemap was submitted. Date
  469. // format is in RFC 3339 format (yyyy-mm-dd).
  470. LastSubmitted string `json:"lastSubmitted,omitempty"`
  471. // Path: The url of the sitemap.
  472. Path string `json:"path,omitempty"`
  473. // Type: The type of the sitemap. For example: rssFeed.
  474. Type string `json:"type,omitempty"`
  475. // Warnings: Number of warnings for the sitemap. These are generally
  476. // non-critical issues with URLs in the sitemaps.
  477. Warnings int64 `json:"warnings,omitempty,string"`
  478. // ServerResponse contains the HTTP response code and headers from the
  479. // server.
  480. googleapi.ServerResponse `json:"-"`
  481. // ForceSendFields is a list of field names (e.g. "Contents") to
  482. // unconditionally include in API requests. By default, fields with
  483. // empty values are omitted from API requests. However, any non-pointer,
  484. // non-interface field appearing in ForceSendFields will be sent to the
  485. // server regardless of whether the field is empty or not. This may be
  486. // used to include empty fields in Patch requests.
  487. ForceSendFields []string `json:"-"`
  488. }
  489. func (s *WmxSitemap) MarshalJSON() ([]byte, error) {
  490. type noMethod WmxSitemap
  491. raw := noMethod(*s)
  492. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  493. }
  494. // WmxSitemapContent: Information about the various content types in the
  495. // sitemap.
  496. type WmxSitemapContent struct {
  497. // Indexed: The number of URLs from the sitemap that were indexed (of
  498. // the content type).
  499. Indexed int64 `json:"indexed,omitempty,string"`
  500. // Submitted: The number of URLs in the sitemap (of the content type).
  501. Submitted int64 `json:"submitted,omitempty,string"`
  502. // Type: The specific type of content in this sitemap. For example: web.
  503. Type string `json:"type,omitempty"`
  504. // ForceSendFields is a list of field names (e.g. "Indexed") to
  505. // unconditionally include in API requests. By default, fields with
  506. // empty values are omitted from API requests. However, any non-pointer,
  507. // non-interface field appearing in ForceSendFields will be sent to the
  508. // server regardless of whether the field is empty or not. This may be
  509. // used to include empty fields in Patch requests.
  510. ForceSendFields []string `json:"-"`
  511. }
  512. func (s *WmxSitemapContent) MarshalJSON() ([]byte, error) {
  513. type noMethod WmxSitemapContent
  514. raw := noMethod(*s)
  515. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  516. }
  517. // method id "webmasters.searchanalytics.query":
  518. type SearchanalyticsQueryCall struct {
  519. s *Service
  520. siteUrl string
  521. searchanalyticsqueryrequest *SearchAnalyticsQueryRequest
  522. urlParams_ gensupport.URLParams
  523. ctx_ context.Context
  524. }
  525. // Query: Query your data with filters and parameters that you define.
  526. // Returns zero or more rows grouped by the row keys that you define.
  527. // You must define a date range of one or more days.
  528. //
  529. // When date is one of the group by values, any days without data are
  530. // omitted from the result list. If you need to know which days have
  531. // data, issue a broad date range query grouped by date for any metric,
  532. // and see which day rows are returned.
  533. func (r *SearchanalyticsService) Query(siteUrl string, searchanalyticsqueryrequest *SearchAnalyticsQueryRequest) *SearchanalyticsQueryCall {
  534. c := &SearchanalyticsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  535. c.siteUrl = siteUrl
  536. c.searchanalyticsqueryrequest = searchanalyticsqueryrequest
  537. return c
  538. }
  539. // Fields allows partial responses to be retrieved. See
  540. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  541. // for more information.
  542. func (c *SearchanalyticsQueryCall) Fields(s ...googleapi.Field) *SearchanalyticsQueryCall {
  543. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  544. return c
  545. }
  546. // Context sets the context to be used in this call's Do method. Any
  547. // pending HTTP request will be aborted if the provided context is
  548. // canceled.
  549. func (c *SearchanalyticsQueryCall) Context(ctx context.Context) *SearchanalyticsQueryCall {
  550. c.ctx_ = ctx
  551. return c
  552. }
  553. func (c *SearchanalyticsQueryCall) doRequest(alt string) (*http.Response, error) {
  554. var body io.Reader = nil
  555. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchanalyticsqueryrequest)
  556. if err != nil {
  557. return nil, err
  558. }
  559. ctype := "application/json"
  560. c.urlParams_.Set("alt", alt)
  561. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/searchAnalytics/query")
  562. urls += "?" + c.urlParams_.Encode()
  563. req, _ := http.NewRequest("POST", urls, body)
  564. googleapi.Expand(req.URL, map[string]string{
  565. "siteUrl": c.siteUrl,
  566. })
  567. req.Header.Set("Content-Type", ctype)
  568. req.Header.Set("User-Agent", c.s.userAgent())
  569. if c.ctx_ != nil {
  570. return ctxhttp.Do(c.ctx_, c.s.client, req)
  571. }
  572. return c.s.client.Do(req)
  573. }
  574. // Do executes the "webmasters.searchanalytics.query" call.
  575. // Exactly one of *SearchAnalyticsQueryResponse or error will be
  576. // non-nil. Any non-2xx status code is an error. Response headers are in
  577. // either *SearchAnalyticsQueryResponse.ServerResponse.Header or (if a
  578. // response was returned at all) in error.(*googleapi.Error).Header. Use
  579. // googleapi.IsNotModified to check whether the returned error was
  580. // because http.StatusNotModified was returned.
  581. func (c *SearchanalyticsQueryCall) Do(opts ...googleapi.CallOption) (*SearchAnalyticsQueryResponse, error) {
  582. gensupport.SetOptions(c.urlParams_, opts...)
  583. res, err := c.doRequest("json")
  584. if res != nil && res.StatusCode == http.StatusNotModified {
  585. if res.Body != nil {
  586. res.Body.Close()
  587. }
  588. return nil, &googleapi.Error{
  589. Code: res.StatusCode,
  590. Header: res.Header,
  591. }
  592. }
  593. if err != nil {
  594. return nil, err
  595. }
  596. defer googleapi.CloseBody(res)
  597. if err := googleapi.CheckResponse(res); err != nil {
  598. return nil, err
  599. }
  600. ret := &SearchAnalyticsQueryResponse{
  601. ServerResponse: googleapi.ServerResponse{
  602. Header: res.Header,
  603. HTTPStatusCode: res.StatusCode,
  604. },
  605. }
  606. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  607. return nil, err
  608. }
  609. return ret, nil
  610. // {
  611. // "description": "Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days.\n\nWhen date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.",
  612. // "httpMethod": "POST",
  613. // "id": "webmasters.searchanalytics.query",
  614. // "parameterOrder": [
  615. // "siteUrl"
  616. // ],
  617. // "parameters": {
  618. // "siteUrl": {
  619. // "description": "The site's URL, including protocol. For example: http://www.example.com/",
  620. // "location": "path",
  621. // "required": true,
  622. // "type": "string"
  623. // }
  624. // },
  625. // "path": "sites/{siteUrl}/searchAnalytics/query",
  626. // "request": {
  627. // "$ref": "SearchAnalyticsQueryRequest"
  628. // },
  629. // "response": {
  630. // "$ref": "SearchAnalyticsQueryResponse"
  631. // },
  632. // "scopes": [
  633. // "https://www.googleapis.com/auth/webmasters",
  634. // "https://www.googleapis.com/auth/webmasters.readonly"
  635. // ]
  636. // }
  637. }
  638. // method id "webmasters.sitemaps.delete":
  639. type SitemapsDeleteCall struct {
  640. s *Service
  641. siteUrl string
  642. feedpath string
  643. urlParams_ gensupport.URLParams
  644. ctx_ context.Context
  645. }
  646. // Delete: Deletes a sitemap from this site.
  647. func (r *SitemapsService) Delete(siteUrl string, feedpath string) *SitemapsDeleteCall {
  648. c := &SitemapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  649. c.siteUrl = siteUrl
  650. c.feedpath = feedpath
  651. return c
  652. }
  653. // Fields allows partial responses to be retrieved. See
  654. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  655. // for more information.
  656. func (c *SitemapsDeleteCall) Fields(s ...googleapi.Field) *SitemapsDeleteCall {
  657. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  658. return c
  659. }
  660. // Context sets the context to be used in this call's Do method. Any
  661. // pending HTTP request will be aborted if the provided context is
  662. // canceled.
  663. func (c *SitemapsDeleteCall) Context(ctx context.Context) *SitemapsDeleteCall {
  664. c.ctx_ = ctx
  665. return c
  666. }
  667. func (c *SitemapsDeleteCall) doRequest(alt string) (*http.Response, error) {
  668. var body io.Reader = nil
  669. c.urlParams_.Set("alt", alt)
  670. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/sitemaps/{feedpath}")
  671. urls += "?" + c.urlParams_.Encode()
  672. req, _ := http.NewRequest("DELETE", urls, body)
  673. googleapi.Expand(req.URL, map[string]string{
  674. "siteUrl": c.siteUrl,
  675. "feedpath": c.feedpath,
  676. })
  677. req.Header.Set("User-Agent", c.s.userAgent())
  678. if c.ctx_ != nil {
  679. return ctxhttp.Do(c.ctx_, c.s.client, req)
  680. }
  681. return c.s.client.Do(req)
  682. }
  683. // Do executes the "webmasters.sitemaps.delete" call.
  684. func (c *SitemapsDeleteCall) Do(opts ...googleapi.CallOption) error {
  685. gensupport.SetOptions(c.urlParams_, opts...)
  686. res, err := c.doRequest("json")
  687. if err != nil {
  688. return err
  689. }
  690. defer googleapi.CloseBody(res)
  691. if err := googleapi.CheckResponse(res); err != nil {
  692. return err
  693. }
  694. return nil
  695. // {
  696. // "description": "Deletes a sitemap from this site.",
  697. // "httpMethod": "DELETE",
  698. // "id": "webmasters.sitemaps.delete",
  699. // "parameterOrder": [
  700. // "siteUrl",
  701. // "feedpath"
  702. // ],
  703. // "parameters": {
  704. // "feedpath": {
  705. // "description": "The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml",
  706. // "location": "path",
  707. // "required": true,
  708. // "type": "string"
  709. // },
  710. // "siteUrl": {
  711. // "description": "The site's URL, including protocol. For example: http://www.example.com/",
  712. // "location": "path",
  713. // "required": true,
  714. // "type": "string"
  715. // }
  716. // },
  717. // "path": "sites/{siteUrl}/sitemaps/{feedpath}",
  718. // "scopes": [
  719. // "https://www.googleapis.com/auth/webmasters"
  720. // ]
  721. // }
  722. }
  723. // method id "webmasters.sitemaps.get":
  724. type SitemapsGetCall struct {
  725. s *Service
  726. siteUrl string
  727. feedpath string
  728. urlParams_ gensupport.URLParams
  729. ifNoneMatch_ string
  730. ctx_ context.Context
  731. }
  732. // Get: Retrieves information about a specific sitemap.
  733. func (r *SitemapsService) Get(siteUrl string, feedpath string) *SitemapsGetCall {
  734. c := &SitemapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  735. c.siteUrl = siteUrl
  736. c.feedpath = feedpath
  737. return c
  738. }
  739. // Fields allows partial responses to be retrieved. See
  740. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  741. // for more information.
  742. func (c *SitemapsGetCall) Fields(s ...googleapi.Field) *SitemapsGetCall {
  743. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  744. return c
  745. }
  746. // IfNoneMatch sets the optional parameter which makes the operation
  747. // fail if the object's ETag matches the given value. This is useful for
  748. // getting updates only after the object has changed since the last
  749. // request. Use googleapi.IsNotModified to check whether the response
  750. // error from Do is the result of In-None-Match.
  751. func (c *SitemapsGetCall) IfNoneMatch(entityTag string) *SitemapsGetCall {
  752. c.ifNoneMatch_ = entityTag
  753. return c
  754. }
  755. // Context sets the context to be used in this call's Do method. Any
  756. // pending HTTP request will be aborted if the provided context is
  757. // canceled.
  758. func (c *SitemapsGetCall) Context(ctx context.Context) *SitemapsGetCall {
  759. c.ctx_ = ctx
  760. return c
  761. }
  762. func (c *SitemapsGetCall) doRequest(alt string) (*http.Response, error) {
  763. var body io.Reader = nil
  764. c.urlParams_.Set("alt", alt)
  765. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/sitemaps/{feedpath}")
  766. urls += "?" + c.urlParams_.Encode()
  767. req, _ := http.NewRequest("GET", urls, body)
  768. googleapi.Expand(req.URL, map[string]string{
  769. "siteUrl": c.siteUrl,
  770. "feedpath": c.feedpath,
  771. })
  772. req.Header.Set("User-Agent", c.s.userAgent())
  773. if c.ifNoneMatch_ != "" {
  774. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  775. }
  776. if c.ctx_ != nil {
  777. return ctxhttp.Do(c.ctx_, c.s.client, req)
  778. }
  779. return c.s.client.Do(req)
  780. }
  781. // Do executes the "webmasters.sitemaps.get" call.
  782. // Exactly one of *WmxSitemap or error will be non-nil. Any non-2xx
  783. // status code is an error. Response headers are in either
  784. // *WmxSitemap.ServerResponse.Header or (if a response was returned at
  785. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  786. // to check whether the returned error was because
  787. // http.StatusNotModified was returned.
  788. func (c *SitemapsGetCall) Do(opts ...googleapi.CallOption) (*WmxSitemap, error) {
  789. gensupport.SetOptions(c.urlParams_, opts...)
  790. res, err := c.doRequest("json")
  791. if res != nil && res.StatusCode == http.StatusNotModified {
  792. if res.Body != nil {
  793. res.Body.Close()
  794. }
  795. return nil, &googleapi.Error{
  796. Code: res.StatusCode,
  797. Header: res.Header,
  798. }
  799. }
  800. if err != nil {
  801. return nil, err
  802. }
  803. defer googleapi.CloseBody(res)
  804. if err := googleapi.CheckResponse(res); err != nil {
  805. return nil, err
  806. }
  807. ret := &WmxSitemap{
  808. ServerResponse: googleapi.ServerResponse{
  809. Header: res.Header,
  810. HTTPStatusCode: res.StatusCode,
  811. },
  812. }
  813. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  814. return nil, err
  815. }
  816. return ret, nil
  817. // {
  818. // "description": "Retrieves information about a specific sitemap.",
  819. // "httpMethod": "GET",
  820. // "id": "webmasters.sitemaps.get",
  821. // "parameterOrder": [
  822. // "siteUrl",
  823. // "feedpath"
  824. // ],
  825. // "parameters": {
  826. // "feedpath": {
  827. // "description": "The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml",
  828. // "location": "path",
  829. // "required": true,
  830. // "type": "string"
  831. // },
  832. // "siteUrl": {
  833. // "description": "The site's URL, including protocol. For example: http://www.example.com/",
  834. // "location": "path",
  835. // "required": true,
  836. // "type": "string"
  837. // }
  838. // },
  839. // "path": "sites/{siteUrl}/sitemaps/{feedpath}",
  840. // "response": {
  841. // "$ref": "WmxSitemap"
  842. // },
  843. // "scopes": [
  844. // "https://www.googleapis.com/auth/webmasters",
  845. // "https://www.googleapis.com/auth/webmasters.readonly"
  846. // ]
  847. // }
  848. }
  849. // method id "webmasters.sitemaps.list":
  850. type SitemapsListCall struct {
  851. s *Service
  852. siteUrl string
  853. urlParams_ gensupport.URLParams
  854. ifNoneMatch_ string
  855. ctx_ context.Context
  856. }
  857. // List: Lists the sitemaps-entries submitted for this site, or included
  858. // in the sitemap index file (if sitemapIndex is specified in the
  859. // request).
  860. func (r *SitemapsService) List(siteUrl string) *SitemapsListCall {
  861. c := &SitemapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  862. c.siteUrl = siteUrl
  863. return c
  864. }
  865. // SitemapIndex sets the optional parameter "sitemapIndex": A URL of a
  866. // site's sitemap index. For example:
  867. // http://www.example.com/sitemapindex.xml
  868. func (c *SitemapsListCall) SitemapIndex(sitemapIndex string) *SitemapsListCall {
  869. c.urlParams_.Set("sitemapIndex", sitemapIndex)
  870. return c
  871. }
  872. // Fields allows partial responses to be retrieved. See
  873. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  874. // for more information.
  875. func (c *SitemapsListCall) Fields(s ...googleapi.Field) *SitemapsListCall {
  876. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  877. return c
  878. }
  879. // IfNoneMatch sets the optional parameter which makes the operation
  880. // fail if the object's ETag matches the given value. This is useful for
  881. // getting updates only after the object has changed since the last
  882. // request. Use googleapi.IsNotModified to check whether the response
  883. // error from Do is the result of In-None-Match.
  884. func (c *SitemapsListCall) IfNoneMatch(entityTag string) *SitemapsListCall {
  885. c.ifNoneMatch_ = entityTag
  886. return c
  887. }
  888. // Context sets the context to be used in this call's Do method. Any
  889. // pending HTTP request will be aborted if the provided context is
  890. // canceled.
  891. func (c *SitemapsListCall) Context(ctx context.Context) *SitemapsListCall {
  892. c.ctx_ = ctx
  893. return c
  894. }
  895. func (c *SitemapsListCall) doRequest(alt string) (*http.Response, error) {
  896. var body io.Reader = nil
  897. c.urlParams_.Set("alt", alt)
  898. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/sitemaps")
  899. urls += "?" + c.urlParams_.Encode()
  900. req, _ := http.NewRequest("GET", urls, body)
  901. googleapi.Expand(req.URL, map[string]string{
  902. "siteUrl": c.siteUrl,
  903. })
  904. req.Header.Set("User-Agent", c.s.userAgent())
  905. if c.ifNoneMatch_ != "" {
  906. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  907. }
  908. if c.ctx_ != nil {
  909. return ctxhttp.Do(c.ctx_, c.s.client, req)
  910. }
  911. return c.s.client.Do(req)
  912. }
  913. // Do executes the "webmasters.sitemaps.list" call.
  914. // Exactly one of *SitemapsListResponse or error will be non-nil. Any
  915. // non-2xx status code is an error. Response headers are in either
  916. // *SitemapsListResponse.ServerResponse.Header or (if a response was
  917. // returned at all) in error.(*googleapi.Error).Header. Use
  918. // googleapi.IsNotModified to check whether the returned error was
  919. // because http.StatusNotModified was returned.
  920. func (c *SitemapsListCall) Do(opts ...googleapi.CallOption) (*SitemapsListResponse, error) {
  921. gensupport.SetOptions(c.urlParams_, opts...)
  922. res, err := c.doRequest("json")
  923. if res != nil && res.StatusCode == http.StatusNotModified {
  924. if res.Body != nil {
  925. res.Body.Close()
  926. }
  927. return nil, &googleapi.Error{
  928. Code: res.StatusCode,
  929. Header: res.Header,
  930. }
  931. }
  932. if err != nil {
  933. return nil, err
  934. }
  935. defer googleapi.CloseBody(res)
  936. if err := googleapi.CheckResponse(res); err != nil {
  937. return nil, err
  938. }
  939. ret := &SitemapsListResponse{
  940. ServerResponse: googleapi.ServerResponse{
  941. Header: res.Header,
  942. HTTPStatusCode: res.StatusCode,
  943. },
  944. }
  945. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  946. return nil, err
  947. }
  948. return ret, nil
  949. // {
  950. // "description": "Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if sitemapIndex is specified in the request).",
  951. // "httpMethod": "GET",
  952. // "id": "webmasters.sitemaps.list",
  953. // "parameterOrder": [
  954. // "siteUrl"
  955. // ],
  956. // "parameters": {
  957. // "siteUrl": {
  958. // "description": "The site's URL, including protocol. For example: http://www.example.com/",
  959. // "location": "path",
  960. // "required": true,
  961. // "type": "string"
  962. // },
  963. // "sitemapIndex": {
  964. // "description": "A URL of a site's sitemap index. For example: http://www.example.com/sitemapindex.xml",
  965. // "location": "query",
  966. // "type": "string"
  967. // }
  968. // },
  969. // "path": "sites/{siteUrl}/sitemaps",
  970. // "response": {
  971. // "$ref": "SitemapsListResponse"
  972. // },
  973. // "scopes": [
  974. // "https://www.googleapis.com/auth/webmasters",
  975. // "https://www.googleapis.com/auth/webmasters.readonly"
  976. // ]
  977. // }
  978. }
  979. // method id "webmasters.sitemaps.submit":
  980. type SitemapsSubmitCall struct {
  981. s *Service
  982. siteUrl string
  983. feedpath string
  984. urlParams_ gensupport.URLParams
  985. ctx_ context.Context
  986. }
  987. // Submit: Submits a sitemap for a site.
  988. func (r *SitemapsService) Submit(siteUrl string, feedpath string) *SitemapsSubmitCall {
  989. c := &SitemapsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  990. c.siteUrl = siteUrl
  991. c.feedpath = feedpath
  992. return c
  993. }
  994. // Fields allows partial responses to be retrieved. See
  995. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  996. // for more information.
  997. func (c *SitemapsSubmitCall) Fields(s ...googleapi.Field) *SitemapsSubmitCall {
  998. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  999. return c
  1000. }
  1001. // Context sets the context to be used in this call's Do method. Any
  1002. // pending HTTP request will be aborted if the provided context is
  1003. // canceled.
  1004. func (c *SitemapsSubmitCall) Context(ctx context.Context) *SitemapsSubmitCall {
  1005. c.ctx_ = ctx
  1006. return c
  1007. }
  1008. func (c *SitemapsSubmitCall) doRequest(alt string) (*http.Response, error) {
  1009. var body io.Reader = nil
  1010. c.urlParams_.Set("alt", alt)
  1011. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/sitemaps/{feedpath}")
  1012. urls += "?" + c.urlParams_.Encode()
  1013. req, _ := http.NewRequest("PUT", urls, body)
  1014. googleapi.Expand(req.URL, map[string]string{
  1015. "siteUrl": c.siteUrl,
  1016. "feedpath": c.feedpath,
  1017. })
  1018. req.Header.Set("User-Agent", c.s.userAgent())
  1019. if c.ctx_ != nil {
  1020. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1021. }
  1022. return c.s.client.Do(req)
  1023. }
  1024. // Do executes the "webmasters.sitemaps.submit" call.
  1025. func (c *SitemapsSubmitCall) Do(opts ...googleapi.CallOption) error {
  1026. gensupport.SetOptions(c.urlParams_, opts...)
  1027. res, err := c.doRequest("json")
  1028. if err != nil {
  1029. return err
  1030. }
  1031. defer googleapi.CloseBody(res)
  1032. if err := googleapi.CheckResponse(res); err != nil {
  1033. return err
  1034. }
  1035. return nil
  1036. // {
  1037. // "description": "Submits a sitemap for a site.",
  1038. // "httpMethod": "PUT",
  1039. // "id": "webmasters.sitemaps.submit",
  1040. // "parameterOrder": [
  1041. // "siteUrl",
  1042. // "feedpath"
  1043. // ],
  1044. // "parameters": {
  1045. // "feedpath": {
  1046. // "description": "The URL of the sitemap to add. For example: http://www.example.com/sitemap.xml",
  1047. // "location": "path",
  1048. // "required": true,
  1049. // "type": "string"
  1050. // },
  1051. // "siteUrl": {
  1052. // "description": "The site's URL, including protocol. For example: http://www.example.com/",
  1053. // "location": "path",
  1054. // "required": true,
  1055. // "type": "string"
  1056. // }
  1057. // },
  1058. // "path": "sites/{siteUrl}/sitemaps/{feedpath}",
  1059. // "scopes": [
  1060. // "https://www.googleapis.com/auth/webmasters"
  1061. // ]
  1062. // }
  1063. }
  1064. // method id "webmasters.sites.add":
  1065. type SitesAddCall struct {
  1066. s *Service
  1067. siteUrl string
  1068. urlParams_ gensupport.URLParams
  1069. ctx_ context.Context
  1070. }
  1071. // Add: Adds a site to the set of the user's sites in Search Console.
  1072. func (r *SitesService) Add(siteUrl string) *SitesAddCall {
  1073. c := &SitesAddCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1074. c.siteUrl = siteUrl
  1075. return c
  1076. }
  1077. // Fields allows partial responses to be retrieved. See
  1078. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1079. // for more information.
  1080. func (c *SitesAddCall) Fields(s ...googleapi.Field) *SitesAddCall {
  1081. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1082. return c
  1083. }
  1084. // Context sets the context to be used in this call's Do method. Any
  1085. // pending HTTP request will be aborted if the provided context is
  1086. // canceled.
  1087. func (c *SitesAddCall) Context(ctx context.Context) *SitesAddCall {
  1088. c.ctx_ = ctx
  1089. return c
  1090. }
  1091. func (c *SitesAddCall) doRequest(alt string) (*http.Response, error) {
  1092. var body io.Reader = nil
  1093. c.urlParams_.Set("alt", alt)
  1094. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}")
  1095. urls += "?" + c.urlParams_.Encode()
  1096. req, _ := http.NewRequest("PUT", urls, body)
  1097. googleapi.Expand(req.URL, map[string]string{
  1098. "siteUrl": c.siteUrl,
  1099. })
  1100. req.Header.Set("User-Agent", c.s.userAgent())
  1101. if c.ctx_ != nil {
  1102. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1103. }
  1104. return c.s.client.Do(req)
  1105. }
  1106. // Do executes the "webmasters.sites.add" call.
  1107. func (c *SitesAddCall) Do(opts ...googleapi.CallOption) error {
  1108. gensupport.SetOptions(c.urlParams_, opts...)
  1109. res, err := c.doRequest("json")
  1110. if err != nil {
  1111. return err
  1112. }
  1113. defer googleapi.CloseBody(res)
  1114. if err := googleapi.CheckResponse(res); err != nil {
  1115. return err
  1116. }
  1117. return nil
  1118. // {
  1119. // "description": "Adds a site to the set of the user's sites in Search Console.",
  1120. // "httpMethod": "PUT",
  1121. // "id": "webmasters.sites.add",
  1122. // "parameterOrder": [
  1123. // "siteUrl"
  1124. // ],
  1125. // "parameters": {
  1126. // "siteUrl": {
  1127. // "description": "The URL of the site to add.",
  1128. // "location": "path",
  1129. // "required": true,
  1130. // "type": "string"
  1131. // }
  1132. // },
  1133. // "path": "sites/{siteUrl}",
  1134. // "scopes": [
  1135. // "https://www.googleapis.com/auth/webmasters"
  1136. // ]
  1137. // }
  1138. }
  1139. // method id "webmasters.sites.delete":
  1140. type SitesDeleteCall struct {
  1141. s *Service
  1142. siteUrl string
  1143. urlParams_ gensupport.URLParams
  1144. ctx_ context.Context
  1145. }
  1146. // Delete: Removes a site from the set of the user's Search Console
  1147. // sites.
  1148. func (r *SitesService) Delete(siteUrl string) *SitesDeleteCall {
  1149. c := &SitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1150. c.siteUrl = siteUrl
  1151. return c
  1152. }
  1153. // Fields allows partial responses to be retrieved. See
  1154. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1155. // for more information.
  1156. func (c *SitesDeleteCall) Fields(s ...googleapi.Field) *SitesDeleteCall {
  1157. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1158. return c
  1159. }
  1160. // Context sets the context to be used in this call's Do method. Any
  1161. // pending HTTP request will be aborted if the provided context is
  1162. // canceled.
  1163. func (c *SitesDeleteCall) Context(ctx context.Context) *SitesDeleteCall {
  1164. c.ctx_ = ctx
  1165. return c
  1166. }
  1167. func (c *SitesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1168. var body io.Reader = nil
  1169. c.urlParams_.Set("alt", alt)
  1170. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}")
  1171. urls += "?" + c.urlParams_.Encode()
  1172. req, _ := http.NewRequest("DELETE", urls, body)
  1173. googleapi.Expand(req.URL, map[string]string{
  1174. "siteUrl": c.siteUrl,
  1175. })
  1176. req.Header.Set("User-Agent", c.s.userAgent())
  1177. if c.ctx_ != nil {
  1178. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1179. }
  1180. return c.s.client.Do(req)
  1181. }
  1182. // Do executes the "webmasters.sites.delete" call.
  1183. func (c *SitesDeleteCall) Do(opts ...googleapi.CallOption) error {
  1184. gensupport.SetOptions(c.urlParams_, opts...)
  1185. res, err := c.doRequest("json")
  1186. if err != nil {
  1187. return err
  1188. }
  1189. defer googleapi.CloseBody(res)
  1190. if err := googleapi.CheckResponse(res); err != nil {
  1191. return err
  1192. }
  1193. return nil
  1194. // {
  1195. // "description": "Removes a site from the set of the user's Search Console sites.",
  1196. // "httpMethod": "DELETE",
  1197. // "id": "webmasters.sites.delete",
  1198. // "parameterOrder": [
  1199. // "siteUrl"
  1200. // ],
  1201. // "parameters": {
  1202. // "siteUrl": {
  1203. // "description": "The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android-app://com.example/",
  1204. // "location": "path",
  1205. // "required": true,
  1206. // "type": "string"
  1207. // }
  1208. // },
  1209. // "path": "sites/{siteUrl}",
  1210. // "scopes": [
  1211. // "https://www.googleapis.com/auth/webmasters"
  1212. // ]
  1213. // }
  1214. }
  1215. // method id "webmasters.sites.get":
  1216. type SitesGetCall struct {
  1217. s *Service
  1218. siteUrl string
  1219. urlParams_ gensupport.URLParams
  1220. ifNoneMatch_ string
  1221. ctx_ context.Context
  1222. }
  1223. // Get: Retrieves information about specific site.
  1224. func (r *SitesService) Get(siteUrl string) *SitesGetCall {
  1225. c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1226. c.siteUrl = siteUrl
  1227. return c
  1228. }
  1229. // Fields allows partial responses to be retrieved. See
  1230. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1231. // for more information.
  1232. func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
  1233. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1234. return c
  1235. }
  1236. // IfNoneMatch sets the optional parameter which makes the operation
  1237. // fail if the object's ETag matches the given value. This is useful for
  1238. // getting updates only after the object has changed since the last
  1239. // request. Use googleapi.IsNotModified to check whether the response
  1240. // error from Do is the result of In-None-Match.
  1241. func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
  1242. c.ifNoneMatch_ = entityTag
  1243. return c
  1244. }
  1245. // Context sets the context to be used in this call's Do method. Any
  1246. // pending HTTP request will be aborted if the provided context is
  1247. // canceled.
  1248. func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
  1249. c.ctx_ = ctx
  1250. return c
  1251. }
  1252. func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
  1253. var body io.Reader = nil
  1254. c.urlParams_.Set("alt", alt)
  1255. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}")
  1256. urls += "?" + c.urlParams_.Encode()
  1257. req, _ := http.NewRequest("GET", urls, body)
  1258. googleapi.Expand(req.URL, map[string]string{
  1259. "siteUrl": c.siteUrl,
  1260. })
  1261. req.Header.Set("User-Agent", c.s.userAgent())
  1262. if c.ifNoneMatch_ != "" {
  1263. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1264. }
  1265. if c.ctx_ != nil {
  1266. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1267. }
  1268. return c.s.client.Do(req)
  1269. }
  1270. // Do executes the "webmasters.sites.get" call.
  1271. // Exactly one of *WmxSite or error will be non-nil. Any non-2xx status
  1272. // code is an error. Response headers are in either
  1273. // *WmxSite.ServerResponse.Header or (if a response was returned at all)
  1274. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1275. // check whether the returned error was because http.StatusNotModified
  1276. // was returned.
  1277. func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*WmxSite, error) {
  1278. gensupport.SetOptions(c.urlParams_, opts...)
  1279. res, err := c.doRequest("json")
  1280. if res != nil && res.StatusCode == http.StatusNotModified {
  1281. if res.Body != nil {
  1282. res.Body.Close()
  1283. }
  1284. return nil, &googleapi.Error{
  1285. Code: res.StatusCode,
  1286. Header: res.Header,
  1287. }
  1288. }
  1289. if err != nil {
  1290. return nil, err
  1291. }
  1292. defer googleapi.CloseBody(res)
  1293. if err := googleapi.CheckResponse(res); err != nil {
  1294. return nil, err
  1295. }
  1296. ret := &WmxSite{
  1297. ServerResponse: googleapi.ServerResponse{
  1298. Header: res.Header,
  1299. HTTPStatusCode: res.StatusCode,
  1300. },
  1301. }
  1302. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1303. return nil, err
  1304. }
  1305. return ret, nil
  1306. // {
  1307. // "description": "Retrieves information about specific site.",
  1308. // "httpMethod": "GET",
  1309. // "id": "webmasters.sites.get",
  1310. // "parameterOrder": [
  1311. // "siteUrl"
  1312. // ],
  1313. // "parameters": {
  1314. // "siteUrl": {
  1315. // "description": "The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android-app://com.example/",
  1316. // "location": "path",
  1317. // "required": true,
  1318. // "type": "string"
  1319. // }
  1320. // },
  1321. // "path": "sites/{siteUrl}",
  1322. // "response": {
  1323. // "$ref": "WmxSite"
  1324. // },
  1325. // "scopes": [
  1326. // "https://www.googleapis.com/auth/webmasters",
  1327. // "https://www.googleapis.com/auth/webmasters.readonly"
  1328. // ]
  1329. // }
  1330. }
  1331. // method id "webmasters.sites.list":
  1332. type SitesListCall struct {
  1333. s *Service
  1334. urlParams_ gensupport.URLParams
  1335. ifNoneMatch_ string
  1336. ctx_ context.Context
  1337. }
  1338. // List: Lists the user's Search Console sites.
  1339. func (r *SitesService) List() *SitesListCall {
  1340. c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1341. return c
  1342. }
  1343. // Fields allows partial responses to be retrieved. See
  1344. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1345. // for more information.
  1346. func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
  1347. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1348. return c
  1349. }
  1350. // IfNoneMatch sets the optional parameter which makes the operation
  1351. // fail if the object's ETag matches the given value. This is useful for
  1352. // getting updates only after the object has changed since the last
  1353. // request. Use googleapi.IsNotModified to check whether the response
  1354. // error from Do is the result of In-None-Match.
  1355. func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
  1356. c.ifNoneMatch_ = entityTag
  1357. return c
  1358. }
  1359. // Context sets the context to be used in this call's Do method. Any
  1360. // pending HTTP request will be aborted if the provided context is
  1361. // canceled.
  1362. func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
  1363. c.ctx_ = ctx
  1364. return c
  1365. }
  1366. func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
  1367. var body io.Reader = nil
  1368. c.urlParams_.Set("alt", alt)
  1369. urls := googleapi.ResolveRelative(c.s.BasePath, "sites")
  1370. urls += "?" + c.urlParams_.Encode()
  1371. req, _ := http.NewRequest("GET", urls, body)
  1372. googleapi.SetOpaque(req.URL)
  1373. req.Header.Set("User-Agent", c.s.userAgent())
  1374. if c.ifNoneMatch_ != "" {
  1375. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1376. }
  1377. if c.ctx_ != nil {
  1378. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1379. }
  1380. return c.s.client.Do(req)
  1381. }
  1382. // Do executes the "webmasters.sites.list" call.
  1383. // Exactly one of *SitesListResponse or error will be non-nil. Any
  1384. // non-2xx status code is an error. Response headers are in either
  1385. // *SitesListResponse.ServerResponse.Header or (if a response was
  1386. // returned at all) in error.(*googleapi.Error).Header. Use
  1387. // googleapi.IsNotModified to check whether the returned error was
  1388. // because http.StatusNotModified was returned.
  1389. func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
  1390. gensupport.SetOptions(c.urlParams_, opts...)
  1391. res, err := c.doRequest("json")
  1392. if res != nil && res.StatusCode == http.StatusNotModified {
  1393. if res.Body != nil {
  1394. res.Body.Close()
  1395. }
  1396. return nil, &googleapi.Error{
  1397. Code: res.StatusCode,
  1398. Header: res.Header,
  1399. }
  1400. }
  1401. if err != nil {
  1402. return nil, err
  1403. }
  1404. defer googleapi.CloseBody(res)
  1405. if err := googleapi.CheckResponse(res); err != nil {
  1406. return nil, err
  1407. }
  1408. ret := &SitesListResponse{
  1409. ServerResponse: googleapi.ServerResponse{
  1410. Header: res.Header,
  1411. HTTPStatusCode: res.StatusCode,
  1412. },
  1413. }
  1414. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1415. return nil, err
  1416. }
  1417. return ret, nil
  1418. // {
  1419. // "description": "Lists the user's Search Console sites.",
  1420. // "httpMethod": "GET",
  1421. // "id": "webmasters.sites.list",
  1422. // "path": "sites",
  1423. // "response": {
  1424. // "$ref": "SitesListResponse"
  1425. // },
  1426. // "scopes": [
  1427. // "https://www.googleapis.com/auth/webmasters",
  1428. // "https://www.googleapis.com/auth/webmasters.readonly"
  1429. // ]
  1430. // }
  1431. }
  1432. // method id "webmasters.urlcrawlerrorscounts.query":
  1433. type UrlcrawlerrorscountsQueryCall struct {
  1434. s *Service
  1435. siteUrl string
  1436. urlParams_ gensupport.URLParams
  1437. ifNoneMatch_ string
  1438. ctx_ context.Context
  1439. }
  1440. // Query: Retrieves a time series of the number of URL crawl errors per
  1441. // error category and platform.
  1442. func (r *UrlcrawlerrorscountsService) Query(siteUrl string) *UrlcrawlerrorscountsQueryCall {
  1443. c := &UrlcrawlerrorscountsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1444. c.siteUrl = siteUrl
  1445. return c
  1446. }
  1447. // Category sets the optional parameter "category": The crawl error
  1448. // category. For example: serverError. If not specified, returns results
  1449. // for all categories.
  1450. //
  1451. // Possible values:
  1452. // "authPermissions"
  1453. // "manyToOneRedirect"
  1454. // "notFollowed"
  1455. // "notFound"
  1456. // "other"
  1457. // "roboted"
  1458. // "serverError"
  1459. // "soft404"
  1460. func (c *UrlcrawlerrorscountsQueryCall) Category(category string) *UrlcrawlerrorscountsQueryCall {
  1461. c.urlParams_.Set("category", category)
  1462. return c
  1463. }
  1464. // LatestCountsOnly sets the optional parameter "latestCountsOnly": If
  1465. // true, returns only the latest crawl error counts.
  1466. func (c *UrlcrawlerrorscountsQueryCall) LatestCountsOnly(latestCountsOnly bool) *UrlcrawlerrorscountsQueryCall {
  1467. c.urlParams_.Set("latestCountsOnly", fmt.Sprint(latestCountsOnly))
  1468. return c
  1469. }
  1470. // Platform sets the optional parameter "platform": The user agent type
  1471. // (platform) that made the request. For example: web. If not specified,
  1472. // returns results for all platforms.
  1473. //
  1474. // Possible values:
  1475. // "mobile"
  1476. // "smartphoneOnly"
  1477. // "web"
  1478. func (c *UrlcrawlerrorscountsQueryCall) Platform(platform string) *UrlcrawlerrorscountsQueryCall {
  1479. c.urlParams_.Set("platform", platform)
  1480. return c
  1481. }
  1482. // Fields allows partial responses to be retrieved. See
  1483. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1484. // for more information.
  1485. func (c *UrlcrawlerrorscountsQueryCall) Fields(s ...googleapi.Field) *UrlcrawlerrorscountsQueryCall {
  1486. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1487. return c
  1488. }
  1489. // IfNoneMatch sets the optional parameter which makes the operation
  1490. // fail if the object's ETag matches the given value. This is useful for
  1491. // getting updates only after the object has changed since the last
  1492. // request. Use googleapi.IsNotModified to check whether the response
  1493. // error from Do is the result of In-None-Match.
  1494. func (c *UrlcrawlerrorscountsQueryCall) IfNoneMatch(entityTag string) *UrlcrawlerrorscountsQueryCall {
  1495. c.ifNoneMatch_ = entityTag
  1496. return c
  1497. }
  1498. // Context sets the context to be used in this call's Do method. Any
  1499. // pending HTTP request will be aborted if the provided context is
  1500. // canceled.
  1501. func (c *UrlcrawlerrorscountsQueryCall) Context(ctx context.Context) *UrlcrawlerrorscountsQueryCall {
  1502. c.ctx_ = ctx
  1503. return c
  1504. }
  1505. func (c *UrlcrawlerrorscountsQueryCall) doRequest(alt string) (*http.Response, error) {
  1506. var body io.Reader = nil
  1507. c.urlParams_.Set("alt", alt)
  1508. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/urlCrawlErrorsCounts/query")
  1509. urls += "?" + c.urlParams_.Encode()
  1510. req, _ := http.NewRequest("GET", urls, body)
  1511. googleapi.Expand(req.URL, map[string]string{
  1512. "siteUrl": c.siteUrl,
  1513. })
  1514. req.Header.Set("User-Agent", c.s.userAgent())
  1515. if c.ifNoneMatch_ != "" {
  1516. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1517. }
  1518. if c.ctx_ != nil {
  1519. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1520. }
  1521. return c.s.client.Do(req)
  1522. }
  1523. // Do executes the "webmasters.urlcrawlerrorscounts.query" call.
  1524. // Exactly one of *UrlCrawlErrorsCountsQueryResponse or error will be
  1525. // non-nil. Any non-2xx status code is an error. Response headers are in
  1526. // either *UrlCrawlErrorsCountsQueryResponse.ServerResponse.Header or
  1527. // (if a response was returned at all) in
  1528. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1529. // whether the returned error was because http.StatusNotModified was
  1530. // returned.
  1531. func (c *UrlcrawlerrorscountsQueryCall) Do(opts ...googleapi.CallOption) (*UrlCrawlErrorsCountsQueryResponse, error) {
  1532. gensupport.SetOptions(c.urlParams_, opts...)
  1533. res, err := c.doRequest("json")
  1534. if res != nil && res.StatusCode == http.StatusNotModified {
  1535. if res.Body != nil {
  1536. res.Body.Close()
  1537. }
  1538. return nil, &googleapi.Error{
  1539. Code: res.StatusCode,
  1540. Header: res.Header,
  1541. }
  1542. }
  1543. if err != nil {
  1544. return nil, err
  1545. }
  1546. defer googleapi.CloseBody(res)
  1547. if err := googleapi.CheckResponse(res); err != nil {
  1548. return nil, err
  1549. }
  1550. ret := &UrlCrawlErrorsCountsQueryResponse{
  1551. ServerResponse: googleapi.ServerResponse{
  1552. Header: res.Header,
  1553. HTTPStatusCode: res.StatusCode,
  1554. },
  1555. }
  1556. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1557. return nil, err
  1558. }
  1559. return ret, nil
  1560. // {
  1561. // "description": "Retrieves a time series of the number of URL crawl errors per error category and platform.",
  1562. // "httpMethod": "GET",
  1563. // "id": "webmasters.urlcrawlerrorscounts.query",
  1564. // "parameterOrder": [
  1565. // "siteUrl"
  1566. // ],
  1567. // "parameters": {
  1568. // "category": {
  1569. // "description": "The crawl error category. For example: serverError. If not specified, returns results for all categories.",
  1570. // "enum": [
  1571. // "authPermissions",
  1572. // "manyToOneRedirect",
  1573. // "notFollowed",
  1574. // "notFound",
  1575. // "other",
  1576. // "roboted",
  1577. // "serverError",
  1578. // "soft404"
  1579. // ],
  1580. // "enumDescriptions": [
  1581. // "",
  1582. // "",
  1583. // "",
  1584. // "",
  1585. // "",
  1586. // "",
  1587. // "",
  1588. // ""
  1589. // ],
  1590. // "location": "query",
  1591. // "type": "string"
  1592. // },
  1593. // "latestCountsOnly": {
  1594. // "default": "true",
  1595. // "description": "If true, returns only the latest crawl error counts.",
  1596. // "location": "query",
  1597. // "type": "boolean"
  1598. // },
  1599. // "platform": {
  1600. // "description": "The user agent type (platform) that made the request. For example: web. If not specified, returns results for all platforms.",
  1601. // "enum": [
  1602. // "mobile",
  1603. // "smartphoneOnly",
  1604. // "web"
  1605. // ],
  1606. // "enumDescriptions": [
  1607. // "",
  1608. // "",
  1609. // ""
  1610. // ],
  1611. // "location": "query",
  1612. // "type": "string"
  1613. // },
  1614. // "siteUrl": {
  1615. // "description": "The site's URL, including protocol. For example: http://www.example.com/",
  1616. // "location": "path",
  1617. // "required": true,
  1618. // "type": "string"
  1619. // }
  1620. // },
  1621. // "path": "sites/{siteUrl}/urlCrawlErrorsCounts/query",
  1622. // "response": {
  1623. // "$ref": "UrlCrawlErrorsCountsQueryResponse"
  1624. // },
  1625. // "scopes": [
  1626. // "https://www.googleapis.com/auth/webmasters",
  1627. // "https://www.googleapis.com/auth/webmasters.readonly"
  1628. // ]
  1629. // }
  1630. }
  1631. // method id "webmasters.urlcrawlerrorssamples.get":
  1632. type UrlcrawlerrorssamplesGetCall struct {
  1633. s *Service
  1634. siteUrl string
  1635. url string
  1636. urlParams_ gensupport.URLParams
  1637. ifNoneMatch_ string
  1638. ctx_ context.Context
  1639. }
  1640. // Get: Retrieves details about crawl errors for a site's sample URL.
  1641. func (r *UrlcrawlerrorssamplesService) Get(siteUrl string, url string, category string, platform string) *UrlcrawlerrorssamplesGetCall {
  1642. c := &UrlcrawlerrorssamplesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1643. c.siteUrl = siteUrl
  1644. c.url = url
  1645. c.urlParams_.Set("category", category)
  1646. c.urlParams_.Set("platform", platform)
  1647. return c
  1648. }
  1649. // Fields allows partial responses to be retrieved. See
  1650. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1651. // for more information.
  1652. func (c *UrlcrawlerrorssamplesGetCall) Fields(s ...googleapi.Field) *UrlcrawlerrorssamplesGetCall {
  1653. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1654. return c
  1655. }
  1656. // IfNoneMatch sets the optional parameter which makes the operation
  1657. // fail if the object's ETag matches the given value. This is useful for
  1658. // getting updates only after the object has changed since the last
  1659. // request. Use googleapi.IsNotModified to check whether the response
  1660. // error from Do is the result of In-None-Match.
  1661. func (c *UrlcrawlerrorssamplesGetCall) IfNoneMatch(entityTag string) *UrlcrawlerrorssamplesGetCall {
  1662. c.ifNoneMatch_ = entityTag
  1663. return c
  1664. }
  1665. // Context sets the context to be used in this call's Do method. Any
  1666. // pending HTTP request will be aborted if the provided context is
  1667. // canceled.
  1668. func (c *UrlcrawlerrorssamplesGetCall) Context(ctx context.Context) *UrlcrawlerrorssamplesGetCall {
  1669. c.ctx_ = ctx
  1670. return c
  1671. }
  1672. func (c *UrlcrawlerrorssamplesGetCall) doRequest(alt string) (*http.Response, error) {
  1673. var body io.Reader = nil
  1674. c.urlParams_.Set("alt", alt)
  1675. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/urlCrawlErrorsSamples/{url}")
  1676. urls += "?" + c.urlParams_.Encode()
  1677. req, _ := http.NewRequest("GET", urls, body)
  1678. googleapi.Expand(req.URL, map[string]string{
  1679. "siteUrl": c.siteUrl,
  1680. "url": c.url,
  1681. })
  1682. req.Header.Set("User-Agent", c.s.userAgent())
  1683. if c.ifNoneMatch_ != "" {
  1684. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1685. }
  1686. if c.ctx_ != nil {
  1687. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1688. }
  1689. return c.s.client.Do(req)
  1690. }
  1691. // Do executes the "webmasters.urlcrawlerrorssamples.get" call.
  1692. // Exactly one of *UrlCrawlErrorsSample or error will be non-nil. Any
  1693. // non-2xx status code is an error. Response headers are in either
  1694. // *UrlCrawlErrorsSample.ServerResponse.Header or (if a response was
  1695. // returned at all) in error.(*googleapi.Error).Header. Use
  1696. // googleapi.IsNotModified to check whether the returned error was
  1697. // because http.StatusNotModified was returned.
  1698. func (c *UrlcrawlerrorssamplesGetCall) Do(opts ...googleapi.CallOption) (*UrlCrawlErrorsSample, error) {
  1699. gensupport.SetOptions(c.urlParams_, opts...)
  1700. res, err := c.doRequest("json")
  1701. if res != nil && res.StatusCode == http.StatusNotModified {
  1702. if res.Body != nil {
  1703. res.Body.Close()
  1704. }
  1705. return nil, &googleapi.Error{
  1706. Code: res.StatusCode,
  1707. Header: res.Header,
  1708. }
  1709. }
  1710. if err != nil {
  1711. return nil, err
  1712. }
  1713. defer googleapi.CloseBody(res)
  1714. if err := googleapi.CheckResponse(res); err != nil {
  1715. return nil, err
  1716. }
  1717. ret := &UrlCrawlErrorsSample{
  1718. ServerResponse: googleapi.ServerResponse{
  1719. Header: res.Header,
  1720. HTTPStatusCode: res.StatusCode,
  1721. },
  1722. }
  1723. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1724. return nil, err
  1725. }
  1726. return ret, nil
  1727. // {
  1728. // "description": "Retrieves details about crawl errors for a site's sample URL.",
  1729. // "httpMethod": "GET",
  1730. // "id": "webmasters.urlcrawlerrorssamples.get",
  1731. // "parameterOrder": [
  1732. // "siteUrl",
  1733. // "url",
  1734. // "category",
  1735. // "platform"
  1736. // ],
  1737. // "parameters": {
  1738. // "category": {
  1739. // "description": "The crawl error category. For example: authPermissions",
  1740. // "enum": [
  1741. // "authPermissions",
  1742. // "manyToOneRedirect",
  1743. // "notFollowed",
  1744. // "notFound",
  1745. // "other",
  1746. // "roboted",
  1747. // "serverError",
  1748. // "soft404"
  1749. // ],
  1750. // "enumDescriptions": [
  1751. // "",
  1752. // "",
  1753. // "",
  1754. // "",
  1755. // "",
  1756. // "",
  1757. // "",
  1758. // ""
  1759. // ],
  1760. // "location": "query",
  1761. // "required": true,
  1762. // "type": "string"
  1763. // },
  1764. // "platform": {
  1765. // "description": "The user agent type (platform) that made the request. For example: web",
  1766. // "enum": [
  1767. // "mobile",
  1768. // "smartphoneOnly",
  1769. // "web"
  1770. // ],
  1771. // "enumDescriptions": [
  1772. // "",
  1773. // "",
  1774. // ""
  1775. // ],
  1776. // "location": "query",
  1777. // "required": true,
  1778. // "type": "string"
  1779. // },
  1780. // "siteUrl": {
  1781. // "description": "The site's URL, including protocol. For example: http://www.example.com/",
  1782. // "location": "path",
  1783. // "required": true,
  1784. // "type": "string"
  1785. // },
  1786. // "url": {
  1787. // "description": "The relative path (without the site) of the sample URL. It must be one of the URLs returned by list(). For example, for the URL https://www.example.com/pagename on the site https://www.example.com/, the url value is pagename",
  1788. // "location": "path",
  1789. // "required": true,
  1790. // "type": "string"
  1791. // }
  1792. // },
  1793. // "path": "sites/{siteUrl}/urlCrawlErrorsSamples/{url}",
  1794. // "response": {
  1795. // "$ref": "UrlCrawlErrorsSample"
  1796. // },
  1797. // "scopes": [
  1798. // "https://www.googleapis.com/auth/webmasters",
  1799. // "https://www.googleapis.com/auth/webmasters.readonly"
  1800. // ]
  1801. // }
  1802. }
  1803. // method id "webmasters.urlcrawlerrorssamples.list":
  1804. type UrlcrawlerrorssamplesListCall struct {
  1805. s *Service
  1806. siteUrl string
  1807. urlParams_ gensupport.URLParams
  1808. ifNoneMatch_ string
  1809. ctx_ context.Context
  1810. }
  1811. // List: Lists a site's sample URLs for the specified crawl error
  1812. // category and platform.
  1813. func (r *UrlcrawlerrorssamplesService) List(siteUrl string, category string, platform string) *UrlcrawlerrorssamplesListCall {
  1814. c := &UrlcrawlerrorssamplesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1815. c.siteUrl = siteUrl
  1816. c.urlParams_.Set("category", category)
  1817. c.urlParams_.Set("platform", platform)
  1818. return c
  1819. }
  1820. // Fields allows partial responses to be retrieved. See
  1821. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1822. // for more information.
  1823. func (c *UrlcrawlerrorssamplesListCall) Fields(s ...googleapi.Field) *UrlcrawlerrorssamplesListCall {
  1824. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1825. return c
  1826. }
  1827. // IfNoneMatch sets the optional parameter which makes the operation
  1828. // fail if the object's ETag matches the given value. This is useful for
  1829. // getting updates only after the object has changed since the last
  1830. // request. Use googleapi.IsNotModified to check whether the response
  1831. // error from Do is the result of In-None-Match.
  1832. func (c *UrlcrawlerrorssamplesListCall) IfNoneMatch(entityTag string) *UrlcrawlerrorssamplesListCall {
  1833. c.ifNoneMatch_ = entityTag
  1834. return c
  1835. }
  1836. // Context sets the context to be used in this call's Do method. Any
  1837. // pending HTTP request will be aborted if the provided context is
  1838. // canceled.
  1839. func (c *UrlcrawlerrorssamplesListCall) Context(ctx context.Context) *UrlcrawlerrorssamplesListCall {
  1840. c.ctx_ = ctx
  1841. return c
  1842. }
  1843. func (c *UrlcrawlerrorssamplesListCall) doRequest(alt string) (*http.Response, error) {
  1844. var body io.Reader = nil
  1845. c.urlParams_.Set("alt", alt)
  1846. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/urlCrawlErrorsSamples")
  1847. urls += "?" + c.urlParams_.Encode()
  1848. req, _ := http.NewRequest("GET", urls, body)
  1849. googleapi.Expand(req.URL, map[string]string{
  1850. "siteUrl": c.siteUrl,
  1851. })
  1852. req.Header.Set("User-Agent", c.s.userAgent())
  1853. if c.ifNoneMatch_ != "" {
  1854. req.Header.Set("If-None-Match", c.ifNoneMatch_)
  1855. }
  1856. if c.ctx_ != nil {
  1857. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1858. }
  1859. return c.s.client.Do(req)
  1860. }
  1861. // Do executes the "webmasters.urlcrawlerrorssamples.list" call.
  1862. // Exactly one of *UrlCrawlErrorsSamplesListResponse or error will be
  1863. // non-nil. Any non-2xx status code is an error. Response headers are in
  1864. // either *UrlCrawlErrorsSamplesListResponse.ServerResponse.Header or
  1865. // (if a response was returned at all) in
  1866. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1867. // whether the returned error was because http.StatusNotModified was
  1868. // returned.
  1869. func (c *UrlcrawlerrorssamplesListCall) Do(opts ...googleapi.CallOption) (*UrlCrawlErrorsSamplesListResponse, error) {
  1870. gensupport.SetOptions(c.urlParams_, opts...)
  1871. res, err := c.doRequest("json")
  1872. if res != nil && res.StatusCode == http.StatusNotModified {
  1873. if res.Body != nil {
  1874. res.Body.Close()
  1875. }
  1876. return nil, &googleapi.Error{
  1877. Code: res.StatusCode,
  1878. Header: res.Header,
  1879. }
  1880. }
  1881. if err != nil {
  1882. return nil, err
  1883. }
  1884. defer googleapi.CloseBody(res)
  1885. if err := googleapi.CheckResponse(res); err != nil {
  1886. return nil, err
  1887. }
  1888. ret := &UrlCrawlErrorsSamplesListResponse{
  1889. ServerResponse: googleapi.ServerResponse{
  1890. Header: res.Header,
  1891. HTTPStatusCode: res.StatusCode,
  1892. },
  1893. }
  1894. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1895. return nil, err
  1896. }
  1897. return ret, nil
  1898. // {
  1899. // "description": "Lists a site's sample URLs for the specified crawl error category and platform.",
  1900. // "httpMethod": "GET",
  1901. // "id": "webmasters.urlcrawlerrorssamples.list",
  1902. // "parameterOrder": [
  1903. // "siteUrl",
  1904. // "category",
  1905. // "platform"
  1906. // ],
  1907. // "parameters": {
  1908. // "category": {
  1909. // "description": "The crawl error category. For example: authPermissions",
  1910. // "enum": [
  1911. // "authPermissions",
  1912. // "manyToOneRedirect",
  1913. // "notFollowed",
  1914. // "notFound",
  1915. // "other",
  1916. // "roboted",
  1917. // "serverError",
  1918. // "soft404"
  1919. // ],
  1920. // "enumDescriptions": [
  1921. // "",
  1922. // "",
  1923. // "",
  1924. // "",
  1925. // "",
  1926. // "",
  1927. // "",
  1928. // ""
  1929. // ],
  1930. // "location": "query",
  1931. // "required": true,
  1932. // "type": "string"
  1933. // },
  1934. // "platform": {
  1935. // "description": "The user agent type (platform) that made the request. For example: web",
  1936. // "enum": [
  1937. // "mobile",
  1938. // "smartphoneOnly",
  1939. // "web"
  1940. // ],
  1941. // "enumDescriptions": [
  1942. // "",
  1943. // "",
  1944. // ""
  1945. // ],
  1946. // "location": "query",
  1947. // "required": true,
  1948. // "type": "string"
  1949. // },
  1950. // "siteUrl": {
  1951. // "description": "The site's URL, including protocol. For example: http://www.example.com/",
  1952. // "location": "path",
  1953. // "required": true,
  1954. // "type": "string"
  1955. // }
  1956. // },
  1957. // "path": "sites/{siteUrl}/urlCrawlErrorsSamples",
  1958. // "response": {
  1959. // "$ref": "UrlCrawlErrorsSamplesListResponse"
  1960. // },
  1961. // "scopes": [
  1962. // "https://www.googleapis.com/auth/webmasters",
  1963. // "https://www.googleapis.com/auth/webmasters.readonly"
  1964. // ]
  1965. // }
  1966. }
  1967. // method id "webmasters.urlcrawlerrorssamples.markAsFixed":
  1968. type UrlcrawlerrorssamplesMarkAsFixedCall struct {
  1969. s *Service
  1970. siteUrl string
  1971. url string
  1972. urlParams_ gensupport.URLParams
  1973. ctx_ context.Context
  1974. }
  1975. // MarkAsFixed: Marks the provided site's sample URL as fixed, and
  1976. // removes it from the samples list.
  1977. func (r *UrlcrawlerrorssamplesService) MarkAsFixed(siteUrl string, url string, category string, platform string) *UrlcrawlerrorssamplesMarkAsFixedCall {
  1978. c := &UrlcrawlerrorssamplesMarkAsFixedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1979. c.siteUrl = siteUrl
  1980. c.url = url
  1981. c.urlParams_.Set("category", category)
  1982. c.urlParams_.Set("platform", platform)
  1983. return c
  1984. }
  1985. // Fields allows partial responses to be retrieved. See
  1986. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1987. // for more information.
  1988. func (c *UrlcrawlerrorssamplesMarkAsFixedCall) Fields(s ...googleapi.Field) *UrlcrawlerrorssamplesMarkAsFixedCall {
  1989. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1990. return c
  1991. }
  1992. // Context sets the context to be used in this call's Do method. Any
  1993. // pending HTTP request will be aborted if the provided context is
  1994. // canceled.
  1995. func (c *UrlcrawlerrorssamplesMarkAsFixedCall) Context(ctx context.Context) *UrlcrawlerrorssamplesMarkAsFixedCall {
  1996. c.ctx_ = ctx
  1997. return c
  1998. }
  1999. func (c *UrlcrawlerrorssamplesMarkAsFixedCall) doRequest(alt string) (*http.Response, error) {
  2000. var body io.Reader = nil
  2001. c.urlParams_.Set("alt", alt)
  2002. urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/urlCrawlErrorsSamples/{url}")
  2003. urls += "?" + c.urlParams_.Encode()
  2004. req, _ := http.NewRequest("DELETE", urls, body)
  2005. googleapi.Expand(req.URL, map[string]string{
  2006. "siteUrl": c.siteUrl,
  2007. "url": c.url,
  2008. })
  2009. req.Header.Set("User-Agent", c.s.userAgent())
  2010. if c.ctx_ != nil {
  2011. return ctxhttp.Do(c.ctx_, c.s.client, req)
  2012. }
  2013. return c.s.client.Do(req)
  2014. }
  2015. // Do executes the "webmasters.urlcrawlerrorssamples.markAsFixed" call.
  2016. func (c *UrlcrawlerrorssamplesMarkAsFixedCall) Do(opts ...googleapi.CallOption) error {
  2017. gensupport.SetOptions(c.urlParams_, opts...)
  2018. res, err := c.doRequest("json")
  2019. if err != nil {
  2020. return err
  2021. }
  2022. defer googleapi.CloseBody(res)
  2023. if err := googleapi.CheckResponse(res); err != nil {
  2024. return err
  2025. }
  2026. return nil
  2027. // {
  2028. // "description": "Marks the provided site's sample URL as fixed, and removes it from the samples list.",
  2029. // "httpMethod": "DELETE",
  2030. // "id": "webmasters.urlcrawlerrorssamples.markAsFixed",
  2031. // "parameterOrder": [
  2032. // "siteUrl",
  2033. // "url",
  2034. // "category",
  2035. // "platform"
  2036. // ],
  2037. // "parameters": {
  2038. // "category": {
  2039. // "description": "The crawl error category. For example: authPermissions",
  2040. // "enum": [
  2041. // "authPermissions",
  2042. // "manyToOneRedirect",
  2043. // "notFollowed",
  2044. // "notFound",
  2045. // "other",
  2046. // "roboted",
  2047. // "serverError",
  2048. // "soft404"
  2049. // ],
  2050. // "enumDescriptions": [
  2051. // "",
  2052. // "",
  2053. // "",
  2054. // "",
  2055. // "",
  2056. // "",
  2057. // "",
  2058. // ""
  2059. // ],
  2060. // "location": "query",
  2061. // "required": true,
  2062. // "type": "string"
  2063. // },
  2064. // "platform": {
  2065. // "description": "The user agent type (platform) that made the request. For example: web",
  2066. // "enum": [
  2067. // "mobile",
  2068. // "smartphoneOnly",
  2069. // "web"
  2070. // ],
  2071. // "enumDescriptions": [
  2072. // "",
  2073. // "",
  2074. // ""
  2075. // ],
  2076. // "location": "query",
  2077. // "required": true,
  2078. // "type": "string"
  2079. // },
  2080. // "siteUrl": {
  2081. // "description": "The site's URL, including protocol. For example: http://www.example.com/",
  2082. // "location": "path",
  2083. // "required": true,
  2084. // "type": "string"
  2085. // },
  2086. // "url": {
  2087. // "description": "The relative path (without the site) of the sample URL. It must be one of the URLs returned by list(). For example, for the URL https://www.example.com/pagename on the site https://www.example.com/, the url value is pagename",
  2088. // "location": "path",
  2089. // "required": true,
  2090. // "type": "string"
  2091. // }
  2092. // },
  2093. // "path": "sites/{siteUrl}/urlCrawlErrorsSamples/{url}",
  2094. // "scopes": [
  2095. // "https://www.googleapis.com/auth/webmasters"
  2096. // ]
  2097. // }
  2098. }