1unit googlewebmasters;
2{$MODE objfpc}
3{$H+}
4
5interface
6
7uses sysutils, classes, googleservice, restbase, googlebase;
8
9type
10
11  //Top-level schema types
12  TApiDataRow = Class;
13  TApiDimensionFilter = Class;
14  TApiDimensionFilterGroup = Class;
15  TSearchAnalyticsQueryRequest = Class;
16  TSearchAnalyticsQueryResponse = Class;
17  TSitemapsListResponse = Class;
18  TSitesListResponse = Class;
19  TUrlCrawlErrorCount = Class;
20  TUrlCrawlErrorCountsPerType = Class;
21  TUrlCrawlErrorsCountsQueryResponse = Class;
22  TUrlCrawlErrorsSample = Class;
23  TUrlCrawlErrorsSamplesListResponse = Class;
24  TUrlSampleDetails = Class;
25  TWmxSite = Class;
26  TWmxSitemap = Class;
27  TWmxSitemapContent = Class;
28  TApiDataRowArray = Array of TApiDataRow;
29  TApiDimensionFilterArray = Array of TApiDimensionFilter;
30  TApiDimensionFilterGroupArray = Array of TApiDimensionFilterGroup;
31  TSearchAnalyticsQueryRequestArray = Array of TSearchAnalyticsQueryRequest;
32  TSearchAnalyticsQueryResponseArray = Array of TSearchAnalyticsQueryResponse;
33  TSitemapsListResponseArray = Array of TSitemapsListResponse;
34  TSitesListResponseArray = Array of TSitesListResponse;
35  TUrlCrawlErrorCountArray = Array of TUrlCrawlErrorCount;
36  TUrlCrawlErrorCountsPerTypeArray = Array of TUrlCrawlErrorCountsPerType;
37  TUrlCrawlErrorsCountsQueryResponseArray = Array of TUrlCrawlErrorsCountsQueryResponse;
38  TUrlCrawlErrorsSampleArray = Array of TUrlCrawlErrorsSample;
39  TUrlCrawlErrorsSamplesListResponseArray = Array of TUrlCrawlErrorsSamplesListResponse;
40  TUrlSampleDetailsArray = Array of TUrlSampleDetails;
41  TWmxSiteArray = Array of TWmxSite;
42  TWmxSitemapArray = Array of TWmxSitemap;
43  TWmxSitemapContentArray = Array of TWmxSitemapContent;
44  //Anonymous types, using auto-generated names
45  TApiDimensionFilterGroupTypefiltersArray = Array of TApiDimensionFilter;
46  TSearchAnalyticsQueryRequestTypedimensionFilterGroupsArray = Array of TApiDimensionFilterGroup;
47  TSearchAnalyticsQueryResponseTyperowsArray = Array of TApiDataRow;
48  TSitemapsListResponseTypesitemapArray = Array of TWmxSitemap;
49  TSitesListResponseTypesiteEntryArray = Array of TWmxSite;
50  TUrlCrawlErrorCountsPerTypeTypeentriesArray = Array of TUrlCrawlErrorCount;
51  TUrlCrawlErrorsCountsQueryResponseTypecountPerTypesArray = Array of TUrlCrawlErrorCountsPerType;
52  TUrlCrawlErrorsSamplesListResponseTypeurlCrawlErrorSampleArray = Array of TUrlCrawlErrorsSample;
53  TWmxSitemapTypecontentsArray = Array of TWmxSitemapContent;
54
55  { --------------------------------------------------------------------
56    TApiDataRow
57    --------------------------------------------------------------------}
58
59  TApiDataRow = Class(TGoogleBaseObject)
60  Private
61    Fclicks : double;
62    Fctr : double;
63    Fimpressions : double;
64    Fkeys : TStringArray;
65    Fposition : double;
66  Protected
67    //Property setters
68    Procedure Setclicks(AIndex : Integer; const AValue : double); virtual;
69    Procedure Setctr(AIndex : Integer; const AValue : double); virtual;
70    Procedure Setimpressions(AIndex : Integer; const AValue : double); virtual;
71    Procedure Setkeys(AIndex : Integer; const AValue : TStringArray); virtual;
72    Procedure Setposition(AIndex : Integer; const AValue : double); virtual;
73    //2.6.4. bug workaround
74    {$IFDEF VER2_6}
75    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
76    {$ENDIF VER2_6}
77  Public
78  Published
79    Property clicks : double Index 0 Read Fclicks Write Setclicks;
80    Property ctr : double Index 8 Read Fctr Write Setctr;
81    Property impressions : double Index 16 Read Fimpressions Write Setimpressions;
82    Property keys : TStringArray Index 24 Read Fkeys Write Setkeys;
83    Property position : double Index 32 Read Fposition Write Setposition;
84  end;
85  TApiDataRowClass = Class of TApiDataRow;
86
87  { --------------------------------------------------------------------
88    TApiDimensionFilter
89    --------------------------------------------------------------------}
90
91  TApiDimensionFilter = Class(TGoogleBaseObject)
92  Private
93    Fdimension : String;
94    Fexpression : String;
95    F_operator : String;
96  Protected
97    Class Function ExportPropertyName(Const AName : String) : string; override;
98    //Property setters
99    Procedure Setdimension(AIndex : Integer; const AValue : String); virtual;
100    Procedure Setexpression(AIndex : Integer; const AValue : String); virtual;
101    Procedure Set_operator(AIndex : Integer; const AValue : String); virtual;
102  Public
103  Published
104    Property dimension : String Index 0 Read Fdimension Write Setdimension;
105    Property expression : String Index 8 Read Fexpression Write Setexpression;
106    Property _operator : String Index 16 Read F_operator Write Set_operator;
107  end;
108  TApiDimensionFilterClass = Class of TApiDimensionFilter;
109
110  { --------------------------------------------------------------------
111    TApiDimensionFilterGroup
112    --------------------------------------------------------------------}
113
114  TApiDimensionFilterGroup = Class(TGoogleBaseObject)
115  Private
116    Ffilters : TApiDimensionFilterGroupTypefiltersArray;
117    FgroupType : String;
118  Protected
119    //Property setters
120    Procedure Setfilters(AIndex : Integer; const AValue : TApiDimensionFilterGroupTypefiltersArray); virtual;
121    Procedure SetgroupType(AIndex : Integer; const AValue : String); virtual;
122    //2.6.4. bug workaround
123    {$IFDEF VER2_6}
124    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
125    {$ENDIF VER2_6}
126  Public
127  Published
128    Property filters : TApiDimensionFilterGroupTypefiltersArray Index 0 Read Ffilters Write Setfilters;
129    Property groupType : String Index 8 Read FgroupType Write SetgroupType;
130  end;
131  TApiDimensionFilterGroupClass = Class of TApiDimensionFilterGroup;
132
133  { --------------------------------------------------------------------
134    TSearchAnalyticsQueryRequest
135    --------------------------------------------------------------------}
136
137  TSearchAnalyticsQueryRequest = Class(TGoogleBaseObject)
138  Private
139    FaggregationType : String;
140    FdimensionFilterGroups : TSearchAnalyticsQueryRequestTypedimensionFilterGroupsArray;
141    Fdimensions : TStringArray;
142    FendDate : String;
143    FrowLimit : integer;
144    FsearchType : String;
145    FstartDate : String;
146    FstartRow : integer;
147  Protected
148    //Property setters
149    Procedure SetaggregationType(AIndex : Integer; const AValue : String); virtual;
150    Procedure SetdimensionFilterGroups(AIndex : Integer; const AValue : TSearchAnalyticsQueryRequestTypedimensionFilterGroupsArray); virtual;
151    Procedure Setdimensions(AIndex : Integer; const AValue : TStringArray); virtual;
152    Procedure SetendDate(AIndex : Integer; const AValue : String); virtual;
153    Procedure SetrowLimit(AIndex : Integer; const AValue : integer); virtual;
154    Procedure SetsearchType(AIndex : Integer; const AValue : String); virtual;
155    Procedure SetstartDate(AIndex : Integer; const AValue : String); virtual;
156    Procedure SetstartRow(AIndex : Integer; const AValue : integer); virtual;
157    //2.6.4. bug workaround
158    {$IFDEF VER2_6}
159    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
160    {$ENDIF VER2_6}
161  Public
162  Published
163    Property aggregationType : String Index 0 Read FaggregationType Write SetaggregationType;
164    Property dimensionFilterGroups : TSearchAnalyticsQueryRequestTypedimensionFilterGroupsArray Index 8 Read FdimensionFilterGroups Write SetdimensionFilterGroups;
165    Property dimensions : TStringArray Index 16 Read Fdimensions Write Setdimensions;
166    Property endDate : String Index 24 Read FendDate Write SetendDate;
167    Property rowLimit : integer Index 32 Read FrowLimit Write SetrowLimit;
168    Property searchType : String Index 40 Read FsearchType Write SetsearchType;
169    Property startDate : String Index 48 Read FstartDate Write SetstartDate;
170    Property startRow : integer Index 56 Read FstartRow Write SetstartRow;
171  end;
172  TSearchAnalyticsQueryRequestClass = Class of TSearchAnalyticsQueryRequest;
173
174  { --------------------------------------------------------------------
175    TSearchAnalyticsQueryResponse
176    --------------------------------------------------------------------}
177
178  TSearchAnalyticsQueryResponse = Class(TGoogleBaseObject)
179  Private
180    FresponseAggregationType : String;
181    Frows : TSearchAnalyticsQueryResponseTyperowsArray;
182  Protected
183    //Property setters
184    Procedure SetresponseAggregationType(AIndex : Integer; const AValue : String); virtual;
185    Procedure Setrows(AIndex : Integer; const AValue : TSearchAnalyticsQueryResponseTyperowsArray); virtual;
186    //2.6.4. bug workaround
187    {$IFDEF VER2_6}
188    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
189    {$ENDIF VER2_6}
190  Public
191  Published
192    Property responseAggregationType : String Index 0 Read FresponseAggregationType Write SetresponseAggregationType;
193    Property rows : TSearchAnalyticsQueryResponseTyperowsArray Index 8 Read Frows Write Setrows;
194  end;
195  TSearchAnalyticsQueryResponseClass = Class of TSearchAnalyticsQueryResponse;
196
197  { --------------------------------------------------------------------
198    TSitemapsListResponse
199    --------------------------------------------------------------------}
200
201  TSitemapsListResponse = Class(TGoogleBaseObject)
202  Private
203    Fsitemap : TSitemapsListResponseTypesitemapArray;
204  Protected
205    //Property setters
206    Procedure Setsitemap(AIndex : Integer; const AValue : TSitemapsListResponseTypesitemapArray); virtual;
207    //2.6.4. bug workaround
208    {$IFDEF VER2_6}
209    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
210    {$ENDIF VER2_6}
211  Public
212  Published
213    Property sitemap : TSitemapsListResponseTypesitemapArray Index 0 Read Fsitemap Write Setsitemap;
214  end;
215  TSitemapsListResponseClass = Class of TSitemapsListResponse;
216
217  { --------------------------------------------------------------------
218    TSitesListResponse
219    --------------------------------------------------------------------}
220
221  TSitesListResponse = Class(TGoogleBaseObject)
222  Private
223    FsiteEntry : TSitesListResponseTypesiteEntryArray;
224  Protected
225    //Property setters
226    Procedure SetsiteEntry(AIndex : Integer; const AValue : TSitesListResponseTypesiteEntryArray); virtual;
227    //2.6.4. bug workaround
228    {$IFDEF VER2_6}
229    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
230    {$ENDIF VER2_6}
231  Public
232  Published
233    Property siteEntry : TSitesListResponseTypesiteEntryArray Index 0 Read FsiteEntry Write SetsiteEntry;
234  end;
235  TSitesListResponseClass = Class of TSitesListResponse;
236
237  { --------------------------------------------------------------------
238    TUrlCrawlErrorCount
239    --------------------------------------------------------------------}
240
241  TUrlCrawlErrorCount = Class(TGoogleBaseObject)
242  Private
243    Fcount : String;
244    Ftimestamp : TDatetime;
245  Protected
246    //Property setters
247    Procedure Setcount(AIndex : Integer; const AValue : String); virtual;
248    Procedure Settimestamp(AIndex : Integer; const AValue : TDatetime); virtual;
249  Public
250  Published
251    Property count : String Index 0 Read Fcount Write Setcount;
252    Property timestamp : TDatetime Index 8 Read Ftimestamp Write Settimestamp;
253  end;
254  TUrlCrawlErrorCountClass = Class of TUrlCrawlErrorCount;
255
256  { --------------------------------------------------------------------
257    TUrlCrawlErrorCountsPerType
258    --------------------------------------------------------------------}
259
260  TUrlCrawlErrorCountsPerType = Class(TGoogleBaseObject)
261  Private
262    Fcategory : String;
263    Fentries : TUrlCrawlErrorCountsPerTypeTypeentriesArray;
264    Fplatform : String;
265  Protected
266    //Property setters
267    Procedure Setcategory(AIndex : Integer; const AValue : String); virtual;
268    Procedure Setentries(AIndex : Integer; const AValue : TUrlCrawlErrorCountsPerTypeTypeentriesArray); virtual;
269    Procedure Setplatform(AIndex : Integer; const AValue : String); virtual;
270    //2.6.4. bug workaround
271    {$IFDEF VER2_6}
272    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
273    {$ENDIF VER2_6}
274  Public
275  Published
276    Property category : String Index 0 Read Fcategory Write Setcategory;
277    Property entries : TUrlCrawlErrorCountsPerTypeTypeentriesArray Index 8 Read Fentries Write Setentries;
278    Property platform : String Index 16 Read Fplatform Write Setplatform;
279  end;
280  TUrlCrawlErrorCountsPerTypeClass = Class of TUrlCrawlErrorCountsPerType;
281
282  { --------------------------------------------------------------------
283    TUrlCrawlErrorsCountsQueryResponse
284    --------------------------------------------------------------------}
285
286  TUrlCrawlErrorsCountsQueryResponse = Class(TGoogleBaseObject)
287  Private
288    FcountPerTypes : TUrlCrawlErrorsCountsQueryResponseTypecountPerTypesArray;
289  Protected
290    //Property setters
291    Procedure SetcountPerTypes(AIndex : Integer; const AValue : TUrlCrawlErrorsCountsQueryResponseTypecountPerTypesArray); virtual;
292    //2.6.4. bug workaround
293    {$IFDEF VER2_6}
294    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
295    {$ENDIF VER2_6}
296  Public
297  Published
298    Property countPerTypes : TUrlCrawlErrorsCountsQueryResponseTypecountPerTypesArray Index 0 Read FcountPerTypes Write SetcountPerTypes;
299  end;
300  TUrlCrawlErrorsCountsQueryResponseClass = Class of TUrlCrawlErrorsCountsQueryResponse;
301
302  { --------------------------------------------------------------------
303    TUrlCrawlErrorsSample
304    --------------------------------------------------------------------}
305
306  TUrlCrawlErrorsSample = Class(TGoogleBaseObject)
307  Private
308    Ffirst_detected : TDatetime;
309    Flast_crawled : TDatetime;
310    FpageUrl : String;
311    FresponseCode : integer;
312    FurlDetails : TUrlSampleDetails;
313  Protected
314    //Property setters
315    Procedure Setfirst_detected(AIndex : Integer; const AValue : TDatetime); virtual;
316    Procedure Setlast_crawled(AIndex : Integer; const AValue : TDatetime); virtual;
317    Procedure SetpageUrl(AIndex : Integer; const AValue : String); virtual;
318    Procedure SetresponseCode(AIndex : Integer; const AValue : integer); virtual;
319    Procedure SeturlDetails(AIndex : Integer; const AValue : TUrlSampleDetails); virtual;
320  Public
321  Published
322    Property first_detected : TDatetime Index 0 Read Ffirst_detected Write Setfirst_detected;
323    Property last_crawled : TDatetime Index 8 Read Flast_crawled Write Setlast_crawled;
324    Property pageUrl : String Index 16 Read FpageUrl Write SetpageUrl;
325    Property responseCode : integer Index 24 Read FresponseCode Write SetresponseCode;
326    Property urlDetails : TUrlSampleDetails Index 32 Read FurlDetails Write SeturlDetails;
327  end;
328  TUrlCrawlErrorsSampleClass = Class of TUrlCrawlErrorsSample;
329
330  { --------------------------------------------------------------------
331    TUrlCrawlErrorsSamplesListResponse
332    --------------------------------------------------------------------}
333
334  TUrlCrawlErrorsSamplesListResponse = Class(TGoogleBaseObject)
335  Private
336    FurlCrawlErrorSample : TUrlCrawlErrorsSamplesListResponseTypeurlCrawlErrorSampleArray;
337  Protected
338    //Property setters
339    Procedure SeturlCrawlErrorSample(AIndex : Integer; const AValue : TUrlCrawlErrorsSamplesListResponseTypeurlCrawlErrorSampleArray); virtual;
340    //2.6.4. bug workaround
341    {$IFDEF VER2_6}
342    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
343    {$ENDIF VER2_6}
344  Public
345  Published
346    Property urlCrawlErrorSample : TUrlCrawlErrorsSamplesListResponseTypeurlCrawlErrorSampleArray Index 0 Read FurlCrawlErrorSample Write SeturlCrawlErrorSample;
347  end;
348  TUrlCrawlErrorsSamplesListResponseClass = Class of TUrlCrawlErrorsSamplesListResponse;
349
350  { --------------------------------------------------------------------
351    TUrlSampleDetails
352    --------------------------------------------------------------------}
353
354  TUrlSampleDetails = Class(TGoogleBaseObject)
355  Private
356    FcontainingSitemaps : TStringArray;
357    FlinkedFromUrls : TStringArray;
358  Protected
359    //Property setters
360    Procedure SetcontainingSitemaps(AIndex : Integer; const AValue : TStringArray); virtual;
361    Procedure SetlinkedFromUrls(AIndex : Integer; const AValue : TStringArray); virtual;
362    //2.6.4. bug workaround
363    {$IFDEF VER2_6}
364    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
365    {$ENDIF VER2_6}
366  Public
367  Published
368    Property containingSitemaps : TStringArray Index 0 Read FcontainingSitemaps Write SetcontainingSitemaps;
369    Property linkedFromUrls : TStringArray Index 8 Read FlinkedFromUrls Write SetlinkedFromUrls;
370  end;
371  TUrlSampleDetailsClass = Class of TUrlSampleDetails;
372
373  { --------------------------------------------------------------------
374    TWmxSite
375    --------------------------------------------------------------------}
376
377  TWmxSite = Class(TGoogleBaseObject)
378  Private
379    FpermissionLevel : String;
380    FsiteUrl : String;
381  Protected
382    //Property setters
383    Procedure SetpermissionLevel(AIndex : Integer; const AValue : String); virtual;
384    Procedure SetsiteUrl(AIndex : Integer; const AValue : String); virtual;
385  Public
386  Published
387    Property permissionLevel : String Index 0 Read FpermissionLevel Write SetpermissionLevel;
388    Property siteUrl : String Index 8 Read FsiteUrl Write SetsiteUrl;
389  end;
390  TWmxSiteClass = Class of TWmxSite;
391
392  { --------------------------------------------------------------------
393    TWmxSitemap
394    --------------------------------------------------------------------}
395
396  TWmxSitemap = Class(TGoogleBaseObject)
397  Private
398    Fcontents : TWmxSitemapTypecontentsArray;
399    Ferrors : String;
400    FisPending : boolean;
401    FisSitemapsIndex : boolean;
402    FlastDownloaded : TDatetime;
403    FlastSubmitted : TDatetime;
404    Fpath : String;
405    F_type : String;
406    Fwarnings : String;
407  Protected
408    Class Function ExportPropertyName(Const AName : String) : string; override;
409    //Property setters
410    Procedure Setcontents(AIndex : Integer; const AValue : TWmxSitemapTypecontentsArray); virtual;
411    Procedure Seterrors(AIndex : Integer; const AValue : String); virtual;
412    Procedure SetisPending(AIndex : Integer; const AValue : boolean); virtual;
413    Procedure SetisSitemapsIndex(AIndex : Integer; const AValue : boolean); virtual;
414    Procedure SetlastDownloaded(AIndex : Integer; const AValue : TDatetime); virtual;
415    Procedure SetlastSubmitted(AIndex : Integer; const AValue : TDatetime); virtual;
416    Procedure Setpath(AIndex : Integer; const AValue : String); virtual;
417    Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
418    Procedure Setwarnings(AIndex : Integer; const AValue : String); virtual;
419    //2.6.4. bug workaround
420    {$IFDEF VER2_6}
421    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
422    {$ENDIF VER2_6}
423  Public
424  Published
425    Property contents : TWmxSitemapTypecontentsArray Index 0 Read Fcontents Write Setcontents;
426    Property errors : String Index 8 Read Ferrors Write Seterrors;
427    Property isPending : boolean Index 16 Read FisPending Write SetisPending;
428    Property isSitemapsIndex : boolean Index 24 Read FisSitemapsIndex Write SetisSitemapsIndex;
429    Property lastDownloaded : TDatetime Index 32 Read FlastDownloaded Write SetlastDownloaded;
430    Property lastSubmitted : TDatetime Index 40 Read FlastSubmitted Write SetlastSubmitted;
431    Property path : String Index 48 Read Fpath Write Setpath;
432    Property _type : String Index 56 Read F_type Write Set_type;
433    Property warnings : String Index 64 Read Fwarnings Write Setwarnings;
434  end;
435  TWmxSitemapClass = Class of TWmxSitemap;
436
437  { --------------------------------------------------------------------
438    TWmxSitemapContent
439    --------------------------------------------------------------------}
440
441  TWmxSitemapContent = Class(TGoogleBaseObject)
442  Private
443    Findexed : String;
444    Fsubmitted : String;
445    F_type : String;
446  Protected
447    Class Function ExportPropertyName(Const AName : String) : string; override;
448    //Property setters
449    Procedure Setindexed(AIndex : Integer; const AValue : String); virtual;
450    Procedure Setsubmitted(AIndex : Integer; const AValue : String); virtual;
451    Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
452  Public
453  Published
454    Property indexed : String Index 0 Read Findexed Write Setindexed;
455    Property submitted : String Index 8 Read Fsubmitted Write Setsubmitted;
456    Property _type : String Index 16 Read F_type Write Set_type;
457  end;
458  TWmxSitemapContentClass = Class of TWmxSitemapContent;
459
460  { --------------------------------------------------------------------
461    TSearchanalyticsResource
462    --------------------------------------------------------------------}
463
464  TSearchanalyticsResource = Class(TGoogleResource)
465  Public
466    Class Function ResourceName : String; override;
467    Class Function DefaultAPI : TGoogleAPIClass; override;
468    Function Query(siteUrl: string; aSearchAnalyticsQueryRequest : TSearchAnalyticsQueryRequest) : TSearchAnalyticsQueryResponse;
469  end;
470
471
472  { --------------------------------------------------------------------
473    TSitemapsResource
474    --------------------------------------------------------------------}
475
476
477  //Optional query Options for TSitemapsResource, method List
478
479  TSitemapsListOptions = Record
480    sitemapIndex : String;
481  end;
482
483  TSitemapsResource = Class(TGoogleResource)
484  Public
485    Class Function ResourceName : String; override;
486    Class Function DefaultAPI : TGoogleAPIClass; override;
487    Procedure Delete(feedpath: string; siteUrl: string);
488    Function Get(feedpath: string; siteUrl: string) : TWmxSitemap;
489    Function List(siteUrl: string; AQuery : string  = '') : TSitemapsListResponse;
490    Function List(siteUrl: string; AQuery : TSitemapslistOptions) : TSitemapsListResponse;
491    Procedure Submit(feedpath: string; siteUrl: string);
492  end;
493
494
495  { --------------------------------------------------------------------
496    TSitesResource
497    --------------------------------------------------------------------}
498
499  TSitesResource = Class(TGoogleResource)
500  Public
501    Class Function ResourceName : String; override;
502    Class Function DefaultAPI : TGoogleAPIClass; override;
503    Procedure Add(siteUrl: string);
504    Procedure Delete(siteUrl: string);
505    Function Get(siteUrl: string) : TWmxSite;
506    Function List : TSitesListResponse;
507  end;
508
509
510  { --------------------------------------------------------------------
511    TUrlcrawlerrorscountsResource
512    --------------------------------------------------------------------}
513
514
515  //Optional query Options for TUrlcrawlerrorscountsResource, method Query
516
517  TUrlcrawlerrorscountsQueryOptions = Record
518    category : String;
519    latestCountsOnly : boolean;
520    platform : String;
521  end;
522
523  TUrlcrawlerrorscountsResource = Class(TGoogleResource)
524  Public
525    Class Function ResourceName : String; override;
526    Class Function DefaultAPI : TGoogleAPIClass; override;
527    Function Query(siteUrl: string; AQuery : string  = '') : TUrlCrawlErrorsCountsQueryResponse;
528    Function Query(siteUrl: string; AQuery : TUrlcrawlerrorscountsqueryOptions) : TUrlCrawlErrorsCountsQueryResponse;
529  end;
530
531
532  { --------------------------------------------------------------------
533    TUrlcrawlerrorssamplesResource
534    --------------------------------------------------------------------}
535
536
537  //Optional query Options for TUrlcrawlerrorssamplesResource, method Get
538
539  TUrlcrawlerrorssamplesGetOptions = Record
540    category : String;
541    platform : String;
542  end;
543
544
545  //Optional query Options for TUrlcrawlerrorssamplesResource, method List
546
547  TUrlcrawlerrorssamplesListOptions = Record
548    category : String;
549    platform : String;
550  end;
551
552
553  //Optional query Options for TUrlcrawlerrorssamplesResource, method MarkAsFixed
554
555  TUrlcrawlerrorssamplesMarkAsFixedOptions = Record
556    category : String;
557    platform : String;
558  end;
559
560  TUrlcrawlerrorssamplesResource = Class(TGoogleResource)
561  Public
562    Class Function ResourceName : String; override;
563    Class Function DefaultAPI : TGoogleAPIClass; override;
564    Function Get(siteUrl: string; url: string; AQuery : string  = '') : TUrlCrawlErrorsSample;
565    Function Get(siteUrl: string; url: string; AQuery : TUrlcrawlerrorssamplesgetOptions) : TUrlCrawlErrorsSample;
566    Function List(siteUrl: string; AQuery : string  = '') : TUrlCrawlErrorsSamplesListResponse;
567    Function List(siteUrl: string; AQuery : TUrlcrawlerrorssampleslistOptions) : TUrlCrawlErrorsSamplesListResponse;
568    Procedure MarkAsFixed(siteUrl: string; url: string; AQuery : string  = '');
569    Procedure MarkAsFixed(siteUrl: string; url: string; AQuery : TUrlcrawlerrorssamplesmarkAsFixedOptions);
570  end;
571
572
573  { --------------------------------------------------------------------
574    TWebmastersAPI
575    --------------------------------------------------------------------}
576
577  TWebmastersAPI = Class(TGoogleAPI)
578  Private
579    FSearchanalyticsInstance : TSearchanalyticsResource;
580    FSitemapsInstance : TSitemapsResource;
581    FSitesInstance : TSitesResource;
582    FUrlcrawlerrorscountsInstance : TUrlcrawlerrorscountsResource;
583    FUrlcrawlerrorssamplesInstance : TUrlcrawlerrorssamplesResource;
584    Function GetSearchanalyticsInstance : TSearchanalyticsResource;virtual;
585    Function GetSitemapsInstance : TSitemapsResource;virtual;
586    Function GetSitesInstance : TSitesResource;virtual;
587    Function GetUrlcrawlerrorscountsInstance : TUrlcrawlerrorscountsResource;virtual;
588    Function GetUrlcrawlerrorssamplesInstance : TUrlcrawlerrorssamplesResource;virtual;
589  Public
590    //Override class functions with API info
591    Class Function APIName : String; override;
592    Class Function APIVersion : String; override;
593    Class Function APIRevision : String; override;
594    Class Function APIID : String; override;
595    Class Function APITitle : String; override;
596    Class Function APIDescription : String; override;
597    Class Function APIOwnerDomain : String; override;
598    Class Function APIOwnerName : String; override;
599    Class Function APIIcon16 : String; override;
600    Class Function APIIcon32 : String; override;
601    Class Function APIdocumentationLink : String; override;
602    Class Function APIrootUrl : string; override;
603    Class Function APIbasePath : string;override;
604    Class Function APIbaseURL : String;override;
605    Class Function APIProtocol : string;override;
606    Class Function APIservicePath : string;override;
607    Class Function APIbatchPath : String;override;
608    Class Function APIAuthScopes : TScopeInfoArray;override;
609    Class Function APINeedsAuth : Boolean;override;
610    Class Procedure RegisterAPIResources; override;
611    //Add create function for resources
612    Function CreateSearchanalyticsResource(AOwner : TComponent) : TSearchanalyticsResource;virtual;overload;
613    Function CreateSearchanalyticsResource : TSearchanalyticsResource;virtual;overload;
614    Function CreateSitemapsResource(AOwner : TComponent) : TSitemapsResource;virtual;overload;
615    Function CreateSitemapsResource : TSitemapsResource;virtual;overload;
616    Function CreateSitesResource(AOwner : TComponent) : TSitesResource;virtual;overload;
617    Function CreateSitesResource : TSitesResource;virtual;overload;
618    Function CreateUrlcrawlerrorscountsResource(AOwner : TComponent) : TUrlcrawlerrorscountsResource;virtual;overload;
619    Function CreateUrlcrawlerrorscountsResource : TUrlcrawlerrorscountsResource;virtual;overload;
620    Function CreateUrlcrawlerrorssamplesResource(AOwner : TComponent) : TUrlcrawlerrorssamplesResource;virtual;overload;
621    Function CreateUrlcrawlerrorssamplesResource : TUrlcrawlerrorssamplesResource;virtual;overload;
622    //Add default on-demand instances for resources
623    Property SearchanalyticsResource : TSearchanalyticsResource Read GetSearchanalyticsInstance;
624    Property SitemapsResource : TSitemapsResource Read GetSitemapsInstance;
625    Property SitesResource : TSitesResource Read GetSitesInstance;
626    Property UrlcrawlerrorscountsResource : TUrlcrawlerrorscountsResource Read GetUrlcrawlerrorscountsInstance;
627    Property UrlcrawlerrorssamplesResource : TUrlcrawlerrorssamplesResource Read GetUrlcrawlerrorssamplesInstance;
628  end;
629
630implementation
631
632
633{ --------------------------------------------------------------------
634  TApiDataRow
635  --------------------------------------------------------------------}
636
637
638Procedure TApiDataRow.Setclicks(AIndex : Integer; const AValue : double);
639
640begin
641  If (Fclicks=AValue) then exit;
642  Fclicks:=AValue;
643  MarkPropertyChanged(AIndex);
644end;
645
646
647
648Procedure TApiDataRow.Setctr(AIndex : Integer; const AValue : double);
649
650begin
651  If (Fctr=AValue) then exit;
652  Fctr:=AValue;
653  MarkPropertyChanged(AIndex);
654end;
655
656
657
658Procedure TApiDataRow.Setimpressions(AIndex : Integer; const AValue : double);
659
660begin
661  If (Fimpressions=AValue) then exit;
662  Fimpressions:=AValue;
663  MarkPropertyChanged(AIndex);
664end;
665
666
667
668Procedure TApiDataRow.Setkeys(AIndex : Integer; const AValue : TStringArray);
669
670begin
671  If (Fkeys=AValue) then exit;
672  Fkeys:=AValue;
673  MarkPropertyChanged(AIndex);
674end;
675
676
677
678Procedure TApiDataRow.Setposition(AIndex : Integer; const AValue : double);
679
680begin
681  If (Fposition=AValue) then exit;
682  Fposition:=AValue;
683  MarkPropertyChanged(AIndex);
684end;
685
686
687//2.6.4. bug workaround
688{$IFDEF VER2_6}
689Procedure TApiDataRow.SetArrayLength(Const AName : String; ALength : Longint);
690
691begin
692  Case AName of
693  'keys' : SetLength(Fkeys,ALength);
694  else
695    Inherited SetArrayLength(AName,ALength);
696  end;
697end;
698{$ENDIF VER2_6}
699
700
701
702
703{ --------------------------------------------------------------------
704  TApiDimensionFilter
705  --------------------------------------------------------------------}
706
707
708Procedure TApiDimensionFilter.Setdimension(AIndex : Integer; const AValue : String);
709
710begin
711  If (Fdimension=AValue) then exit;
712  Fdimension:=AValue;
713  MarkPropertyChanged(AIndex);
714end;
715
716
717
718Procedure TApiDimensionFilter.Setexpression(AIndex : Integer; const AValue : String);
719
720begin
721  If (Fexpression=AValue) then exit;
722  Fexpression:=AValue;
723  MarkPropertyChanged(AIndex);
724end;
725
726
727
728Procedure TApiDimensionFilter.Set_operator(AIndex : Integer; const AValue : String);
729
730begin
731  If (F_operator=AValue) then exit;
732  F_operator:=AValue;
733  MarkPropertyChanged(AIndex);
734end;
735
736
737
738Class Function TApiDimensionFilter.ExportPropertyName(Const AName : String) :String;
739
740begin
741  Case AName of
742  '_operator' : Result:='operator';
743  else
744    Result:=Inherited ExportPropertyName(AName);
745  end;
746end;
747
748
749
750
751{ --------------------------------------------------------------------
752  TApiDimensionFilterGroup
753  --------------------------------------------------------------------}
754
755
756Procedure TApiDimensionFilterGroup.Setfilters(AIndex : Integer; const AValue : TApiDimensionFilterGroupTypefiltersArray);
757
758begin
759  If (Ffilters=AValue) then exit;
760  Ffilters:=AValue;
761  MarkPropertyChanged(AIndex);
762end;
763
764
765
766Procedure TApiDimensionFilterGroup.SetgroupType(AIndex : Integer; const AValue : String);
767
768begin
769  If (FgroupType=AValue) then exit;
770  FgroupType:=AValue;
771  MarkPropertyChanged(AIndex);
772end;
773
774
775//2.6.4. bug workaround
776{$IFDEF VER2_6}
777Procedure TApiDimensionFilterGroup.SetArrayLength(Const AName : String; ALength : Longint);
778
779begin
780  Case AName of
781  'filters' : SetLength(Ffilters,ALength);
782  else
783    Inherited SetArrayLength(AName,ALength);
784  end;
785end;
786{$ENDIF VER2_6}
787
788
789
790
791{ --------------------------------------------------------------------
792  TSearchAnalyticsQueryRequest
793  --------------------------------------------------------------------}
794
795
796Procedure TSearchAnalyticsQueryRequest.SetaggregationType(AIndex : Integer; const AValue : String);
797
798begin
799  If (FaggregationType=AValue) then exit;
800  FaggregationType:=AValue;
801  MarkPropertyChanged(AIndex);
802end;
803
804
805
806Procedure TSearchAnalyticsQueryRequest.SetdimensionFilterGroups(AIndex : Integer; const AValue : TSearchAnalyticsQueryRequestTypedimensionFilterGroupsArray);
807
808begin
809  If (FdimensionFilterGroups=AValue) then exit;
810  FdimensionFilterGroups:=AValue;
811  MarkPropertyChanged(AIndex);
812end;
813
814
815
816Procedure TSearchAnalyticsQueryRequest.Setdimensions(AIndex : Integer; const AValue : TStringArray);
817
818begin
819  If (Fdimensions=AValue) then exit;
820  Fdimensions:=AValue;
821  MarkPropertyChanged(AIndex);
822end;
823
824
825
826Procedure TSearchAnalyticsQueryRequest.SetendDate(AIndex : Integer; const AValue : String);
827
828begin
829  If (FendDate=AValue) then exit;
830  FendDate:=AValue;
831  MarkPropertyChanged(AIndex);
832end;
833
834
835
836Procedure TSearchAnalyticsQueryRequest.SetrowLimit(AIndex : Integer; const AValue : integer);
837
838begin
839  If (FrowLimit=AValue) then exit;
840  FrowLimit:=AValue;
841  MarkPropertyChanged(AIndex);
842end;
843
844
845
846Procedure TSearchAnalyticsQueryRequest.SetsearchType(AIndex : Integer; const AValue : String);
847
848begin
849  If (FsearchType=AValue) then exit;
850  FsearchType:=AValue;
851  MarkPropertyChanged(AIndex);
852end;
853
854
855
856Procedure TSearchAnalyticsQueryRequest.SetstartDate(AIndex : Integer; const AValue : String);
857
858begin
859  If (FstartDate=AValue) then exit;
860  FstartDate:=AValue;
861  MarkPropertyChanged(AIndex);
862end;
863
864
865
866Procedure TSearchAnalyticsQueryRequest.SetstartRow(AIndex : Integer; const AValue : integer);
867
868begin
869  If (FstartRow=AValue) then exit;
870  FstartRow:=AValue;
871  MarkPropertyChanged(AIndex);
872end;
873
874
875//2.6.4. bug workaround
876{$IFDEF VER2_6}
877Procedure TSearchAnalyticsQueryRequest.SetArrayLength(Const AName : String; ALength : Longint);
878
879begin
880  Case AName of
881  'dimensionfiltergroups' : SetLength(FdimensionFilterGroups,ALength);
882  'dimensions' : SetLength(Fdimensions,ALength);
883  else
884    Inherited SetArrayLength(AName,ALength);
885  end;
886end;
887{$ENDIF VER2_6}
888
889
890
891
892{ --------------------------------------------------------------------
893  TSearchAnalyticsQueryResponse
894  --------------------------------------------------------------------}
895
896
897Procedure TSearchAnalyticsQueryResponse.SetresponseAggregationType(AIndex : Integer; const AValue : String);
898
899begin
900  If (FresponseAggregationType=AValue) then exit;
901  FresponseAggregationType:=AValue;
902  MarkPropertyChanged(AIndex);
903end;
904
905
906
907Procedure TSearchAnalyticsQueryResponse.Setrows(AIndex : Integer; const AValue : TSearchAnalyticsQueryResponseTyperowsArray);
908
909begin
910  If (Frows=AValue) then exit;
911  Frows:=AValue;
912  MarkPropertyChanged(AIndex);
913end;
914
915
916//2.6.4. bug workaround
917{$IFDEF VER2_6}
918Procedure TSearchAnalyticsQueryResponse.SetArrayLength(Const AName : String; ALength : Longint);
919
920begin
921  Case AName of
922  'rows' : SetLength(Frows,ALength);
923  else
924    Inherited SetArrayLength(AName,ALength);
925  end;
926end;
927{$ENDIF VER2_6}
928
929
930
931
932{ --------------------------------------------------------------------
933  TSitemapsListResponse
934  --------------------------------------------------------------------}
935
936
937Procedure TSitemapsListResponse.Setsitemap(AIndex : Integer; const AValue : TSitemapsListResponseTypesitemapArray);
938
939begin
940  If (Fsitemap=AValue) then exit;
941  Fsitemap:=AValue;
942  MarkPropertyChanged(AIndex);
943end;
944
945
946//2.6.4. bug workaround
947{$IFDEF VER2_6}
948Procedure TSitemapsListResponse.SetArrayLength(Const AName : String; ALength : Longint);
949
950begin
951  Case AName of
952  'sitemap' : SetLength(Fsitemap,ALength);
953  else
954    Inherited SetArrayLength(AName,ALength);
955  end;
956end;
957{$ENDIF VER2_6}
958
959
960
961
962{ --------------------------------------------------------------------
963  TSitesListResponse
964  --------------------------------------------------------------------}
965
966
967Procedure TSitesListResponse.SetsiteEntry(AIndex : Integer; const AValue : TSitesListResponseTypesiteEntryArray);
968
969begin
970  If (FsiteEntry=AValue) then exit;
971  FsiteEntry:=AValue;
972  MarkPropertyChanged(AIndex);
973end;
974
975
976//2.6.4. bug workaround
977{$IFDEF VER2_6}
978Procedure TSitesListResponse.SetArrayLength(Const AName : String; ALength : Longint);
979
980begin
981  Case AName of
982  'siteentry' : SetLength(FsiteEntry,ALength);
983  else
984    Inherited SetArrayLength(AName,ALength);
985  end;
986end;
987{$ENDIF VER2_6}
988
989
990
991
992{ --------------------------------------------------------------------
993  TUrlCrawlErrorCount
994  --------------------------------------------------------------------}
995
996
997Procedure TUrlCrawlErrorCount.Setcount(AIndex : Integer; const AValue : String);
998
999begin
1000  If (Fcount=AValue) then exit;
1001  Fcount:=AValue;
1002  MarkPropertyChanged(AIndex);
1003end;
1004
1005
1006
1007Procedure TUrlCrawlErrorCount.Settimestamp(AIndex : Integer; const AValue : TDatetime);
1008
1009begin
1010  If (Ftimestamp=AValue) then exit;
1011  Ftimestamp:=AValue;
1012  MarkPropertyChanged(AIndex);
1013end;
1014
1015
1016
1017
1018
1019{ --------------------------------------------------------------------
1020  TUrlCrawlErrorCountsPerType
1021  --------------------------------------------------------------------}
1022
1023
1024Procedure TUrlCrawlErrorCountsPerType.Setcategory(AIndex : Integer; const AValue : String);
1025
1026begin
1027  If (Fcategory=AValue) then exit;
1028  Fcategory:=AValue;
1029  MarkPropertyChanged(AIndex);
1030end;
1031
1032
1033
1034Procedure TUrlCrawlErrorCountsPerType.Setentries(AIndex : Integer; const AValue : TUrlCrawlErrorCountsPerTypeTypeentriesArray);
1035
1036begin
1037  If (Fentries=AValue) then exit;
1038  Fentries:=AValue;
1039  MarkPropertyChanged(AIndex);
1040end;
1041
1042
1043
1044Procedure TUrlCrawlErrorCountsPerType.Setplatform(AIndex : Integer; const AValue : String);
1045
1046begin
1047  If (Fplatform=AValue) then exit;
1048  Fplatform:=AValue;
1049  MarkPropertyChanged(AIndex);
1050end;
1051
1052
1053//2.6.4. bug workaround
1054{$IFDEF VER2_6}
1055Procedure TUrlCrawlErrorCountsPerType.SetArrayLength(Const AName : String; ALength : Longint);
1056
1057begin
1058  Case AName of
1059  'entries' : SetLength(Fentries,ALength);
1060  else
1061    Inherited SetArrayLength(AName,ALength);
1062  end;
1063end;
1064{$ENDIF VER2_6}
1065
1066
1067
1068
1069{ --------------------------------------------------------------------
1070  TUrlCrawlErrorsCountsQueryResponse
1071  --------------------------------------------------------------------}
1072
1073
1074Procedure TUrlCrawlErrorsCountsQueryResponse.SetcountPerTypes(AIndex : Integer; const AValue : TUrlCrawlErrorsCountsQueryResponseTypecountPerTypesArray);
1075
1076begin
1077  If (FcountPerTypes=AValue) then exit;
1078  FcountPerTypes:=AValue;
1079  MarkPropertyChanged(AIndex);
1080end;
1081
1082
1083//2.6.4. bug workaround
1084{$IFDEF VER2_6}
1085Procedure TUrlCrawlErrorsCountsQueryResponse.SetArrayLength(Const AName : String; ALength : Longint);
1086
1087begin
1088  Case AName of
1089  'countpertypes' : SetLength(FcountPerTypes,ALength);
1090  else
1091    Inherited SetArrayLength(AName,ALength);
1092  end;
1093end;
1094{$ENDIF VER2_6}
1095
1096
1097
1098
1099{ --------------------------------------------------------------------
1100  TUrlCrawlErrorsSample
1101  --------------------------------------------------------------------}
1102
1103
1104Procedure TUrlCrawlErrorsSample.Setfirst_detected(AIndex : Integer; const AValue : TDatetime);
1105
1106begin
1107  If (Ffirst_detected=AValue) then exit;
1108  Ffirst_detected:=AValue;
1109  MarkPropertyChanged(AIndex);
1110end;
1111
1112
1113
1114Procedure TUrlCrawlErrorsSample.Setlast_crawled(AIndex : Integer; const AValue : TDatetime);
1115
1116begin
1117  If (Flast_crawled=AValue) then exit;
1118  Flast_crawled:=AValue;
1119  MarkPropertyChanged(AIndex);
1120end;
1121
1122
1123
1124Procedure TUrlCrawlErrorsSample.SetpageUrl(AIndex : Integer; const AValue : String);
1125
1126begin
1127  If (FpageUrl=AValue) then exit;
1128  FpageUrl:=AValue;
1129  MarkPropertyChanged(AIndex);
1130end;
1131
1132
1133
1134Procedure TUrlCrawlErrorsSample.SetresponseCode(AIndex : Integer; const AValue : integer);
1135
1136begin
1137  If (FresponseCode=AValue) then exit;
1138  FresponseCode:=AValue;
1139  MarkPropertyChanged(AIndex);
1140end;
1141
1142
1143
1144Procedure TUrlCrawlErrorsSample.SeturlDetails(AIndex : Integer; const AValue : TUrlSampleDetails);
1145
1146begin
1147  If (FurlDetails=AValue) then exit;
1148  FurlDetails:=AValue;
1149  MarkPropertyChanged(AIndex);
1150end;
1151
1152
1153
1154
1155
1156{ --------------------------------------------------------------------
1157  TUrlCrawlErrorsSamplesListResponse
1158  --------------------------------------------------------------------}
1159
1160
1161Procedure TUrlCrawlErrorsSamplesListResponse.SeturlCrawlErrorSample(AIndex : Integer; const AValue : TUrlCrawlErrorsSamplesListResponseTypeurlCrawlErrorSampleArray);
1162
1163begin
1164  If (FurlCrawlErrorSample=AValue) then exit;
1165  FurlCrawlErrorSample:=AValue;
1166  MarkPropertyChanged(AIndex);
1167end;
1168
1169
1170//2.6.4. bug workaround
1171{$IFDEF VER2_6}
1172Procedure TUrlCrawlErrorsSamplesListResponse.SetArrayLength(Const AName : String; ALength : Longint);
1173
1174begin
1175  Case AName of
1176  'urlcrawlerrorsample' : SetLength(FurlCrawlErrorSample,ALength);
1177  else
1178    Inherited SetArrayLength(AName,ALength);
1179  end;
1180end;
1181{$ENDIF VER2_6}
1182
1183
1184
1185
1186{ --------------------------------------------------------------------
1187  TUrlSampleDetails
1188  --------------------------------------------------------------------}
1189
1190
1191Procedure TUrlSampleDetails.SetcontainingSitemaps(AIndex : Integer; const AValue : TStringArray);
1192
1193begin
1194  If (FcontainingSitemaps=AValue) then exit;
1195  FcontainingSitemaps:=AValue;
1196  MarkPropertyChanged(AIndex);
1197end;
1198
1199
1200
1201Procedure TUrlSampleDetails.SetlinkedFromUrls(AIndex : Integer; const AValue : TStringArray);
1202
1203begin
1204  If (FlinkedFromUrls=AValue) then exit;
1205  FlinkedFromUrls:=AValue;
1206  MarkPropertyChanged(AIndex);
1207end;
1208
1209
1210//2.6.4. bug workaround
1211{$IFDEF VER2_6}
1212Procedure TUrlSampleDetails.SetArrayLength(Const AName : String; ALength : Longint);
1213
1214begin
1215  Case AName of
1216  'containingsitemaps' : SetLength(FcontainingSitemaps,ALength);
1217  'linkedfromurls' : SetLength(FlinkedFromUrls,ALength);
1218  else
1219    Inherited SetArrayLength(AName,ALength);
1220  end;
1221end;
1222{$ENDIF VER2_6}
1223
1224
1225
1226
1227{ --------------------------------------------------------------------
1228  TWmxSite
1229  --------------------------------------------------------------------}
1230
1231
1232Procedure TWmxSite.SetpermissionLevel(AIndex : Integer; const AValue : String);
1233
1234begin
1235  If (FpermissionLevel=AValue) then exit;
1236  FpermissionLevel:=AValue;
1237  MarkPropertyChanged(AIndex);
1238end;
1239
1240
1241
1242Procedure TWmxSite.SetsiteUrl(AIndex : Integer; const AValue : String);
1243
1244begin
1245  If (FsiteUrl=AValue) then exit;
1246  FsiteUrl:=AValue;
1247  MarkPropertyChanged(AIndex);
1248end;
1249
1250
1251
1252
1253
1254{ --------------------------------------------------------------------
1255  TWmxSitemap
1256  --------------------------------------------------------------------}
1257
1258
1259Procedure TWmxSitemap.Setcontents(AIndex : Integer; const AValue : TWmxSitemapTypecontentsArray);
1260
1261begin
1262  If (Fcontents=AValue) then exit;
1263  Fcontents:=AValue;
1264  MarkPropertyChanged(AIndex);
1265end;
1266
1267
1268
1269Procedure TWmxSitemap.Seterrors(AIndex : Integer; const AValue : String);
1270
1271begin
1272  If (Ferrors=AValue) then exit;
1273  Ferrors:=AValue;
1274  MarkPropertyChanged(AIndex);
1275end;
1276
1277
1278
1279Procedure TWmxSitemap.SetisPending(AIndex : Integer; const AValue : boolean);
1280
1281begin
1282  If (FisPending=AValue) then exit;
1283  FisPending:=AValue;
1284  MarkPropertyChanged(AIndex);
1285end;
1286
1287
1288
1289Procedure TWmxSitemap.SetisSitemapsIndex(AIndex : Integer; const AValue : boolean);
1290
1291begin
1292  If (FisSitemapsIndex=AValue) then exit;
1293  FisSitemapsIndex:=AValue;
1294  MarkPropertyChanged(AIndex);
1295end;
1296
1297
1298
1299Procedure TWmxSitemap.SetlastDownloaded(AIndex : Integer; const AValue : TDatetime);
1300
1301begin
1302  If (FlastDownloaded=AValue) then exit;
1303  FlastDownloaded:=AValue;
1304  MarkPropertyChanged(AIndex);
1305end;
1306
1307
1308
1309Procedure TWmxSitemap.SetlastSubmitted(AIndex : Integer; const AValue : TDatetime);
1310
1311begin
1312  If (FlastSubmitted=AValue) then exit;
1313  FlastSubmitted:=AValue;
1314  MarkPropertyChanged(AIndex);
1315end;
1316
1317
1318
1319Procedure TWmxSitemap.Setpath(AIndex : Integer; const AValue : String);
1320
1321begin
1322  If (Fpath=AValue) then exit;
1323  Fpath:=AValue;
1324  MarkPropertyChanged(AIndex);
1325end;
1326
1327
1328
1329Procedure TWmxSitemap.Set_type(AIndex : Integer; const AValue : String);
1330
1331begin
1332  If (F_type=AValue) then exit;
1333  F_type:=AValue;
1334  MarkPropertyChanged(AIndex);
1335end;
1336
1337
1338
1339Procedure TWmxSitemap.Setwarnings(AIndex : Integer; const AValue : String);
1340
1341begin
1342  If (Fwarnings=AValue) then exit;
1343  Fwarnings:=AValue;
1344  MarkPropertyChanged(AIndex);
1345end;
1346
1347
1348
1349Class Function TWmxSitemap.ExportPropertyName(Const AName : String) :String;
1350
1351begin
1352  Case AName of
1353  '_type' : Result:='type';
1354  else
1355    Result:=Inherited ExportPropertyName(AName);
1356  end;
1357end;
1358
1359//2.6.4. bug workaround
1360{$IFDEF VER2_6}
1361Procedure TWmxSitemap.SetArrayLength(Const AName : String; ALength : Longint);
1362
1363begin
1364  Case AName of
1365  'contents' : SetLength(Fcontents,ALength);
1366  else
1367    Inherited SetArrayLength(AName,ALength);
1368  end;
1369end;
1370{$ENDIF VER2_6}
1371
1372
1373
1374
1375{ --------------------------------------------------------------------
1376  TWmxSitemapContent
1377  --------------------------------------------------------------------}
1378
1379
1380Procedure TWmxSitemapContent.Setindexed(AIndex : Integer; const AValue : String);
1381
1382begin
1383  If (Findexed=AValue) then exit;
1384  Findexed:=AValue;
1385  MarkPropertyChanged(AIndex);
1386end;
1387
1388
1389
1390Procedure TWmxSitemapContent.Setsubmitted(AIndex : Integer; const AValue : String);
1391
1392begin
1393  If (Fsubmitted=AValue) then exit;
1394  Fsubmitted:=AValue;
1395  MarkPropertyChanged(AIndex);
1396end;
1397
1398
1399
1400Procedure TWmxSitemapContent.Set_type(AIndex : Integer; const AValue : String);
1401
1402begin
1403  If (F_type=AValue) then exit;
1404  F_type:=AValue;
1405  MarkPropertyChanged(AIndex);
1406end;
1407
1408
1409
1410Class Function TWmxSitemapContent.ExportPropertyName(Const AName : String) :String;
1411
1412begin
1413  Case AName of
1414  '_type' : Result:='type';
1415  else
1416    Result:=Inherited ExportPropertyName(AName);
1417  end;
1418end;
1419
1420
1421
1422
1423{ --------------------------------------------------------------------
1424  TSearchanalyticsResource
1425  --------------------------------------------------------------------}
1426
1427
1428Class Function TSearchanalyticsResource.ResourceName : String;
1429
1430begin
1431  Result:='searchanalytics';
1432end;
1433
1434Class Function TSearchanalyticsResource.DefaultAPI : TGoogleAPIClass;
1435
1436begin
1437  Result:=TwebmastersAPI;
1438end;
1439
1440Function TSearchanalyticsResource.Query(siteUrl: string; aSearchAnalyticsQueryRequest : TSearchAnalyticsQueryRequest) : TSearchAnalyticsQueryResponse;
1441
1442Const
1443  _HTTPMethod = 'POST';
1444  _Path       = 'sites/{siteUrl}/searchAnalytics/query';
1445  _Methodid   = 'webmasters.searchanalytics.query';
1446
1447Var
1448  _P : String;
1449
1450begin
1451  _P:=SubstitutePath(_Path,['siteUrl',siteUrl]);
1452  Result:=ServiceCall(_HTTPMethod,_P,'',aSearchAnalyticsQueryRequest,TSearchAnalyticsQueryResponse) as TSearchAnalyticsQueryResponse;
1453end;
1454
1455
1456
1457{ --------------------------------------------------------------------
1458  TSitemapsResource
1459  --------------------------------------------------------------------}
1460
1461
1462Class Function TSitemapsResource.ResourceName : String;
1463
1464begin
1465  Result:='sitemaps';
1466end;
1467
1468Class Function TSitemapsResource.DefaultAPI : TGoogleAPIClass;
1469
1470begin
1471  Result:=TwebmastersAPI;
1472end;
1473
1474Procedure TSitemapsResource.Delete(feedpath: string; siteUrl: string);
1475
1476Const
1477  _HTTPMethod = 'DELETE';
1478  _Path       = 'sites/{siteUrl}/sitemaps/{feedpath}';
1479  _Methodid   = 'webmasters.sitemaps.delete';
1480
1481Var
1482  _P : String;
1483
1484begin
1485  _P:=SubstitutePath(_Path,['feedpath',feedpath,'siteUrl',siteUrl]);
1486  ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
1487end;
1488
1489Function TSitemapsResource.Get(feedpath: string; siteUrl: string) : TWmxSitemap;
1490
1491Const
1492  _HTTPMethod = 'GET';
1493  _Path       = 'sites/{siteUrl}/sitemaps/{feedpath}';
1494  _Methodid   = 'webmasters.sitemaps.get';
1495
1496Var
1497  _P : String;
1498
1499begin
1500  _P:=SubstitutePath(_Path,['feedpath',feedpath,'siteUrl',siteUrl]);
1501  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TWmxSitemap) as TWmxSitemap;
1502end;
1503
1504Function TSitemapsResource.List(siteUrl: string; AQuery : string = '') : TSitemapsListResponse;
1505
1506Const
1507  _HTTPMethod = 'GET';
1508  _Path       = 'sites/{siteUrl}/sitemaps';
1509  _Methodid   = 'webmasters.sitemaps.list';
1510
1511Var
1512  _P : String;
1513
1514begin
1515  _P:=SubstitutePath(_Path,['siteUrl',siteUrl]);
1516  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TSitemapsListResponse) as TSitemapsListResponse;
1517end;
1518
1519
1520Function TSitemapsResource.List(siteUrl: string; AQuery : TSitemapslistOptions) : TSitemapsListResponse;
1521
1522Var
1523  _Q : String;
1524
1525begin
1526  _Q:='';
1527  AddToQuery(_Q,'sitemapIndex',AQuery.sitemapIndex);
1528  Result:=List(siteUrl,_Q);
1529end;
1530
1531Procedure TSitemapsResource.Submit(feedpath: string; siteUrl: string);
1532
1533Const
1534  _HTTPMethod = 'PUT';
1535  _Path       = 'sites/{siteUrl}/sitemaps/{feedpath}';
1536  _Methodid   = 'webmasters.sitemaps.submit';
1537
1538Var
1539  _P : String;
1540
1541begin
1542  _P:=SubstitutePath(_Path,['feedpath',feedpath,'siteUrl',siteUrl]);
1543  ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
1544end;
1545
1546
1547
1548{ --------------------------------------------------------------------
1549  TSitesResource
1550  --------------------------------------------------------------------}
1551
1552
1553Class Function TSitesResource.ResourceName : String;
1554
1555begin
1556  Result:='sites';
1557end;
1558
1559Class Function TSitesResource.DefaultAPI : TGoogleAPIClass;
1560
1561begin
1562  Result:=TwebmastersAPI;
1563end;
1564
1565Procedure TSitesResource.Add(siteUrl: string);
1566
1567Const
1568  _HTTPMethod = 'PUT';
1569  _Path       = 'sites/{siteUrl}';
1570  _Methodid   = 'webmasters.sites.add';
1571
1572Var
1573  _P : String;
1574
1575begin
1576  _P:=SubstitutePath(_Path,['siteUrl',siteUrl]);
1577  ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
1578end;
1579
1580Procedure TSitesResource.Delete(siteUrl: string);
1581
1582Const
1583  _HTTPMethod = 'DELETE';
1584  _Path       = 'sites/{siteUrl}';
1585  _Methodid   = 'webmasters.sites.delete';
1586
1587Var
1588  _P : String;
1589
1590begin
1591  _P:=SubstitutePath(_Path,['siteUrl',siteUrl]);
1592  ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
1593end;
1594
1595Function TSitesResource.Get(siteUrl: string) : TWmxSite;
1596
1597Const
1598  _HTTPMethod = 'GET';
1599  _Path       = 'sites/{siteUrl}';
1600  _Methodid   = 'webmasters.sites.get';
1601
1602Var
1603  _P : String;
1604
1605begin
1606  _P:=SubstitutePath(_Path,['siteUrl',siteUrl]);
1607  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TWmxSite) as TWmxSite;
1608end;
1609
1610Function TSitesResource.List : TSitesListResponse;
1611
1612Const
1613  _HTTPMethod = 'GET';
1614  _Path       = 'sites';
1615  _Methodid   = 'webmasters.sites.list';
1616
1617begin
1618  Result:=ServiceCall(_HTTPMethod,_Path,'',Nil,TSitesListResponse) as TSitesListResponse;
1619end;
1620
1621
1622
1623{ --------------------------------------------------------------------
1624  TUrlcrawlerrorscountsResource
1625  --------------------------------------------------------------------}
1626
1627
1628Class Function TUrlcrawlerrorscountsResource.ResourceName : String;
1629
1630begin
1631  Result:='urlcrawlerrorscounts';
1632end;
1633
1634Class Function TUrlcrawlerrorscountsResource.DefaultAPI : TGoogleAPIClass;
1635
1636begin
1637  Result:=TwebmastersAPI;
1638end;
1639
1640Function TUrlcrawlerrorscountsResource.Query(siteUrl: string; AQuery : string = '') : TUrlCrawlErrorsCountsQueryResponse;
1641
1642Const
1643  _HTTPMethod = 'GET';
1644  _Path       = 'sites/{siteUrl}/urlCrawlErrorsCounts/query';
1645  _Methodid   = 'webmasters.urlcrawlerrorscounts.query';
1646
1647Var
1648  _P : String;
1649
1650begin
1651  _P:=SubstitutePath(_Path,['siteUrl',siteUrl]);
1652  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TUrlCrawlErrorsCountsQueryResponse) as TUrlCrawlErrorsCountsQueryResponse;
1653end;
1654
1655
1656Function TUrlcrawlerrorscountsResource.Query(siteUrl: string; AQuery : TUrlcrawlerrorscountsqueryOptions) : TUrlCrawlErrorsCountsQueryResponse;
1657
1658Var
1659  _Q : String;
1660
1661begin
1662  _Q:='';
1663  AddToQuery(_Q,'category',AQuery.category);
1664  AddToQuery(_Q,'latestCountsOnly',AQuery.latestCountsOnly);
1665  AddToQuery(_Q,'platform',AQuery.platform);
1666  Result:=Query(siteUrl,_Q);
1667end;
1668
1669
1670
1671{ --------------------------------------------------------------------
1672  TUrlcrawlerrorssamplesResource
1673  --------------------------------------------------------------------}
1674
1675
1676Class Function TUrlcrawlerrorssamplesResource.ResourceName : String;
1677
1678begin
1679  Result:='urlcrawlerrorssamples';
1680end;
1681
1682Class Function TUrlcrawlerrorssamplesResource.DefaultAPI : TGoogleAPIClass;
1683
1684begin
1685  Result:=TwebmastersAPI;
1686end;
1687
1688Function TUrlcrawlerrorssamplesResource.Get(siteUrl: string; url: string; AQuery : string = '') : TUrlCrawlErrorsSample;
1689
1690Const
1691  _HTTPMethod = 'GET';
1692  _Path       = 'sites/{siteUrl}/urlCrawlErrorsSamples/{url}';
1693  _Methodid   = 'webmasters.urlcrawlerrorssamples.get';
1694
1695Var
1696  _P : String;
1697
1698begin
1699  _P:=SubstitutePath(_Path,['siteUrl',siteUrl,'url',url]);
1700  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TUrlCrawlErrorsSample) as TUrlCrawlErrorsSample;
1701end;
1702
1703
1704Function TUrlcrawlerrorssamplesResource.Get(siteUrl: string; url: string; AQuery : TUrlcrawlerrorssamplesgetOptions) : TUrlCrawlErrorsSample;
1705
1706Var
1707  _Q : String;
1708
1709begin
1710  _Q:='';
1711  AddToQuery(_Q,'category',AQuery.category);
1712  AddToQuery(_Q,'platform',AQuery.platform);
1713  Result:=Get(siteUrl,url,_Q);
1714end;
1715
1716Function TUrlcrawlerrorssamplesResource.List(siteUrl: string; AQuery : string = '') : TUrlCrawlErrorsSamplesListResponse;
1717
1718Const
1719  _HTTPMethod = 'GET';
1720  _Path       = 'sites/{siteUrl}/urlCrawlErrorsSamples';
1721  _Methodid   = 'webmasters.urlcrawlerrorssamples.list';
1722
1723Var
1724  _P : String;
1725
1726begin
1727  _P:=SubstitutePath(_Path,['siteUrl',siteUrl]);
1728  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TUrlCrawlErrorsSamplesListResponse) as TUrlCrawlErrorsSamplesListResponse;
1729end;
1730
1731
1732Function TUrlcrawlerrorssamplesResource.List(siteUrl: string; AQuery : TUrlcrawlerrorssampleslistOptions) : TUrlCrawlErrorsSamplesListResponse;
1733
1734Var
1735  _Q : String;
1736
1737begin
1738  _Q:='';
1739  AddToQuery(_Q,'category',AQuery.category);
1740  AddToQuery(_Q,'platform',AQuery.platform);
1741  Result:=List(siteUrl,_Q);
1742end;
1743
1744Procedure TUrlcrawlerrorssamplesResource.MarkAsFixed(siteUrl: string; url: string; AQuery : string = '');
1745
1746Const
1747  _HTTPMethod = 'DELETE';
1748  _Path       = 'sites/{siteUrl}/urlCrawlErrorsSamples/{url}';
1749  _Methodid   = 'webmasters.urlcrawlerrorssamples.markAsFixed';
1750
1751Var
1752  _P : String;
1753
1754begin
1755  _P:=SubstitutePath(_Path,['siteUrl',siteUrl,'url',url]);
1756  ServiceCall(_HTTPMethod,_P,AQuery,Nil,Nil);
1757end;
1758
1759
1760Procedure TUrlcrawlerrorssamplesResource.MarkAsFixed(siteUrl: string; url: string; AQuery : TUrlcrawlerrorssamplesmarkAsFixedOptions);
1761
1762Var
1763  _Q : String;
1764
1765begin
1766  _Q:='';
1767  AddToQuery(_Q,'category',AQuery.category);
1768  AddToQuery(_Q,'platform',AQuery.platform);
1769  MarkAsFixed(siteUrl,url,_Q);
1770end;
1771
1772
1773
1774{ --------------------------------------------------------------------
1775  TWebmastersAPI
1776  --------------------------------------------------------------------}
1777
1778Class Function TWebmastersAPI.APIName : String;
1779
1780begin
1781  Result:='webmasters';
1782end;
1783
1784Class Function TWebmastersAPI.APIVersion : String;
1785
1786begin
1787  Result:='v3';
1788end;
1789
1790Class Function TWebmastersAPI.APIRevision : String;
1791
1792begin
1793  Result:='20160317';
1794end;
1795
1796Class Function TWebmastersAPI.APIID : String;
1797
1798begin
1799  Result:='webmasters:v3';
1800end;
1801
1802Class Function TWebmastersAPI.APITitle : String;
1803
1804begin
1805  Result:='Search Console API';
1806end;
1807
1808Class Function TWebmastersAPI.APIDescription : String;
1809
1810begin
1811  Result:='View Google Search Console data for your verified sites.';
1812end;
1813
1814Class Function TWebmastersAPI.APIOwnerDomain : String;
1815
1816begin
1817  Result:='google.com';
1818end;
1819
1820Class Function TWebmastersAPI.APIOwnerName : String;
1821
1822begin
1823  Result:='Google';
1824end;
1825
1826Class Function TWebmastersAPI.APIIcon16 : String;
1827
1828begin
1829  Result:='https://www.google.com/images/icons/product/webmaster_tools-16.png';
1830end;
1831
1832Class Function TWebmastersAPI.APIIcon32 : String;
1833
1834begin
1835  Result:='https://www.google.com/images/icons/product/webmaster_tools-32.png';
1836end;
1837
1838Class Function TWebmastersAPI.APIdocumentationLink : String;
1839
1840begin
1841  Result:='https://developers.google.com/webmaster-tools/';
1842end;
1843
1844Class Function TWebmastersAPI.APIrootUrl : string;
1845
1846begin
1847  Result:='https://www.googleapis.com/';
1848end;
1849
1850Class Function TWebmastersAPI.APIbasePath : string;
1851
1852begin
1853  Result:='/webmasters/v3/';
1854end;
1855
1856Class Function TWebmastersAPI.APIbaseURL : String;
1857
1858begin
1859  Result:='https://www.googleapis.com/webmasters/v3/';
1860end;
1861
1862Class Function TWebmastersAPI.APIProtocol : string;
1863
1864begin
1865  Result:='rest';
1866end;
1867
1868Class Function TWebmastersAPI.APIservicePath : string;
1869
1870begin
1871  Result:='webmasters/v3/';
1872end;
1873
1874Class Function TWebmastersAPI.APIbatchPath : String;
1875
1876begin
1877  Result:='batch';
1878end;
1879
1880Class Function TWebmastersAPI.APIAuthScopes : TScopeInfoArray;
1881
1882begin
1883  SetLength(Result,2);
1884  Result[0].Name:='https://www.googleapis.com/auth/webmasters';
1885  Result[0].Description:='View and manage Search Console data for your verified sites';
1886  Result[1].Name:='https://www.googleapis.com/auth/webmasters.readonly';
1887  Result[1].Description:='View Search Console data for your verified sites';
1888
1889end;
1890
1891Class Function TWebmastersAPI.APINeedsAuth : Boolean;
1892
1893begin
1894  Result:=True;
1895end;
1896
1897Class Procedure TWebmastersAPI.RegisterAPIResources;
1898
1899begin
1900  TApiDataRow.RegisterObject;
1901  TApiDimensionFilter.RegisterObject;
1902  TApiDimensionFilterGroup.RegisterObject;
1903  TSearchAnalyticsQueryRequest.RegisterObject;
1904  TSearchAnalyticsQueryResponse.RegisterObject;
1905  TSitemapsListResponse.RegisterObject;
1906  TSitesListResponse.RegisterObject;
1907  TUrlCrawlErrorCount.RegisterObject;
1908  TUrlCrawlErrorCountsPerType.RegisterObject;
1909  TUrlCrawlErrorsCountsQueryResponse.RegisterObject;
1910  TUrlCrawlErrorsSample.RegisterObject;
1911  TUrlCrawlErrorsSamplesListResponse.RegisterObject;
1912  TUrlSampleDetails.RegisterObject;
1913  TWmxSite.RegisterObject;
1914  TWmxSitemap.RegisterObject;
1915  TWmxSitemapContent.RegisterObject;
1916end;
1917
1918
1919Function TWebmastersAPI.GetSearchanalyticsInstance : TSearchanalyticsResource;
1920
1921begin
1922  if (FSearchanalyticsInstance=Nil) then
1923    FSearchanalyticsInstance:=CreateSearchanalyticsResource;
1924  Result:=FSearchanalyticsInstance;
1925end;
1926
1927Function TWebmastersAPI.CreateSearchanalyticsResource : TSearchanalyticsResource;
1928
1929begin
1930  Result:=CreateSearchanalyticsResource(Self);
1931end;
1932
1933
1934Function TWebmastersAPI.CreateSearchanalyticsResource(AOwner : TComponent) : TSearchanalyticsResource;
1935
1936begin
1937  Result:=TSearchanalyticsResource.Create(AOwner);
1938  Result.API:=Self.API;
1939end;
1940
1941
1942
1943Function TWebmastersAPI.GetSitemapsInstance : TSitemapsResource;
1944
1945begin
1946  if (FSitemapsInstance=Nil) then
1947    FSitemapsInstance:=CreateSitemapsResource;
1948  Result:=FSitemapsInstance;
1949end;
1950
1951Function TWebmastersAPI.CreateSitemapsResource : TSitemapsResource;
1952
1953begin
1954  Result:=CreateSitemapsResource(Self);
1955end;
1956
1957
1958Function TWebmastersAPI.CreateSitemapsResource(AOwner : TComponent) : TSitemapsResource;
1959
1960begin
1961  Result:=TSitemapsResource.Create(AOwner);
1962  Result.API:=Self.API;
1963end;
1964
1965
1966
1967Function TWebmastersAPI.GetSitesInstance : TSitesResource;
1968
1969begin
1970  if (FSitesInstance=Nil) then
1971    FSitesInstance:=CreateSitesResource;
1972  Result:=FSitesInstance;
1973end;
1974
1975Function TWebmastersAPI.CreateSitesResource : TSitesResource;
1976
1977begin
1978  Result:=CreateSitesResource(Self);
1979end;
1980
1981
1982Function TWebmastersAPI.CreateSitesResource(AOwner : TComponent) : TSitesResource;
1983
1984begin
1985  Result:=TSitesResource.Create(AOwner);
1986  Result.API:=Self.API;
1987end;
1988
1989
1990
1991Function TWebmastersAPI.GetUrlcrawlerrorscountsInstance : TUrlcrawlerrorscountsResource;
1992
1993begin
1994  if (FUrlcrawlerrorscountsInstance=Nil) then
1995    FUrlcrawlerrorscountsInstance:=CreateUrlcrawlerrorscountsResource;
1996  Result:=FUrlcrawlerrorscountsInstance;
1997end;
1998
1999Function TWebmastersAPI.CreateUrlcrawlerrorscountsResource : TUrlcrawlerrorscountsResource;
2000
2001begin
2002  Result:=CreateUrlcrawlerrorscountsResource(Self);
2003end;
2004
2005
2006Function TWebmastersAPI.CreateUrlcrawlerrorscountsResource(AOwner : TComponent) : TUrlcrawlerrorscountsResource;
2007
2008begin
2009  Result:=TUrlcrawlerrorscountsResource.Create(AOwner);
2010  Result.API:=Self.API;
2011end;
2012
2013
2014
2015Function TWebmastersAPI.GetUrlcrawlerrorssamplesInstance : TUrlcrawlerrorssamplesResource;
2016
2017begin
2018  if (FUrlcrawlerrorssamplesInstance=Nil) then
2019    FUrlcrawlerrorssamplesInstance:=CreateUrlcrawlerrorssamplesResource;
2020  Result:=FUrlcrawlerrorssamplesInstance;
2021end;
2022
2023Function TWebmastersAPI.CreateUrlcrawlerrorssamplesResource : TUrlcrawlerrorssamplesResource;
2024
2025begin
2026  Result:=CreateUrlcrawlerrorssamplesResource(Self);
2027end;
2028
2029
2030Function TWebmastersAPI.CreateUrlcrawlerrorssamplesResource(AOwner : TComponent) : TUrlcrawlerrorssamplesResource;
2031
2032begin
2033  Result:=TUrlcrawlerrorssamplesResource.Create(AOwner);
2034  Result.API:=Self.API;
2035end;
2036
2037
2038
2039initialization
2040  TWebmastersAPI.RegisterAPI;
2041end.
2042