googleblogger.pp 119 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637
  1. {$IFNDEF FPC_DOTTEDUNITS}
  2. unit googleblogger;
  3. {$ENDIF FPC_DOTTEDUNITS}
  4. {$MODE objfpc}
  5. {$H+}
  6. interface
  7. {$IFDEF FPC_DOTTEDUNITS}
  8. uses System.SysUtils, System.Classes, GoogleApi.Service, FpWeb.Rest.Base, GoogleApi.Base;
  9. {$ELSE FPC_DOTTEDUNITS}
  10. uses sysutils, classes, googleservice, restbase, googlebase;
  11. {$ENDIF FPC_DOTTEDUNITS}
  12. type
  13. //Top-level schema types
  14. TBlog = Class;
  15. TBlogList = Class;
  16. TBlogPerUserInfo = Class;
  17. TBlogUserInfo = Class;
  18. TComment = Class;
  19. TCommentList = Class;
  20. TPage = Class;
  21. TPageList = Class;
  22. TPageviews = Class;
  23. TPost = Class;
  24. TPostList = Class;
  25. TPostPerUserInfo = Class;
  26. TPostUserInfo = Class;
  27. TPostUserInfosList = Class;
  28. TUser = Class;
  29. TBlogArray = Array of TBlog;
  30. TBlogListArray = Array of TBlogList;
  31. TBlogPerUserInfoArray = Array of TBlogPerUserInfo;
  32. TBlogUserInfoArray = Array of TBlogUserInfo;
  33. TCommentArray = Array of TComment;
  34. TCommentListArray = Array of TCommentList;
  35. TPageArray = Array of TPage;
  36. TPageListArray = Array of TPageList;
  37. TPageviewsArray = Array of TPageviews;
  38. TPostArray = Array of TPost;
  39. TPostListArray = Array of TPostList;
  40. TPostPerUserInfoArray = Array of TPostPerUserInfo;
  41. TPostUserInfoArray = Array of TPostUserInfo;
  42. TPostUserInfosListArray = Array of TPostUserInfosList;
  43. TUserArray = Array of TUser;
  44. //Anonymous types, using auto-generated names
  45. TBlogTypelocale = Class;
  46. TBlogTypepages = Class;
  47. TBlogTypeposts = Class;
  48. TCommentTypeauthorTypeimage = Class;
  49. TCommentTypeauthor = Class;
  50. TCommentTypeblog = Class;
  51. TCommentTypeinReplyTo = Class;
  52. TCommentTypepost = Class;
  53. TPageTypeauthorTypeimage = Class;
  54. TPageTypeauthor = Class;
  55. TPageTypeblog = Class;
  56. TPageviewsTypecountsItem = Class;
  57. TPostTypeauthorTypeimage = Class;
  58. TPostTypeauthor = Class;
  59. TPostTypeblog = Class;
  60. TPostTypeimagesItem = Class;
  61. TPostTypelocation = Class;
  62. TPostTypereplies = Class;
  63. TUserTypeblogs = Class;
  64. TUserTypelocale = Class;
  65. TBlogTypepostsTypeitemsArray = Array of TPost;
  66. TBlogListTypeblogUserInfosArray = Array of TBlogUserInfo;
  67. TBlogListTypeitemsArray = Array of TBlog;
  68. TCommentListTypeitemsArray = Array of TComment;
  69. TPageListTypeitemsArray = Array of TPage;
  70. TPageviewsTypecountsArray = Array of TPageviewsTypecountsItem;
  71. TPostTypeimagesArray = Array of TPostTypeimagesItem;
  72. TPostTyperepliesTypeitemsArray = Array of TComment;
  73. TPostListTypeitemsArray = Array of TPost;
  74. TPostUserInfosListTypeitemsArray = Array of TPostUserInfo;
  75. { --------------------------------------------------------------------
  76. TBlogTypelocale
  77. --------------------------------------------------------------------}
  78. TBlogTypelocale = Class(TGoogleBaseObject)
  79. Private
  80. Fcountry : String;
  81. Flanguage : String;
  82. Fvariant : String;
  83. Protected
  84. //Property setters
  85. Procedure Setcountry(AIndex : Integer; const AValue : String); virtual;
  86. Procedure Setlanguage(AIndex : Integer; const AValue : String); virtual;
  87. Procedure Setvariant(AIndex : Integer; const AValue : String); virtual;
  88. Public
  89. Published
  90. Property country : String Index 0 Read Fcountry Write Setcountry;
  91. Property language : String Index 8 Read Flanguage Write Setlanguage;
  92. Property variant : String Index 16 Read Fvariant Write Setvariant;
  93. end;
  94. TBlogTypelocaleClass = Class of TBlogTypelocale;
  95. { --------------------------------------------------------------------
  96. TBlogTypepages
  97. --------------------------------------------------------------------}
  98. TBlogTypepages = Class(TGoogleBaseObject)
  99. Private
  100. FselfLink : String;
  101. FtotalItems : integer;
  102. Protected
  103. //Property setters
  104. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  105. Procedure SettotalItems(AIndex : Integer; const AValue : integer); virtual;
  106. Public
  107. Published
  108. Property selfLink : String Index 0 Read FselfLink Write SetselfLink;
  109. Property totalItems : integer Index 8 Read FtotalItems Write SettotalItems;
  110. end;
  111. TBlogTypepagesClass = Class of TBlogTypepages;
  112. { --------------------------------------------------------------------
  113. TBlogTypeposts
  114. --------------------------------------------------------------------}
  115. TBlogTypeposts = Class(TGoogleBaseObject)
  116. Private
  117. Fitems : TBlogTypepostsTypeitemsArray;
  118. FselfLink : String;
  119. FtotalItems : integer;
  120. Protected
  121. //Property setters
  122. Procedure Setitems(AIndex : Integer; const AValue : TBlogTypepostsTypeitemsArray); virtual;
  123. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  124. Procedure SettotalItems(AIndex : Integer; const AValue : integer); virtual;
  125. //2.6.4. bug workaround
  126. {$IFDEF VER2_6}
  127. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  128. {$ENDIF VER2_6}
  129. Public
  130. Published
  131. Property items : TBlogTypepostsTypeitemsArray Index 0 Read Fitems Write Setitems;
  132. Property selfLink : String Index 8 Read FselfLink Write SetselfLink;
  133. Property totalItems : integer Index 16 Read FtotalItems Write SettotalItems;
  134. end;
  135. TBlogTypepostsClass = Class of TBlogTypeposts;
  136. { --------------------------------------------------------------------
  137. TBlog
  138. --------------------------------------------------------------------}
  139. TBlog = Class(TGoogleBaseObject)
  140. Private
  141. FcustomMetaData : String;
  142. Fdescription : String;
  143. Fid : String;
  144. Fkind : String;
  145. Flocale : TBlogTypelocale;
  146. Fname : String;
  147. Fpages : TBlogTypepages;
  148. Fposts : TBlogTypeposts;
  149. F_published : TDatetime;
  150. FselfLink : String;
  151. Fstatus : String;
  152. Fupdated : TDatetime;
  153. Furl : String;
  154. Protected
  155. Class Function ExportPropertyName(Const AName : String) : string; override;
  156. //Property setters
  157. Procedure SetcustomMetaData(AIndex : Integer; const AValue : String); virtual;
  158. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  159. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  160. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  161. Procedure Setlocale(AIndex : Integer; const AValue : TBlogTypelocale); virtual;
  162. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  163. Procedure Setpages(AIndex : Integer; const AValue : TBlogTypepages); virtual;
  164. Procedure Setposts(AIndex : Integer; const AValue : TBlogTypeposts); virtual;
  165. Procedure Set_published(AIndex : Integer; const AValue : TDatetime); virtual;
  166. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  167. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  168. Procedure Setupdated(AIndex : Integer; const AValue : TDatetime); virtual;
  169. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  170. Public
  171. Published
  172. Property customMetaData : String Index 0 Read FcustomMetaData Write SetcustomMetaData;
  173. Property description : String Index 8 Read Fdescription Write Setdescription;
  174. Property id : String Index 16 Read Fid Write Setid;
  175. Property kind : String Index 24 Read Fkind Write Setkind;
  176. Property locale : TBlogTypelocale Index 32 Read Flocale Write Setlocale;
  177. Property name : String Index 40 Read Fname Write Setname;
  178. Property pages : TBlogTypepages Index 48 Read Fpages Write Setpages;
  179. Property posts : TBlogTypeposts Index 56 Read Fposts Write Setposts;
  180. Property _published : TDatetime Index 64 Read F_published Write Set_published;
  181. Property selfLink : String Index 72 Read FselfLink Write SetselfLink;
  182. Property status : String Index 80 Read Fstatus Write Setstatus;
  183. Property updated : TDatetime Index 88 Read Fupdated Write Setupdated;
  184. Property url : String Index 96 Read Furl Write Seturl;
  185. end;
  186. TBlogClass = Class of TBlog;
  187. { --------------------------------------------------------------------
  188. TBlogList
  189. --------------------------------------------------------------------}
  190. TBlogList = Class(TGoogleBaseObject)
  191. Private
  192. FblogUserInfos : TBlogListTypeblogUserInfosArray;
  193. Fitems : TBlogListTypeitemsArray;
  194. Fkind : String;
  195. Protected
  196. //Property setters
  197. Procedure SetblogUserInfos(AIndex : Integer; const AValue : TBlogListTypeblogUserInfosArray); virtual;
  198. Procedure Setitems(AIndex : Integer; const AValue : TBlogListTypeitemsArray); virtual;
  199. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  200. //2.6.4. bug workaround
  201. {$IFDEF VER2_6}
  202. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  203. {$ENDIF VER2_6}
  204. Public
  205. Published
  206. Property blogUserInfos : TBlogListTypeblogUserInfosArray Index 0 Read FblogUserInfos Write SetblogUserInfos;
  207. Property items : TBlogListTypeitemsArray Index 8 Read Fitems Write Setitems;
  208. Property kind : String Index 16 Read Fkind Write Setkind;
  209. end;
  210. TBlogListClass = Class of TBlogList;
  211. { --------------------------------------------------------------------
  212. TBlogPerUserInfo
  213. --------------------------------------------------------------------}
  214. TBlogPerUserInfo = Class(TGoogleBaseObject)
  215. Private
  216. FblogId : String;
  217. FhasAdminAccess : boolean;
  218. Fkind : String;
  219. FphotosAlbumKey : String;
  220. Frole : String;
  221. FuserId : String;
  222. Protected
  223. //Property setters
  224. Procedure SetblogId(AIndex : Integer; const AValue : String); virtual;
  225. Procedure SethasAdminAccess(AIndex : Integer; const AValue : boolean); virtual;
  226. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  227. Procedure SetphotosAlbumKey(AIndex : Integer; const AValue : String); virtual;
  228. Procedure Setrole(AIndex : Integer; const AValue : String); virtual;
  229. Procedure SetuserId(AIndex : Integer; const AValue : String); virtual;
  230. Public
  231. Published
  232. Property blogId : String Index 0 Read FblogId Write SetblogId;
  233. Property hasAdminAccess : boolean Index 8 Read FhasAdminAccess Write SethasAdminAccess;
  234. Property kind : String Index 16 Read Fkind Write Setkind;
  235. Property photosAlbumKey : String Index 24 Read FphotosAlbumKey Write SetphotosAlbumKey;
  236. Property role : String Index 32 Read Frole Write Setrole;
  237. Property userId : String Index 40 Read FuserId Write SetuserId;
  238. end;
  239. TBlogPerUserInfoClass = Class of TBlogPerUserInfo;
  240. { --------------------------------------------------------------------
  241. TBlogUserInfo
  242. --------------------------------------------------------------------}
  243. TBlogUserInfo = Class(TGoogleBaseObject)
  244. Private
  245. Fblog : TBlog;
  246. Fblog_user_info : TBlogPerUserInfo;
  247. Fkind : String;
  248. Protected
  249. //Property setters
  250. Procedure Setblog(AIndex : Integer; const AValue : TBlog); virtual;
  251. Procedure Setblog_user_info(AIndex : Integer; const AValue : TBlogPerUserInfo); virtual;
  252. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  253. Public
  254. Published
  255. Property blog : TBlog Index 0 Read Fblog Write Setblog;
  256. Property blog_user_info : TBlogPerUserInfo Index 8 Read Fblog_user_info Write Setblog_user_info;
  257. Property kind : String Index 16 Read Fkind Write Setkind;
  258. end;
  259. TBlogUserInfoClass = Class of TBlogUserInfo;
  260. { --------------------------------------------------------------------
  261. TCommentTypeauthorTypeimage
  262. --------------------------------------------------------------------}
  263. TCommentTypeauthorTypeimage = Class(TGoogleBaseObject)
  264. Private
  265. Furl : String;
  266. Protected
  267. //Property setters
  268. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  269. Public
  270. Published
  271. Property url : String Index 0 Read Furl Write Seturl;
  272. end;
  273. TCommentTypeauthorTypeimageClass = Class of TCommentTypeauthorTypeimage;
  274. { --------------------------------------------------------------------
  275. TCommentTypeauthor
  276. --------------------------------------------------------------------}
  277. TCommentTypeauthor = Class(TGoogleBaseObject)
  278. Private
  279. FdisplayName : String;
  280. Fid : String;
  281. Fimage : TCommentTypeauthorTypeimage;
  282. Furl : String;
  283. Protected
  284. //Property setters
  285. Procedure SetdisplayName(AIndex : Integer; const AValue : String); virtual;
  286. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  287. Procedure Setimage(AIndex : Integer; const AValue : TCommentTypeauthorTypeimage); virtual;
  288. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  289. Public
  290. Published
  291. Property displayName : String Index 0 Read FdisplayName Write SetdisplayName;
  292. Property id : String Index 8 Read Fid Write Setid;
  293. Property image : TCommentTypeauthorTypeimage Index 16 Read Fimage Write Setimage;
  294. Property url : String Index 24 Read Furl Write Seturl;
  295. end;
  296. TCommentTypeauthorClass = Class of TCommentTypeauthor;
  297. { --------------------------------------------------------------------
  298. TCommentTypeblog
  299. --------------------------------------------------------------------}
  300. TCommentTypeblog = Class(TGoogleBaseObject)
  301. Private
  302. Fid : String;
  303. Protected
  304. //Property setters
  305. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  306. Public
  307. Published
  308. Property id : String Index 0 Read Fid Write Setid;
  309. end;
  310. TCommentTypeblogClass = Class of TCommentTypeblog;
  311. { --------------------------------------------------------------------
  312. TCommentTypeinReplyTo
  313. --------------------------------------------------------------------}
  314. TCommentTypeinReplyTo = Class(TGoogleBaseObject)
  315. Private
  316. Fid : String;
  317. Protected
  318. //Property setters
  319. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  320. Public
  321. Published
  322. Property id : String Index 0 Read Fid Write Setid;
  323. end;
  324. TCommentTypeinReplyToClass = Class of TCommentTypeinReplyTo;
  325. { --------------------------------------------------------------------
  326. TCommentTypepost
  327. --------------------------------------------------------------------}
  328. TCommentTypepost = Class(TGoogleBaseObject)
  329. Private
  330. Fid : String;
  331. Protected
  332. //Property setters
  333. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  334. Public
  335. Published
  336. Property id : String Index 0 Read Fid Write Setid;
  337. end;
  338. TCommentTypepostClass = Class of TCommentTypepost;
  339. { --------------------------------------------------------------------
  340. TComment
  341. --------------------------------------------------------------------}
  342. TComment = Class(TGoogleBaseObject)
  343. Private
  344. Fauthor : TCommentTypeauthor;
  345. Fblog : TCommentTypeblog;
  346. Fcontent : String;
  347. Fid : String;
  348. FinReplyTo : TCommentTypeinReplyTo;
  349. Fkind : String;
  350. Fpost : TCommentTypepost;
  351. F_published : TDatetime;
  352. FselfLink : String;
  353. Fstatus : String;
  354. Fupdated : TDatetime;
  355. Protected
  356. Class Function ExportPropertyName(Const AName : String) : string; override;
  357. //Property setters
  358. Procedure Setauthor(AIndex : Integer; const AValue : TCommentTypeauthor); virtual;
  359. Procedure Setblog(AIndex : Integer; const AValue : TCommentTypeblog); virtual;
  360. Procedure Setcontent(AIndex : Integer; const AValue : String); virtual;
  361. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  362. Procedure SetinReplyTo(AIndex : Integer; const AValue : TCommentTypeinReplyTo); virtual;
  363. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  364. Procedure Setpost(AIndex : Integer; const AValue : TCommentTypepost); virtual;
  365. Procedure Set_published(AIndex : Integer; const AValue : TDatetime); virtual;
  366. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  367. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  368. Procedure Setupdated(AIndex : Integer; const AValue : TDatetime); virtual;
  369. Public
  370. Published
  371. Property author : TCommentTypeauthor Index 0 Read Fauthor Write Setauthor;
  372. Property blog : TCommentTypeblog Index 8 Read Fblog Write Setblog;
  373. Property content : String Index 16 Read Fcontent Write Setcontent;
  374. Property id : String Index 24 Read Fid Write Setid;
  375. Property inReplyTo : TCommentTypeinReplyTo Index 32 Read FinReplyTo Write SetinReplyTo;
  376. Property kind : String Index 40 Read Fkind Write Setkind;
  377. Property post : TCommentTypepost Index 48 Read Fpost Write Setpost;
  378. Property _published : TDatetime Index 56 Read F_published Write Set_published;
  379. Property selfLink : String Index 64 Read FselfLink Write SetselfLink;
  380. Property status : String Index 72 Read Fstatus Write Setstatus;
  381. Property updated : TDatetime Index 80 Read Fupdated Write Setupdated;
  382. end;
  383. TCommentClass = Class of TComment;
  384. { --------------------------------------------------------------------
  385. TCommentList
  386. --------------------------------------------------------------------}
  387. TCommentList = Class(TGoogleBaseObject)
  388. Private
  389. Fetag : String;
  390. Fitems : TCommentListTypeitemsArray;
  391. Fkind : String;
  392. FnextPageToken : String;
  393. FprevPageToken : String;
  394. Protected
  395. //Property setters
  396. Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
  397. Procedure Setitems(AIndex : Integer; const AValue : TCommentListTypeitemsArray); virtual;
  398. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  399. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  400. Procedure SetprevPageToken(AIndex : Integer; const AValue : String); virtual;
  401. //2.6.4. bug workaround
  402. {$IFDEF VER2_6}
  403. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  404. {$ENDIF VER2_6}
  405. Public
  406. Published
  407. Property etag : String Index 0 Read Fetag Write Setetag;
  408. Property items : TCommentListTypeitemsArray Index 8 Read Fitems Write Setitems;
  409. Property kind : String Index 16 Read Fkind Write Setkind;
  410. Property nextPageToken : String Index 24 Read FnextPageToken Write SetnextPageToken;
  411. Property prevPageToken : String Index 32 Read FprevPageToken Write SetprevPageToken;
  412. end;
  413. TCommentListClass = Class of TCommentList;
  414. { --------------------------------------------------------------------
  415. TPageTypeauthorTypeimage
  416. --------------------------------------------------------------------}
  417. TPageTypeauthorTypeimage = Class(TGoogleBaseObject)
  418. Private
  419. Furl : String;
  420. Protected
  421. //Property setters
  422. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  423. Public
  424. Published
  425. Property url : String Index 0 Read Furl Write Seturl;
  426. end;
  427. TPageTypeauthorTypeimageClass = Class of TPageTypeauthorTypeimage;
  428. { --------------------------------------------------------------------
  429. TPageTypeauthor
  430. --------------------------------------------------------------------}
  431. TPageTypeauthor = Class(TGoogleBaseObject)
  432. Private
  433. FdisplayName : String;
  434. Fid : String;
  435. Fimage : TPageTypeauthorTypeimage;
  436. Furl : String;
  437. Protected
  438. //Property setters
  439. Procedure SetdisplayName(AIndex : Integer; const AValue : String); virtual;
  440. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  441. Procedure Setimage(AIndex : Integer; const AValue : TPageTypeauthorTypeimage); virtual;
  442. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  443. Public
  444. Published
  445. Property displayName : String Index 0 Read FdisplayName Write SetdisplayName;
  446. Property id : String Index 8 Read Fid Write Setid;
  447. Property image : TPageTypeauthorTypeimage Index 16 Read Fimage Write Setimage;
  448. Property url : String Index 24 Read Furl Write Seturl;
  449. end;
  450. TPageTypeauthorClass = Class of TPageTypeauthor;
  451. { --------------------------------------------------------------------
  452. TPageTypeblog
  453. --------------------------------------------------------------------}
  454. TPageTypeblog = Class(TGoogleBaseObject)
  455. Private
  456. Fid : String;
  457. Protected
  458. //Property setters
  459. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  460. Public
  461. Published
  462. Property id : String Index 0 Read Fid Write Setid;
  463. end;
  464. TPageTypeblogClass = Class of TPageTypeblog;
  465. { --------------------------------------------------------------------
  466. TPage
  467. --------------------------------------------------------------------}
  468. TPage = Class(TGoogleBaseObject)
  469. Private
  470. Fauthor : TPageTypeauthor;
  471. Fblog : TPageTypeblog;
  472. Fcontent : String;
  473. Fetag : String;
  474. Fid : String;
  475. Fkind : String;
  476. F_published : TDatetime;
  477. FselfLink : String;
  478. Fstatus : String;
  479. Ftitle : String;
  480. Fupdated : TDatetime;
  481. Furl : String;
  482. Protected
  483. Class Function ExportPropertyName(Const AName : String) : string; override;
  484. //Property setters
  485. Procedure Setauthor(AIndex : Integer; const AValue : TPageTypeauthor); virtual;
  486. Procedure Setblog(AIndex : Integer; const AValue : TPageTypeblog); virtual;
  487. Procedure Setcontent(AIndex : Integer; const AValue : String); virtual;
  488. Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
  489. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  490. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  491. Procedure Set_published(AIndex : Integer; const AValue : TDatetime); virtual;
  492. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  493. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  494. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  495. Procedure Setupdated(AIndex : Integer; const AValue : TDatetime); virtual;
  496. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  497. Public
  498. Published
  499. Property author : TPageTypeauthor Index 0 Read Fauthor Write Setauthor;
  500. Property blog : TPageTypeblog Index 8 Read Fblog Write Setblog;
  501. Property content : String Index 16 Read Fcontent Write Setcontent;
  502. Property etag : String Index 24 Read Fetag Write Setetag;
  503. Property id : String Index 32 Read Fid Write Setid;
  504. Property kind : String Index 40 Read Fkind Write Setkind;
  505. Property _published : TDatetime Index 48 Read F_published Write Set_published;
  506. Property selfLink : String Index 56 Read FselfLink Write SetselfLink;
  507. Property status : String Index 64 Read Fstatus Write Setstatus;
  508. Property title : String Index 72 Read Ftitle Write Settitle;
  509. Property updated : TDatetime Index 80 Read Fupdated Write Setupdated;
  510. Property url : String Index 88 Read Furl Write Seturl;
  511. end;
  512. TPageClass = Class of TPage;
  513. { --------------------------------------------------------------------
  514. TPageList
  515. --------------------------------------------------------------------}
  516. TPageList = Class(TGoogleBaseObject)
  517. Private
  518. Fetag : String;
  519. Fitems : TPageListTypeitemsArray;
  520. Fkind : String;
  521. FnextPageToken : String;
  522. Protected
  523. //Property setters
  524. Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
  525. Procedure Setitems(AIndex : Integer; const AValue : TPageListTypeitemsArray); virtual;
  526. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  527. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  528. //2.6.4. bug workaround
  529. {$IFDEF VER2_6}
  530. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  531. {$ENDIF VER2_6}
  532. Public
  533. Published
  534. Property etag : String Index 0 Read Fetag Write Setetag;
  535. Property items : TPageListTypeitemsArray Index 8 Read Fitems Write Setitems;
  536. Property kind : String Index 16 Read Fkind Write Setkind;
  537. Property nextPageToken : String Index 24 Read FnextPageToken Write SetnextPageToken;
  538. end;
  539. TPageListClass = Class of TPageList;
  540. { --------------------------------------------------------------------
  541. TPageviewsTypecountsItem
  542. --------------------------------------------------------------------}
  543. TPageviewsTypecountsItem = Class(TGoogleBaseObject)
  544. Private
  545. Fcount : String;
  546. FtimeRange : String;
  547. Protected
  548. //Property setters
  549. Procedure Setcount(AIndex : Integer; const AValue : String); virtual;
  550. Procedure SettimeRange(AIndex : Integer; const AValue : String); virtual;
  551. Public
  552. Published
  553. Property count : String Index 0 Read Fcount Write Setcount;
  554. Property timeRange : String Index 8 Read FtimeRange Write SettimeRange;
  555. end;
  556. TPageviewsTypecountsItemClass = Class of TPageviewsTypecountsItem;
  557. { --------------------------------------------------------------------
  558. TPageviews
  559. --------------------------------------------------------------------}
  560. TPageviews = Class(TGoogleBaseObject)
  561. Private
  562. FblogId : String;
  563. Fcounts : TPageviewsTypecountsArray;
  564. Fkind : String;
  565. Protected
  566. //Property setters
  567. Procedure SetblogId(AIndex : Integer; const AValue : String); virtual;
  568. Procedure Setcounts(AIndex : Integer; const AValue : TPageviewsTypecountsArray); virtual;
  569. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  570. //2.6.4. bug workaround
  571. {$IFDEF VER2_6}
  572. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  573. {$ENDIF VER2_6}
  574. Public
  575. Published
  576. Property blogId : String Index 0 Read FblogId Write SetblogId;
  577. Property counts : TPageviewsTypecountsArray Index 8 Read Fcounts Write Setcounts;
  578. Property kind : String Index 16 Read Fkind Write Setkind;
  579. end;
  580. TPageviewsClass = Class of TPageviews;
  581. { --------------------------------------------------------------------
  582. TPostTypeauthorTypeimage
  583. --------------------------------------------------------------------}
  584. TPostTypeauthorTypeimage = Class(TGoogleBaseObject)
  585. Private
  586. Furl : String;
  587. Protected
  588. //Property setters
  589. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  590. Public
  591. Published
  592. Property url : String Index 0 Read Furl Write Seturl;
  593. end;
  594. TPostTypeauthorTypeimageClass = Class of TPostTypeauthorTypeimage;
  595. { --------------------------------------------------------------------
  596. TPostTypeauthor
  597. --------------------------------------------------------------------}
  598. TPostTypeauthor = Class(TGoogleBaseObject)
  599. Private
  600. FdisplayName : String;
  601. Fid : String;
  602. Fimage : TPostTypeauthorTypeimage;
  603. Furl : String;
  604. Protected
  605. //Property setters
  606. Procedure SetdisplayName(AIndex : Integer; const AValue : String); virtual;
  607. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  608. Procedure Setimage(AIndex : Integer; const AValue : TPostTypeauthorTypeimage); virtual;
  609. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  610. Public
  611. Published
  612. Property displayName : String Index 0 Read FdisplayName Write SetdisplayName;
  613. Property id : String Index 8 Read Fid Write Setid;
  614. Property image : TPostTypeauthorTypeimage Index 16 Read Fimage Write Setimage;
  615. Property url : String Index 24 Read Furl Write Seturl;
  616. end;
  617. TPostTypeauthorClass = Class of TPostTypeauthor;
  618. { --------------------------------------------------------------------
  619. TPostTypeblog
  620. --------------------------------------------------------------------}
  621. TPostTypeblog = Class(TGoogleBaseObject)
  622. Private
  623. Fid : String;
  624. Protected
  625. //Property setters
  626. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  627. Public
  628. Published
  629. Property id : String Index 0 Read Fid Write Setid;
  630. end;
  631. TPostTypeblogClass = Class of TPostTypeblog;
  632. { --------------------------------------------------------------------
  633. TPostTypeimagesItem
  634. --------------------------------------------------------------------}
  635. TPostTypeimagesItem = Class(TGoogleBaseObject)
  636. Private
  637. Furl : String;
  638. Protected
  639. //Property setters
  640. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  641. Public
  642. Published
  643. Property url : String Index 0 Read Furl Write Seturl;
  644. end;
  645. TPostTypeimagesItemClass = Class of TPostTypeimagesItem;
  646. { --------------------------------------------------------------------
  647. TPostTypelocation
  648. --------------------------------------------------------------------}
  649. TPostTypelocation = Class(TGoogleBaseObject)
  650. Private
  651. Flat : double;
  652. Flng : double;
  653. Fname : String;
  654. Fspan : String;
  655. Protected
  656. //Property setters
  657. Procedure Setlat(AIndex : Integer; const AValue : double); virtual;
  658. Procedure Setlng(AIndex : Integer; const AValue : double); virtual;
  659. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  660. Procedure Setspan(AIndex : Integer; const AValue : String); virtual;
  661. Public
  662. Published
  663. Property lat : double Index 0 Read Flat Write Setlat;
  664. Property lng : double Index 8 Read Flng Write Setlng;
  665. Property name : String Index 16 Read Fname Write Setname;
  666. Property span : String Index 24 Read Fspan Write Setspan;
  667. end;
  668. TPostTypelocationClass = Class of TPostTypelocation;
  669. { --------------------------------------------------------------------
  670. TPostTypereplies
  671. --------------------------------------------------------------------}
  672. TPostTypereplies = Class(TGoogleBaseObject)
  673. Private
  674. Fitems : TPostTyperepliesTypeitemsArray;
  675. FselfLink : String;
  676. FtotalItems : String;
  677. Protected
  678. //Property setters
  679. Procedure Setitems(AIndex : Integer; const AValue : TPostTyperepliesTypeitemsArray); virtual;
  680. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  681. Procedure SettotalItems(AIndex : Integer; const AValue : String); virtual;
  682. //2.6.4. bug workaround
  683. {$IFDEF VER2_6}
  684. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  685. {$ENDIF VER2_6}
  686. Public
  687. Published
  688. Property items : TPostTyperepliesTypeitemsArray Index 0 Read Fitems Write Setitems;
  689. Property selfLink : String Index 8 Read FselfLink Write SetselfLink;
  690. Property totalItems : String Index 16 Read FtotalItems Write SettotalItems;
  691. end;
  692. TPostTyperepliesClass = Class of TPostTypereplies;
  693. { --------------------------------------------------------------------
  694. TPost
  695. --------------------------------------------------------------------}
  696. TPost = Class(TGoogleBaseObject)
  697. Private
  698. Fauthor : TPostTypeauthor;
  699. Fblog : TPostTypeblog;
  700. Fcontent : String;
  701. FcustomMetaData : String;
  702. Fetag : String;
  703. Fid : String;
  704. Fimages : TPostTypeimagesArray;
  705. Fkind : String;
  706. Flabels : TStringArray;
  707. Flocation : TPostTypelocation;
  708. F_published : TDatetime;
  709. FreaderComments : String;
  710. Freplies : TPostTypereplies;
  711. FselfLink : String;
  712. Fstatus : String;
  713. Ftitle : String;
  714. FtitleLink : String;
  715. Fupdated : TDatetime;
  716. Furl : String;
  717. Protected
  718. Class Function ExportPropertyName(Const AName : String) : string; override;
  719. //Property setters
  720. Procedure Setauthor(AIndex : Integer; const AValue : TPostTypeauthor); virtual;
  721. Procedure Setblog(AIndex : Integer; const AValue : TPostTypeblog); virtual;
  722. Procedure Setcontent(AIndex : Integer; const AValue : String); virtual;
  723. Procedure SetcustomMetaData(AIndex : Integer; const AValue : String); virtual;
  724. Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
  725. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  726. Procedure Setimages(AIndex : Integer; const AValue : TPostTypeimagesArray); virtual;
  727. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  728. Procedure Setlabels(AIndex : Integer; const AValue : TStringArray); virtual;
  729. Procedure Setlocation(AIndex : Integer; const AValue : TPostTypelocation); virtual;
  730. Procedure Set_published(AIndex : Integer; const AValue : TDatetime); virtual;
  731. Procedure SetreaderComments(AIndex : Integer; const AValue : String); virtual;
  732. Procedure Setreplies(AIndex : Integer; const AValue : TPostTypereplies); virtual;
  733. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  734. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  735. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  736. Procedure SettitleLink(AIndex : Integer; const AValue : String); virtual;
  737. Procedure Setupdated(AIndex : Integer; const AValue : TDatetime); virtual;
  738. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  739. //2.6.4. bug workaround
  740. {$IFDEF VER2_6}
  741. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  742. {$ENDIF VER2_6}
  743. Public
  744. Published
  745. Property author : TPostTypeauthor Index 0 Read Fauthor Write Setauthor;
  746. Property blog : TPostTypeblog Index 8 Read Fblog Write Setblog;
  747. Property content : String Index 16 Read Fcontent Write Setcontent;
  748. Property customMetaData : String Index 24 Read FcustomMetaData Write SetcustomMetaData;
  749. Property etag : String Index 32 Read Fetag Write Setetag;
  750. Property id : String Index 40 Read Fid Write Setid;
  751. Property images : TPostTypeimagesArray Index 48 Read Fimages Write Setimages;
  752. Property kind : String Index 56 Read Fkind Write Setkind;
  753. Property labels : TStringArray Index 64 Read Flabels Write Setlabels;
  754. Property location : TPostTypelocation Index 72 Read Flocation Write Setlocation;
  755. Property _published : TDatetime Index 80 Read F_published Write Set_published;
  756. Property readerComments : String Index 88 Read FreaderComments Write SetreaderComments;
  757. Property replies : TPostTypereplies Index 96 Read Freplies Write Setreplies;
  758. Property selfLink : String Index 104 Read FselfLink Write SetselfLink;
  759. Property status : String Index 112 Read Fstatus Write Setstatus;
  760. Property title : String Index 120 Read Ftitle Write Settitle;
  761. Property titleLink : String Index 128 Read FtitleLink Write SettitleLink;
  762. Property updated : TDatetime Index 136 Read Fupdated Write Setupdated;
  763. Property url : String Index 144 Read Furl Write Seturl;
  764. end;
  765. TPostClass = Class of TPost;
  766. { --------------------------------------------------------------------
  767. TPostList
  768. --------------------------------------------------------------------}
  769. TPostList = Class(TGoogleBaseObject)
  770. Private
  771. Fetag : String;
  772. Fitems : TPostListTypeitemsArray;
  773. Fkind : String;
  774. FnextPageToken : String;
  775. Protected
  776. //Property setters
  777. Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
  778. Procedure Setitems(AIndex : Integer; const AValue : TPostListTypeitemsArray); virtual;
  779. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  780. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  781. //2.6.4. bug workaround
  782. {$IFDEF VER2_6}
  783. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  784. {$ENDIF VER2_6}
  785. Public
  786. Published
  787. Property etag : String Index 0 Read Fetag Write Setetag;
  788. Property items : TPostListTypeitemsArray Index 8 Read Fitems Write Setitems;
  789. Property kind : String Index 16 Read Fkind Write Setkind;
  790. Property nextPageToken : String Index 24 Read FnextPageToken Write SetnextPageToken;
  791. end;
  792. TPostListClass = Class of TPostList;
  793. { --------------------------------------------------------------------
  794. TPostPerUserInfo
  795. --------------------------------------------------------------------}
  796. TPostPerUserInfo = Class(TGoogleBaseObject)
  797. Private
  798. FblogId : String;
  799. FhasEditAccess : boolean;
  800. Fkind : String;
  801. FpostId : String;
  802. FuserId : String;
  803. Protected
  804. //Property setters
  805. Procedure SetblogId(AIndex : Integer; const AValue : String); virtual;
  806. Procedure SethasEditAccess(AIndex : Integer; const AValue : boolean); virtual;
  807. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  808. Procedure SetpostId(AIndex : Integer; const AValue : String); virtual;
  809. Procedure SetuserId(AIndex : Integer; const AValue : String); virtual;
  810. Public
  811. Published
  812. Property blogId : String Index 0 Read FblogId Write SetblogId;
  813. Property hasEditAccess : boolean Index 8 Read FhasEditAccess Write SethasEditAccess;
  814. Property kind : String Index 16 Read Fkind Write Setkind;
  815. Property postId : String Index 24 Read FpostId Write SetpostId;
  816. Property userId : String Index 32 Read FuserId Write SetuserId;
  817. end;
  818. TPostPerUserInfoClass = Class of TPostPerUserInfo;
  819. { --------------------------------------------------------------------
  820. TPostUserInfo
  821. --------------------------------------------------------------------}
  822. TPostUserInfo = Class(TGoogleBaseObject)
  823. Private
  824. Fkind : String;
  825. Fpost : TPost;
  826. Fpost_user_info : TPostPerUserInfo;
  827. Protected
  828. //Property setters
  829. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  830. Procedure Setpost(AIndex : Integer; const AValue : TPost); virtual;
  831. Procedure Setpost_user_info(AIndex : Integer; const AValue : TPostPerUserInfo); virtual;
  832. Public
  833. Published
  834. Property kind : String Index 0 Read Fkind Write Setkind;
  835. Property post : TPost Index 8 Read Fpost Write Setpost;
  836. Property post_user_info : TPostPerUserInfo Index 16 Read Fpost_user_info Write Setpost_user_info;
  837. end;
  838. TPostUserInfoClass = Class of TPostUserInfo;
  839. { --------------------------------------------------------------------
  840. TPostUserInfosList
  841. --------------------------------------------------------------------}
  842. TPostUserInfosList = Class(TGoogleBaseObject)
  843. Private
  844. Fitems : TPostUserInfosListTypeitemsArray;
  845. Fkind : String;
  846. FnextPageToken : String;
  847. Protected
  848. //Property setters
  849. Procedure Setitems(AIndex : Integer; const AValue : TPostUserInfosListTypeitemsArray); virtual;
  850. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  851. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  852. //2.6.4. bug workaround
  853. {$IFDEF VER2_6}
  854. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  855. {$ENDIF VER2_6}
  856. Public
  857. Published
  858. Property items : TPostUserInfosListTypeitemsArray Index 0 Read Fitems Write Setitems;
  859. Property kind : String Index 8 Read Fkind Write Setkind;
  860. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  861. end;
  862. TPostUserInfosListClass = Class of TPostUserInfosList;
  863. { --------------------------------------------------------------------
  864. TUserTypeblogs
  865. --------------------------------------------------------------------}
  866. TUserTypeblogs = Class(TGoogleBaseObject)
  867. Private
  868. FselfLink : String;
  869. Protected
  870. //Property setters
  871. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  872. Public
  873. Published
  874. Property selfLink : String Index 0 Read FselfLink Write SetselfLink;
  875. end;
  876. TUserTypeblogsClass = Class of TUserTypeblogs;
  877. { --------------------------------------------------------------------
  878. TUserTypelocale
  879. --------------------------------------------------------------------}
  880. TUserTypelocale = Class(TGoogleBaseObject)
  881. Private
  882. Fcountry : String;
  883. Flanguage : String;
  884. Fvariant : String;
  885. Protected
  886. //Property setters
  887. Procedure Setcountry(AIndex : Integer; const AValue : String); virtual;
  888. Procedure Setlanguage(AIndex : Integer; const AValue : String); virtual;
  889. Procedure Setvariant(AIndex : Integer; const AValue : String); virtual;
  890. Public
  891. Published
  892. Property country : String Index 0 Read Fcountry Write Setcountry;
  893. Property language : String Index 8 Read Flanguage Write Setlanguage;
  894. Property variant : String Index 16 Read Fvariant Write Setvariant;
  895. end;
  896. TUserTypelocaleClass = Class of TUserTypelocale;
  897. { --------------------------------------------------------------------
  898. TUser
  899. --------------------------------------------------------------------}
  900. TUser = Class(TGoogleBaseObject)
  901. Private
  902. Fabout : String;
  903. Fblogs : TUserTypeblogs;
  904. Fcreated : TDatetime;
  905. FdisplayName : String;
  906. Fid : String;
  907. Fkind : String;
  908. Flocale : TUserTypelocale;
  909. FselfLink : String;
  910. Furl : String;
  911. Protected
  912. //Property setters
  913. Procedure Setabout(AIndex : Integer; const AValue : String); virtual;
  914. Procedure Setblogs(AIndex : Integer; const AValue : TUserTypeblogs); virtual;
  915. Procedure Setcreated(AIndex : Integer; const AValue : TDatetime); virtual;
  916. Procedure SetdisplayName(AIndex : Integer; const AValue : String); virtual;
  917. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  918. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  919. Procedure Setlocale(AIndex : Integer; const AValue : TUserTypelocale); virtual;
  920. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  921. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  922. Public
  923. Published
  924. Property about : String Index 0 Read Fabout Write Setabout;
  925. Property blogs : TUserTypeblogs Index 8 Read Fblogs Write Setblogs;
  926. Property created : TDatetime Index 16 Read Fcreated Write Setcreated;
  927. Property displayName : String Index 24 Read FdisplayName Write SetdisplayName;
  928. Property id : String Index 32 Read Fid Write Setid;
  929. Property kind : String Index 40 Read Fkind Write Setkind;
  930. Property locale : TUserTypelocale Index 48 Read Flocale Write Setlocale;
  931. Property selfLink : String Index 56 Read FselfLink Write SetselfLink;
  932. Property url : String Index 64 Read Furl Write Seturl;
  933. end;
  934. TUserClass = Class of TUser;
  935. { --------------------------------------------------------------------
  936. TBlogUserInfosResource
  937. --------------------------------------------------------------------}
  938. //Optional query Options for TBlogUserInfosResource, method Get
  939. TBlogUserInfosGetOptions = Record
  940. maxPosts : integer;
  941. end;
  942. TBlogUserInfosResource = Class(TGoogleResource)
  943. Public
  944. Class Function ResourceName : String; override;
  945. Class Function DefaultAPI : TGoogleAPIClass; override;
  946. Function Get(blogId: string; userId: string; AQuery : string = '') : TBlogUserInfo;
  947. Function Get(blogId: string; userId: string; AQuery : TBlogUserInfosgetOptions) : TBlogUserInfo;
  948. end;
  949. { --------------------------------------------------------------------
  950. TBlogsResource
  951. --------------------------------------------------------------------}
  952. //Optional query Options for TBlogsResource, method Get
  953. TBlogsGetOptions = Record
  954. maxPosts : integer;
  955. view : String;
  956. end;
  957. //Optional query Options for TBlogsResource, method GetByUrl
  958. TBlogsGetByUrlOptions = Record
  959. url : String;
  960. view : String;
  961. end;
  962. //Optional query Options for TBlogsResource, method ListByUser
  963. TBlogsListByUserOptions = Record
  964. fetchUserInfo : boolean;
  965. role : String;
  966. status : String;
  967. view : String;
  968. end;
  969. TBlogsResource = Class(TGoogleResource)
  970. Public
  971. Class Function ResourceName : String; override;
  972. Class Function DefaultAPI : TGoogleAPIClass; override;
  973. Function Get(blogId: string; AQuery : string = '') : TBlog;
  974. Function Get(blogId: string; AQuery : TBlogsgetOptions) : TBlog;
  975. Function GetByUrl(AQuery : string = '') : TBlog;
  976. Function GetByUrl(AQuery : TBlogsgetByUrlOptions) : TBlog;
  977. Function ListByUser(userId: string; AQuery : string = '') : TBlogList;
  978. Function ListByUser(userId: string; AQuery : TBlogslistByUserOptions) : TBlogList;
  979. end;
  980. { --------------------------------------------------------------------
  981. TCommentsResource
  982. --------------------------------------------------------------------}
  983. //Optional query Options for TCommentsResource, method Get
  984. TCommentsGetOptions = Record
  985. view : String;
  986. end;
  987. //Optional query Options for TCommentsResource, method List
  988. TCommentsListOptions = Record
  989. endDate : TDatetime;
  990. fetchBodies : boolean;
  991. maxResults : integer;
  992. pageToken : String;
  993. startDate : TDatetime;
  994. status : String;
  995. view : String;
  996. end;
  997. //Optional query Options for TCommentsResource, method ListByBlog
  998. TCommentsListByBlogOptions = Record
  999. endDate : TDatetime;
  1000. fetchBodies : boolean;
  1001. maxResults : integer;
  1002. pageToken : String;
  1003. startDate : TDatetime;
  1004. status : String;
  1005. end;
  1006. TCommentsResource = Class(TGoogleResource)
  1007. Public
  1008. Class Function ResourceName : String; override;
  1009. Class Function DefaultAPI : TGoogleAPIClass; override;
  1010. Function Approve(blogId: string; commentId: string; postId: string) : TComment;
  1011. Procedure Delete(blogId: string; commentId: string; postId: string);
  1012. Function Get(blogId: string; commentId: string; postId: string; AQuery : string = '') : TComment;
  1013. Function Get(blogId: string; commentId: string; postId: string; AQuery : TCommentsgetOptions) : TComment;
  1014. Function List(blogId: string; postId: string; AQuery : string = '') : TCommentList;
  1015. Function List(blogId: string; postId: string; AQuery : TCommentslistOptions) : TCommentList;
  1016. Function ListByBlog(blogId: string; AQuery : string = '') : TCommentList;
  1017. Function ListByBlog(blogId: string; AQuery : TCommentslistByBlogOptions) : TCommentList;
  1018. Function MarkAsSpam(blogId: string; commentId: string; postId: string) : TComment;
  1019. Function RemoveContent(blogId: string; commentId: string; postId: string) : TComment;
  1020. end;
  1021. { --------------------------------------------------------------------
  1022. TPageViewsResource
  1023. --------------------------------------------------------------------}
  1024. //Optional query Options for TPageViewsResource, method Get
  1025. TPageViewsGetOptions = Record
  1026. range : String;
  1027. end;
  1028. TPageViewsResource = Class(TGoogleResource)
  1029. Public
  1030. Class Function ResourceName : String; override;
  1031. Class Function DefaultAPI : TGoogleAPIClass; override;
  1032. Function Get(blogId: string; AQuery : string = '') : TPageviews;
  1033. Function Get(blogId: string; AQuery : TPageViewsgetOptions) : TPageviews;
  1034. end;
  1035. { --------------------------------------------------------------------
  1036. TPagesResource
  1037. --------------------------------------------------------------------}
  1038. //Optional query Options for TPagesResource, method Get
  1039. TPagesGetOptions = Record
  1040. view : String;
  1041. end;
  1042. //Optional query Options for TPagesResource, method Insert
  1043. TPagesInsertOptions = Record
  1044. isDraft : boolean;
  1045. end;
  1046. //Optional query Options for TPagesResource, method List
  1047. TPagesListOptions = Record
  1048. fetchBodies : boolean;
  1049. maxResults : integer;
  1050. pageToken : String;
  1051. status : String;
  1052. view : String;
  1053. end;
  1054. //Optional query Options for TPagesResource, method Patch
  1055. TPagesPatchOptions = Record
  1056. publish : boolean;
  1057. revert : boolean;
  1058. end;
  1059. //Optional query Options for TPagesResource, method Update
  1060. TPagesUpdateOptions = Record
  1061. publish : boolean;
  1062. revert : boolean;
  1063. end;
  1064. TPagesResource = Class(TGoogleResource)
  1065. Public
  1066. Class Function ResourceName : String; override;
  1067. Class Function DefaultAPI : TGoogleAPIClass; override;
  1068. Procedure Delete(blogId: string; pageId: string);
  1069. Function Get(blogId: string; pageId: string; AQuery : string = '') : TPage;
  1070. Function Get(blogId: string; pageId: string; AQuery : TPagesgetOptions) : TPage;
  1071. Function Insert(blogId: string; aPage : TPage; AQuery : string = '') : TPage;
  1072. Function Insert(blogId: string; aPage : TPage; AQuery : TPagesinsertOptions) : TPage;
  1073. Function List(blogId: string; AQuery : string = '') : TPageList;
  1074. Function List(blogId: string; AQuery : TPageslistOptions) : TPageList;
  1075. Function Patch(blogId: string; pageId: string; aPage : TPage; AQuery : string = '') : TPage;
  1076. Function Patch(blogId: string; pageId: string; aPage : TPage; AQuery : TPagespatchOptions) : TPage;
  1077. Function Publish(blogId: string; pageId: string) : TPage;
  1078. Function Revert(blogId: string; pageId: string) : TPage;
  1079. Function Update(blogId: string; pageId: string; aPage : TPage; AQuery : string = '') : TPage;
  1080. Function Update(blogId: string; pageId: string; aPage : TPage; AQuery : TPagesupdateOptions) : TPage;
  1081. end;
  1082. { --------------------------------------------------------------------
  1083. TPostUserInfosResource
  1084. --------------------------------------------------------------------}
  1085. //Optional query Options for TPostUserInfosResource, method Get
  1086. TPostUserInfosGetOptions = Record
  1087. maxComments : integer;
  1088. end;
  1089. //Optional query Options for TPostUserInfosResource, method List
  1090. TPostUserInfosListOptions = Record
  1091. endDate : TDatetime;
  1092. fetchBodies : boolean;
  1093. labels : String;
  1094. maxResults : integer;
  1095. orderBy : String;
  1096. pageToken : String;
  1097. startDate : TDatetime;
  1098. status : String;
  1099. view : String;
  1100. end;
  1101. TPostUserInfosResource = Class(TGoogleResource)
  1102. Public
  1103. Class Function ResourceName : String; override;
  1104. Class Function DefaultAPI : TGoogleAPIClass; override;
  1105. Function Get(blogId: string; postId: string; userId: string; AQuery : string = '') : TPostUserInfo;
  1106. Function Get(blogId: string; postId: string; userId: string; AQuery : TPostUserInfosgetOptions) : TPostUserInfo;
  1107. Function List(blogId: string; userId: string; AQuery : string = '') : TPostUserInfosList;
  1108. Function List(blogId: string; userId: string; AQuery : TPostUserInfoslistOptions) : TPostUserInfosList;
  1109. end;
  1110. { --------------------------------------------------------------------
  1111. TPostsResource
  1112. --------------------------------------------------------------------}
  1113. //Optional query Options for TPostsResource, method Get
  1114. TPostsGetOptions = Record
  1115. fetchBody : boolean;
  1116. fetchImages : boolean;
  1117. maxComments : integer;
  1118. view : String;
  1119. end;
  1120. //Optional query Options for TPostsResource, method GetByPath
  1121. TPostsGetByPathOptions = Record
  1122. maxComments : integer;
  1123. path : String;
  1124. view : String;
  1125. end;
  1126. //Optional query Options for TPostsResource, method Insert
  1127. TPostsInsertOptions = Record
  1128. fetchBody : boolean;
  1129. fetchImages : boolean;
  1130. isDraft : boolean;
  1131. end;
  1132. //Optional query Options for TPostsResource, method List
  1133. TPostsListOptions = Record
  1134. endDate : TDatetime;
  1135. fetchBodies : boolean;
  1136. fetchImages : boolean;
  1137. labels : String;
  1138. maxResults : integer;
  1139. orderBy : String;
  1140. pageToken : String;
  1141. startDate : TDatetime;
  1142. status : String;
  1143. view : String;
  1144. end;
  1145. //Optional query Options for TPostsResource, method Patch
  1146. TPostsPatchOptions = Record
  1147. fetchBody : boolean;
  1148. fetchImages : boolean;
  1149. maxComments : integer;
  1150. publish : boolean;
  1151. revert : boolean;
  1152. end;
  1153. //Optional query Options for TPostsResource, method Publish
  1154. TPostsPublishOptions = Record
  1155. publishDate : TDatetime;
  1156. end;
  1157. //Optional query Options for TPostsResource, method Search
  1158. TPostsSearchOptions = Record
  1159. fetchBodies : boolean;
  1160. orderBy : String;
  1161. q : String;
  1162. end;
  1163. //Optional query Options for TPostsResource, method Update
  1164. TPostsUpdateOptions = Record
  1165. fetchBody : boolean;
  1166. fetchImages : boolean;
  1167. maxComments : integer;
  1168. publish : boolean;
  1169. revert : boolean;
  1170. end;
  1171. TPostsResource = Class(TGoogleResource)
  1172. Public
  1173. Class Function ResourceName : String; override;
  1174. Class Function DefaultAPI : TGoogleAPIClass; override;
  1175. Procedure Delete(blogId: string; postId: string);
  1176. Function Get(blogId: string; postId: string; AQuery : string = '') : TPost;
  1177. Function Get(blogId: string; postId: string; AQuery : TPostsgetOptions) : TPost;
  1178. Function GetByPath(blogId: string; AQuery : string = '') : TPost;
  1179. Function GetByPath(blogId: string; AQuery : TPostsgetByPathOptions) : TPost;
  1180. Function Insert(blogId: string; aPost : TPost; AQuery : string = '') : TPost;
  1181. Function Insert(blogId: string; aPost : TPost; AQuery : TPostsinsertOptions) : TPost;
  1182. Function List(blogId: string; AQuery : string = '') : TPostList;
  1183. Function List(blogId: string; AQuery : TPostslistOptions) : TPostList;
  1184. Function Patch(blogId: string; postId: string; aPost : TPost; AQuery : string = '') : TPost;
  1185. Function Patch(blogId: string; postId: string; aPost : TPost; AQuery : TPostspatchOptions) : TPost;
  1186. Function Publish(blogId: string; postId: string; AQuery : string = '') : TPost;
  1187. Function Publish(blogId: string; postId: string; AQuery : TPostspublishOptions) : TPost;
  1188. Function Revert(blogId: string; postId: string) : TPost;
  1189. Function Search(blogId: string; AQuery : string = '') : TPostList;
  1190. Function Search(blogId: string; AQuery : TPostssearchOptions) : TPostList;
  1191. Function Update(blogId: string; postId: string; aPost : TPost; AQuery : string = '') : TPost;
  1192. Function Update(blogId: string; postId: string; aPost : TPost; AQuery : TPostsupdateOptions) : TPost;
  1193. end;
  1194. { --------------------------------------------------------------------
  1195. TUsersResource
  1196. --------------------------------------------------------------------}
  1197. TUsersResource = Class(TGoogleResource)
  1198. Public
  1199. Class Function ResourceName : String; override;
  1200. Class Function DefaultAPI : TGoogleAPIClass; override;
  1201. Function Get(userId: string) : TUser;
  1202. end;
  1203. { --------------------------------------------------------------------
  1204. TBloggerAPI
  1205. --------------------------------------------------------------------}
  1206. TBloggerAPI = Class(TGoogleAPI)
  1207. Private
  1208. FBlogUserInfosInstance : TBlogUserInfosResource;
  1209. FBlogsInstance : TBlogsResource;
  1210. FCommentsInstance : TCommentsResource;
  1211. FPageViewsInstance : TPageViewsResource;
  1212. FPagesInstance : TPagesResource;
  1213. FPostUserInfosInstance : TPostUserInfosResource;
  1214. FPostsInstance : TPostsResource;
  1215. FUsersInstance : TUsersResource;
  1216. Function GetBlogUserInfosInstance : TBlogUserInfosResource;virtual;
  1217. Function GetBlogsInstance : TBlogsResource;virtual;
  1218. Function GetCommentsInstance : TCommentsResource;virtual;
  1219. Function GetPageViewsInstance : TPageViewsResource;virtual;
  1220. Function GetPagesInstance : TPagesResource;virtual;
  1221. Function GetPostUserInfosInstance : TPostUserInfosResource;virtual;
  1222. Function GetPostsInstance : TPostsResource;virtual;
  1223. Function GetUsersInstance : TUsersResource;virtual;
  1224. Public
  1225. //Override class functions with API info
  1226. Class Function APIName : String; override;
  1227. Class Function APIVersion : String; override;
  1228. Class Function APIRevision : String; override;
  1229. Class Function APIID : String; override;
  1230. Class Function APITitle : String; override;
  1231. Class Function APIDescription : String; override;
  1232. Class Function APIOwnerDomain : String; override;
  1233. Class Function APIOwnerName : String; override;
  1234. Class Function APIIcon16 : String; override;
  1235. Class Function APIIcon32 : String; override;
  1236. Class Function APIdocumentationLink : String; override;
  1237. Class Function APIrootUrl : string; override;
  1238. Class Function APIbasePath : string;override;
  1239. Class Function APIbaseURL : String;override;
  1240. Class Function APIProtocol : string;override;
  1241. Class Function APIservicePath : string;override;
  1242. Class Function APIbatchPath : String;override;
  1243. Class Function APIAuthScopes : TScopeInfoArray;override;
  1244. Class Function APINeedsAuth : Boolean;override;
  1245. Class Procedure RegisterAPIResources; override;
  1246. //Add create function for resources
  1247. Function CreateBlogUserInfosResource(AOwner : TComponent) : TBlogUserInfosResource;virtual;overload;
  1248. Function CreateBlogUserInfosResource : TBlogUserInfosResource;virtual;overload;
  1249. Function CreateBlogsResource(AOwner : TComponent) : TBlogsResource;virtual;overload;
  1250. Function CreateBlogsResource : TBlogsResource;virtual;overload;
  1251. Function CreateCommentsResource(AOwner : TComponent) : TCommentsResource;virtual;overload;
  1252. Function CreateCommentsResource : TCommentsResource;virtual;overload;
  1253. Function CreatePageViewsResource(AOwner : TComponent) : TPageViewsResource;virtual;overload;
  1254. Function CreatePageViewsResource : TPageViewsResource;virtual;overload;
  1255. Function CreatePagesResource(AOwner : TComponent) : TPagesResource;virtual;overload;
  1256. Function CreatePagesResource : TPagesResource;virtual;overload;
  1257. Function CreatePostUserInfosResource(AOwner : TComponent) : TPostUserInfosResource;virtual;overload;
  1258. Function CreatePostUserInfosResource : TPostUserInfosResource;virtual;overload;
  1259. Function CreatePostsResource(AOwner : TComponent) : TPostsResource;virtual;overload;
  1260. Function CreatePostsResource : TPostsResource;virtual;overload;
  1261. Function CreateUsersResource(AOwner : TComponent) : TUsersResource;virtual;overload;
  1262. Function CreateUsersResource : TUsersResource;virtual;overload;
  1263. //Add default on-demand instances for resources
  1264. Property BlogUserInfosResource : TBlogUserInfosResource Read GetBlogUserInfosInstance;
  1265. Property BlogsResource : TBlogsResource Read GetBlogsInstance;
  1266. Property CommentsResource : TCommentsResource Read GetCommentsInstance;
  1267. Property PageViewsResource : TPageViewsResource Read GetPageViewsInstance;
  1268. Property PagesResource : TPagesResource Read GetPagesInstance;
  1269. Property PostUserInfosResource : TPostUserInfosResource Read GetPostUserInfosInstance;
  1270. Property PostsResource : TPostsResource Read GetPostsInstance;
  1271. Property UsersResource : TUsersResource Read GetUsersInstance;
  1272. end;
  1273. implementation
  1274. { --------------------------------------------------------------------
  1275. TBlogTypelocale
  1276. --------------------------------------------------------------------}
  1277. Procedure TBlogTypelocale.Setcountry(AIndex : Integer; const AValue : String);
  1278. begin
  1279. If (Fcountry=AValue) then exit;
  1280. Fcountry:=AValue;
  1281. MarkPropertyChanged(AIndex);
  1282. end;
  1283. Procedure TBlogTypelocale.Setlanguage(AIndex : Integer; const AValue : String);
  1284. begin
  1285. If (Flanguage=AValue) then exit;
  1286. Flanguage:=AValue;
  1287. MarkPropertyChanged(AIndex);
  1288. end;
  1289. Procedure TBlogTypelocale.Setvariant(AIndex : Integer; const AValue : String);
  1290. begin
  1291. If (Fvariant=AValue) then exit;
  1292. Fvariant:=AValue;
  1293. MarkPropertyChanged(AIndex);
  1294. end;
  1295. { --------------------------------------------------------------------
  1296. TBlogTypepages
  1297. --------------------------------------------------------------------}
  1298. Procedure TBlogTypepages.SetselfLink(AIndex : Integer; const AValue : String);
  1299. begin
  1300. If (FselfLink=AValue) then exit;
  1301. FselfLink:=AValue;
  1302. MarkPropertyChanged(AIndex);
  1303. end;
  1304. Procedure TBlogTypepages.SettotalItems(AIndex : Integer; const AValue : integer);
  1305. begin
  1306. If (FtotalItems=AValue) then exit;
  1307. FtotalItems:=AValue;
  1308. MarkPropertyChanged(AIndex);
  1309. end;
  1310. { --------------------------------------------------------------------
  1311. TBlogTypeposts
  1312. --------------------------------------------------------------------}
  1313. Procedure TBlogTypeposts.Setitems(AIndex : Integer; const AValue : TBlogTypepostsTypeitemsArray);
  1314. begin
  1315. If (Fitems=AValue) then exit;
  1316. Fitems:=AValue;
  1317. MarkPropertyChanged(AIndex);
  1318. end;
  1319. Procedure TBlogTypeposts.SetselfLink(AIndex : Integer; const AValue : String);
  1320. begin
  1321. If (FselfLink=AValue) then exit;
  1322. FselfLink:=AValue;
  1323. MarkPropertyChanged(AIndex);
  1324. end;
  1325. Procedure TBlogTypeposts.SettotalItems(AIndex : Integer; const AValue : integer);
  1326. begin
  1327. If (FtotalItems=AValue) then exit;
  1328. FtotalItems:=AValue;
  1329. MarkPropertyChanged(AIndex);
  1330. end;
  1331. //2.6.4. bug workaround
  1332. {$IFDEF VER2_6}
  1333. Procedure TBlogTypeposts.SetArrayLength(Const AName : String; ALength : Longint);
  1334. begin
  1335. Case AName of
  1336. 'items' : SetLength(Fitems,ALength);
  1337. else
  1338. Inherited SetArrayLength(AName,ALength);
  1339. end;
  1340. end;
  1341. {$ENDIF VER2_6}
  1342. { --------------------------------------------------------------------
  1343. TBlog
  1344. --------------------------------------------------------------------}
  1345. Procedure TBlog.SetcustomMetaData(AIndex : Integer; const AValue : String);
  1346. begin
  1347. If (FcustomMetaData=AValue) then exit;
  1348. FcustomMetaData:=AValue;
  1349. MarkPropertyChanged(AIndex);
  1350. end;
  1351. Procedure TBlog.Setdescription(AIndex : Integer; const AValue : String);
  1352. begin
  1353. If (Fdescription=AValue) then exit;
  1354. Fdescription:=AValue;
  1355. MarkPropertyChanged(AIndex);
  1356. end;
  1357. Procedure TBlog.Setid(AIndex : Integer; const AValue : String);
  1358. begin
  1359. If (Fid=AValue) then exit;
  1360. Fid:=AValue;
  1361. MarkPropertyChanged(AIndex);
  1362. end;
  1363. Procedure TBlog.Setkind(AIndex : Integer; const AValue : String);
  1364. begin
  1365. If (Fkind=AValue) then exit;
  1366. Fkind:=AValue;
  1367. MarkPropertyChanged(AIndex);
  1368. end;
  1369. Procedure TBlog.Setlocale(AIndex : Integer; const AValue : TBlogTypelocale);
  1370. begin
  1371. If (Flocale=AValue) then exit;
  1372. Flocale:=AValue;
  1373. MarkPropertyChanged(AIndex);
  1374. end;
  1375. Procedure TBlog.Setname(AIndex : Integer; const AValue : String);
  1376. begin
  1377. If (Fname=AValue) then exit;
  1378. Fname:=AValue;
  1379. MarkPropertyChanged(AIndex);
  1380. end;
  1381. Procedure TBlog.Setpages(AIndex : Integer; const AValue : TBlogTypepages);
  1382. begin
  1383. If (Fpages=AValue) then exit;
  1384. Fpages:=AValue;
  1385. MarkPropertyChanged(AIndex);
  1386. end;
  1387. Procedure TBlog.Setposts(AIndex : Integer; const AValue : TBlogTypeposts);
  1388. begin
  1389. If (Fposts=AValue) then exit;
  1390. Fposts:=AValue;
  1391. MarkPropertyChanged(AIndex);
  1392. end;
  1393. Procedure TBlog.Set_published(AIndex : Integer; const AValue : TDatetime);
  1394. begin
  1395. If (F_published=AValue) then exit;
  1396. F_published:=AValue;
  1397. MarkPropertyChanged(AIndex);
  1398. end;
  1399. Procedure TBlog.SetselfLink(AIndex : Integer; const AValue : String);
  1400. begin
  1401. If (FselfLink=AValue) then exit;
  1402. FselfLink:=AValue;
  1403. MarkPropertyChanged(AIndex);
  1404. end;
  1405. Procedure TBlog.Setstatus(AIndex : Integer; const AValue : String);
  1406. begin
  1407. If (Fstatus=AValue) then exit;
  1408. Fstatus:=AValue;
  1409. MarkPropertyChanged(AIndex);
  1410. end;
  1411. Procedure TBlog.Setupdated(AIndex : Integer; const AValue : TDatetime);
  1412. begin
  1413. If (Fupdated=AValue) then exit;
  1414. Fupdated:=AValue;
  1415. MarkPropertyChanged(AIndex);
  1416. end;
  1417. Procedure TBlog.Seturl(AIndex : Integer; const AValue : String);
  1418. begin
  1419. If (Furl=AValue) then exit;
  1420. Furl:=AValue;
  1421. MarkPropertyChanged(AIndex);
  1422. end;
  1423. Class Function TBlog.ExportPropertyName(Const AName : String) :String;
  1424. begin
  1425. Case AName of
  1426. '_published' : Result:='published';
  1427. else
  1428. Result:=Inherited ExportPropertyName(AName);
  1429. end;
  1430. end;
  1431. { --------------------------------------------------------------------
  1432. TBlogList
  1433. --------------------------------------------------------------------}
  1434. Procedure TBlogList.SetblogUserInfos(AIndex : Integer; const AValue : TBlogListTypeblogUserInfosArray);
  1435. begin
  1436. If (FblogUserInfos=AValue) then exit;
  1437. FblogUserInfos:=AValue;
  1438. MarkPropertyChanged(AIndex);
  1439. end;
  1440. Procedure TBlogList.Setitems(AIndex : Integer; const AValue : TBlogListTypeitemsArray);
  1441. begin
  1442. If (Fitems=AValue) then exit;
  1443. Fitems:=AValue;
  1444. MarkPropertyChanged(AIndex);
  1445. end;
  1446. Procedure TBlogList.Setkind(AIndex : Integer; const AValue : String);
  1447. begin
  1448. If (Fkind=AValue) then exit;
  1449. Fkind:=AValue;
  1450. MarkPropertyChanged(AIndex);
  1451. end;
  1452. //2.6.4. bug workaround
  1453. {$IFDEF VER2_6}
  1454. Procedure TBlogList.SetArrayLength(Const AName : String; ALength : Longint);
  1455. begin
  1456. Case AName of
  1457. 'bloguserinfos' : SetLength(FblogUserInfos,ALength);
  1458. 'items' : SetLength(Fitems,ALength);
  1459. else
  1460. Inherited SetArrayLength(AName,ALength);
  1461. end;
  1462. end;
  1463. {$ENDIF VER2_6}
  1464. { --------------------------------------------------------------------
  1465. TBlogPerUserInfo
  1466. --------------------------------------------------------------------}
  1467. Procedure TBlogPerUserInfo.SetblogId(AIndex : Integer; const AValue : String);
  1468. begin
  1469. If (FblogId=AValue) then exit;
  1470. FblogId:=AValue;
  1471. MarkPropertyChanged(AIndex);
  1472. end;
  1473. Procedure TBlogPerUserInfo.SethasAdminAccess(AIndex : Integer; const AValue : boolean);
  1474. begin
  1475. If (FhasAdminAccess=AValue) then exit;
  1476. FhasAdminAccess:=AValue;
  1477. MarkPropertyChanged(AIndex);
  1478. end;
  1479. Procedure TBlogPerUserInfo.Setkind(AIndex : Integer; const AValue : String);
  1480. begin
  1481. If (Fkind=AValue) then exit;
  1482. Fkind:=AValue;
  1483. MarkPropertyChanged(AIndex);
  1484. end;
  1485. Procedure TBlogPerUserInfo.SetphotosAlbumKey(AIndex : Integer; const AValue : String);
  1486. begin
  1487. If (FphotosAlbumKey=AValue) then exit;
  1488. FphotosAlbumKey:=AValue;
  1489. MarkPropertyChanged(AIndex);
  1490. end;
  1491. Procedure TBlogPerUserInfo.Setrole(AIndex : Integer; const AValue : String);
  1492. begin
  1493. If (Frole=AValue) then exit;
  1494. Frole:=AValue;
  1495. MarkPropertyChanged(AIndex);
  1496. end;
  1497. Procedure TBlogPerUserInfo.SetuserId(AIndex : Integer; const AValue : String);
  1498. begin
  1499. If (FuserId=AValue) then exit;
  1500. FuserId:=AValue;
  1501. MarkPropertyChanged(AIndex);
  1502. end;
  1503. { --------------------------------------------------------------------
  1504. TBlogUserInfo
  1505. --------------------------------------------------------------------}
  1506. Procedure TBlogUserInfo.Setblog(AIndex : Integer; const AValue : TBlog);
  1507. begin
  1508. If (Fblog=AValue) then exit;
  1509. Fblog:=AValue;
  1510. MarkPropertyChanged(AIndex);
  1511. end;
  1512. Procedure TBlogUserInfo.Setblog_user_info(AIndex : Integer; const AValue : TBlogPerUserInfo);
  1513. begin
  1514. If (Fblog_user_info=AValue) then exit;
  1515. Fblog_user_info:=AValue;
  1516. MarkPropertyChanged(AIndex);
  1517. end;
  1518. Procedure TBlogUserInfo.Setkind(AIndex : Integer; const AValue : String);
  1519. begin
  1520. If (Fkind=AValue) then exit;
  1521. Fkind:=AValue;
  1522. MarkPropertyChanged(AIndex);
  1523. end;
  1524. { --------------------------------------------------------------------
  1525. TCommentTypeauthorTypeimage
  1526. --------------------------------------------------------------------}
  1527. Procedure TCommentTypeauthorTypeimage.Seturl(AIndex : Integer; const AValue : String);
  1528. begin
  1529. If (Furl=AValue) then exit;
  1530. Furl:=AValue;
  1531. MarkPropertyChanged(AIndex);
  1532. end;
  1533. { --------------------------------------------------------------------
  1534. TCommentTypeauthor
  1535. --------------------------------------------------------------------}
  1536. Procedure TCommentTypeauthor.SetdisplayName(AIndex : Integer; const AValue : String);
  1537. begin
  1538. If (FdisplayName=AValue) then exit;
  1539. FdisplayName:=AValue;
  1540. MarkPropertyChanged(AIndex);
  1541. end;
  1542. Procedure TCommentTypeauthor.Setid(AIndex : Integer; const AValue : String);
  1543. begin
  1544. If (Fid=AValue) then exit;
  1545. Fid:=AValue;
  1546. MarkPropertyChanged(AIndex);
  1547. end;
  1548. Procedure TCommentTypeauthor.Setimage(AIndex : Integer; const AValue : TCommentTypeauthorTypeimage);
  1549. begin
  1550. If (Fimage=AValue) then exit;
  1551. Fimage:=AValue;
  1552. MarkPropertyChanged(AIndex);
  1553. end;
  1554. Procedure TCommentTypeauthor.Seturl(AIndex : Integer; const AValue : String);
  1555. begin
  1556. If (Furl=AValue) then exit;
  1557. Furl:=AValue;
  1558. MarkPropertyChanged(AIndex);
  1559. end;
  1560. { --------------------------------------------------------------------
  1561. TCommentTypeblog
  1562. --------------------------------------------------------------------}
  1563. Procedure TCommentTypeblog.Setid(AIndex : Integer; const AValue : String);
  1564. begin
  1565. If (Fid=AValue) then exit;
  1566. Fid:=AValue;
  1567. MarkPropertyChanged(AIndex);
  1568. end;
  1569. { --------------------------------------------------------------------
  1570. TCommentTypeinReplyTo
  1571. --------------------------------------------------------------------}
  1572. Procedure TCommentTypeinReplyTo.Setid(AIndex : Integer; const AValue : String);
  1573. begin
  1574. If (Fid=AValue) then exit;
  1575. Fid:=AValue;
  1576. MarkPropertyChanged(AIndex);
  1577. end;
  1578. { --------------------------------------------------------------------
  1579. TCommentTypepost
  1580. --------------------------------------------------------------------}
  1581. Procedure TCommentTypepost.Setid(AIndex : Integer; const AValue : String);
  1582. begin
  1583. If (Fid=AValue) then exit;
  1584. Fid:=AValue;
  1585. MarkPropertyChanged(AIndex);
  1586. end;
  1587. { --------------------------------------------------------------------
  1588. TComment
  1589. --------------------------------------------------------------------}
  1590. Procedure TComment.Setauthor(AIndex : Integer; const AValue : TCommentTypeauthor);
  1591. begin
  1592. If (Fauthor=AValue) then exit;
  1593. Fauthor:=AValue;
  1594. MarkPropertyChanged(AIndex);
  1595. end;
  1596. Procedure TComment.Setblog(AIndex : Integer; const AValue : TCommentTypeblog);
  1597. begin
  1598. If (Fblog=AValue) then exit;
  1599. Fblog:=AValue;
  1600. MarkPropertyChanged(AIndex);
  1601. end;
  1602. Procedure TComment.Setcontent(AIndex : Integer; const AValue : String);
  1603. begin
  1604. If (Fcontent=AValue) then exit;
  1605. Fcontent:=AValue;
  1606. MarkPropertyChanged(AIndex);
  1607. end;
  1608. Procedure TComment.Setid(AIndex : Integer; const AValue : String);
  1609. begin
  1610. If (Fid=AValue) then exit;
  1611. Fid:=AValue;
  1612. MarkPropertyChanged(AIndex);
  1613. end;
  1614. Procedure TComment.SetinReplyTo(AIndex : Integer; const AValue : TCommentTypeinReplyTo);
  1615. begin
  1616. If (FinReplyTo=AValue) then exit;
  1617. FinReplyTo:=AValue;
  1618. MarkPropertyChanged(AIndex);
  1619. end;
  1620. Procedure TComment.Setkind(AIndex : Integer; const AValue : String);
  1621. begin
  1622. If (Fkind=AValue) then exit;
  1623. Fkind:=AValue;
  1624. MarkPropertyChanged(AIndex);
  1625. end;
  1626. Procedure TComment.Setpost(AIndex : Integer; const AValue : TCommentTypepost);
  1627. begin
  1628. If (Fpost=AValue) then exit;
  1629. Fpost:=AValue;
  1630. MarkPropertyChanged(AIndex);
  1631. end;
  1632. Procedure TComment.Set_published(AIndex : Integer; const AValue : TDatetime);
  1633. begin
  1634. If (F_published=AValue) then exit;
  1635. F_published:=AValue;
  1636. MarkPropertyChanged(AIndex);
  1637. end;
  1638. Procedure TComment.SetselfLink(AIndex : Integer; const AValue : String);
  1639. begin
  1640. If (FselfLink=AValue) then exit;
  1641. FselfLink:=AValue;
  1642. MarkPropertyChanged(AIndex);
  1643. end;
  1644. Procedure TComment.Setstatus(AIndex : Integer; const AValue : String);
  1645. begin
  1646. If (Fstatus=AValue) then exit;
  1647. Fstatus:=AValue;
  1648. MarkPropertyChanged(AIndex);
  1649. end;
  1650. Procedure TComment.Setupdated(AIndex : Integer; const AValue : TDatetime);
  1651. begin
  1652. If (Fupdated=AValue) then exit;
  1653. Fupdated:=AValue;
  1654. MarkPropertyChanged(AIndex);
  1655. end;
  1656. Class Function TComment.ExportPropertyName(Const AName : String) :String;
  1657. begin
  1658. Case AName of
  1659. '_published' : Result:='published';
  1660. else
  1661. Result:=Inherited ExportPropertyName(AName);
  1662. end;
  1663. end;
  1664. { --------------------------------------------------------------------
  1665. TCommentList
  1666. --------------------------------------------------------------------}
  1667. Procedure TCommentList.Setetag(AIndex : Integer; const AValue : String);
  1668. begin
  1669. If (Fetag=AValue) then exit;
  1670. Fetag:=AValue;
  1671. MarkPropertyChanged(AIndex);
  1672. end;
  1673. Procedure TCommentList.Setitems(AIndex : Integer; const AValue : TCommentListTypeitemsArray);
  1674. begin
  1675. If (Fitems=AValue) then exit;
  1676. Fitems:=AValue;
  1677. MarkPropertyChanged(AIndex);
  1678. end;
  1679. Procedure TCommentList.Setkind(AIndex : Integer; const AValue : String);
  1680. begin
  1681. If (Fkind=AValue) then exit;
  1682. Fkind:=AValue;
  1683. MarkPropertyChanged(AIndex);
  1684. end;
  1685. Procedure TCommentList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1686. begin
  1687. If (FnextPageToken=AValue) then exit;
  1688. FnextPageToken:=AValue;
  1689. MarkPropertyChanged(AIndex);
  1690. end;
  1691. Procedure TCommentList.SetprevPageToken(AIndex : Integer; const AValue : String);
  1692. begin
  1693. If (FprevPageToken=AValue) then exit;
  1694. FprevPageToken:=AValue;
  1695. MarkPropertyChanged(AIndex);
  1696. end;
  1697. //2.6.4. bug workaround
  1698. {$IFDEF VER2_6}
  1699. Procedure TCommentList.SetArrayLength(Const AName : String; ALength : Longint);
  1700. begin
  1701. Case AName of
  1702. 'items' : SetLength(Fitems,ALength);
  1703. else
  1704. Inherited SetArrayLength(AName,ALength);
  1705. end;
  1706. end;
  1707. {$ENDIF VER2_6}
  1708. { --------------------------------------------------------------------
  1709. TPageTypeauthorTypeimage
  1710. --------------------------------------------------------------------}
  1711. Procedure TPageTypeauthorTypeimage.Seturl(AIndex : Integer; const AValue : String);
  1712. begin
  1713. If (Furl=AValue) then exit;
  1714. Furl:=AValue;
  1715. MarkPropertyChanged(AIndex);
  1716. end;
  1717. { --------------------------------------------------------------------
  1718. TPageTypeauthor
  1719. --------------------------------------------------------------------}
  1720. Procedure TPageTypeauthor.SetdisplayName(AIndex : Integer; const AValue : String);
  1721. begin
  1722. If (FdisplayName=AValue) then exit;
  1723. FdisplayName:=AValue;
  1724. MarkPropertyChanged(AIndex);
  1725. end;
  1726. Procedure TPageTypeauthor.Setid(AIndex : Integer; const AValue : String);
  1727. begin
  1728. If (Fid=AValue) then exit;
  1729. Fid:=AValue;
  1730. MarkPropertyChanged(AIndex);
  1731. end;
  1732. Procedure TPageTypeauthor.Setimage(AIndex : Integer; const AValue : TPageTypeauthorTypeimage);
  1733. begin
  1734. If (Fimage=AValue) then exit;
  1735. Fimage:=AValue;
  1736. MarkPropertyChanged(AIndex);
  1737. end;
  1738. Procedure TPageTypeauthor.Seturl(AIndex : Integer; const AValue : String);
  1739. begin
  1740. If (Furl=AValue) then exit;
  1741. Furl:=AValue;
  1742. MarkPropertyChanged(AIndex);
  1743. end;
  1744. { --------------------------------------------------------------------
  1745. TPageTypeblog
  1746. --------------------------------------------------------------------}
  1747. Procedure TPageTypeblog.Setid(AIndex : Integer; const AValue : String);
  1748. begin
  1749. If (Fid=AValue) then exit;
  1750. Fid:=AValue;
  1751. MarkPropertyChanged(AIndex);
  1752. end;
  1753. { --------------------------------------------------------------------
  1754. TPage
  1755. --------------------------------------------------------------------}
  1756. Procedure TPage.Setauthor(AIndex : Integer; const AValue : TPageTypeauthor);
  1757. begin
  1758. If (Fauthor=AValue) then exit;
  1759. Fauthor:=AValue;
  1760. MarkPropertyChanged(AIndex);
  1761. end;
  1762. Procedure TPage.Setblog(AIndex : Integer; const AValue : TPageTypeblog);
  1763. begin
  1764. If (Fblog=AValue) then exit;
  1765. Fblog:=AValue;
  1766. MarkPropertyChanged(AIndex);
  1767. end;
  1768. Procedure TPage.Setcontent(AIndex : Integer; const AValue : String);
  1769. begin
  1770. If (Fcontent=AValue) then exit;
  1771. Fcontent:=AValue;
  1772. MarkPropertyChanged(AIndex);
  1773. end;
  1774. Procedure TPage.Setetag(AIndex : Integer; const AValue : String);
  1775. begin
  1776. If (Fetag=AValue) then exit;
  1777. Fetag:=AValue;
  1778. MarkPropertyChanged(AIndex);
  1779. end;
  1780. Procedure TPage.Setid(AIndex : Integer; const AValue : String);
  1781. begin
  1782. If (Fid=AValue) then exit;
  1783. Fid:=AValue;
  1784. MarkPropertyChanged(AIndex);
  1785. end;
  1786. Procedure TPage.Setkind(AIndex : Integer; const AValue : String);
  1787. begin
  1788. If (Fkind=AValue) then exit;
  1789. Fkind:=AValue;
  1790. MarkPropertyChanged(AIndex);
  1791. end;
  1792. Procedure TPage.Set_published(AIndex : Integer; const AValue : TDatetime);
  1793. begin
  1794. If (F_published=AValue) then exit;
  1795. F_published:=AValue;
  1796. MarkPropertyChanged(AIndex);
  1797. end;
  1798. Procedure TPage.SetselfLink(AIndex : Integer; const AValue : String);
  1799. begin
  1800. If (FselfLink=AValue) then exit;
  1801. FselfLink:=AValue;
  1802. MarkPropertyChanged(AIndex);
  1803. end;
  1804. Procedure TPage.Setstatus(AIndex : Integer; const AValue : String);
  1805. begin
  1806. If (Fstatus=AValue) then exit;
  1807. Fstatus:=AValue;
  1808. MarkPropertyChanged(AIndex);
  1809. end;
  1810. Procedure TPage.Settitle(AIndex : Integer; const AValue : String);
  1811. begin
  1812. If (Ftitle=AValue) then exit;
  1813. Ftitle:=AValue;
  1814. MarkPropertyChanged(AIndex);
  1815. end;
  1816. Procedure TPage.Setupdated(AIndex : Integer; const AValue : TDatetime);
  1817. begin
  1818. If (Fupdated=AValue) then exit;
  1819. Fupdated:=AValue;
  1820. MarkPropertyChanged(AIndex);
  1821. end;
  1822. Procedure TPage.Seturl(AIndex : Integer; const AValue : String);
  1823. begin
  1824. If (Furl=AValue) then exit;
  1825. Furl:=AValue;
  1826. MarkPropertyChanged(AIndex);
  1827. end;
  1828. Class Function TPage.ExportPropertyName(Const AName : String) :String;
  1829. begin
  1830. Case AName of
  1831. '_published' : Result:='published';
  1832. else
  1833. Result:=Inherited ExportPropertyName(AName);
  1834. end;
  1835. end;
  1836. { --------------------------------------------------------------------
  1837. TPageList
  1838. --------------------------------------------------------------------}
  1839. Procedure TPageList.Setetag(AIndex : Integer; const AValue : String);
  1840. begin
  1841. If (Fetag=AValue) then exit;
  1842. Fetag:=AValue;
  1843. MarkPropertyChanged(AIndex);
  1844. end;
  1845. Procedure TPageList.Setitems(AIndex : Integer; const AValue : TPageListTypeitemsArray);
  1846. begin
  1847. If (Fitems=AValue) then exit;
  1848. Fitems:=AValue;
  1849. MarkPropertyChanged(AIndex);
  1850. end;
  1851. Procedure TPageList.Setkind(AIndex : Integer; const AValue : String);
  1852. begin
  1853. If (Fkind=AValue) then exit;
  1854. Fkind:=AValue;
  1855. MarkPropertyChanged(AIndex);
  1856. end;
  1857. Procedure TPageList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1858. begin
  1859. If (FnextPageToken=AValue) then exit;
  1860. FnextPageToken:=AValue;
  1861. MarkPropertyChanged(AIndex);
  1862. end;
  1863. //2.6.4. bug workaround
  1864. {$IFDEF VER2_6}
  1865. Procedure TPageList.SetArrayLength(Const AName : String; ALength : Longint);
  1866. begin
  1867. Case AName of
  1868. 'items' : SetLength(Fitems,ALength);
  1869. else
  1870. Inherited SetArrayLength(AName,ALength);
  1871. end;
  1872. end;
  1873. {$ENDIF VER2_6}
  1874. { --------------------------------------------------------------------
  1875. TPageviewsTypecountsItem
  1876. --------------------------------------------------------------------}
  1877. Procedure TPageviewsTypecountsItem.Setcount(AIndex : Integer; const AValue : String);
  1878. begin
  1879. If (Fcount=AValue) then exit;
  1880. Fcount:=AValue;
  1881. MarkPropertyChanged(AIndex);
  1882. end;
  1883. Procedure TPageviewsTypecountsItem.SettimeRange(AIndex : Integer; const AValue : String);
  1884. begin
  1885. If (FtimeRange=AValue) then exit;
  1886. FtimeRange:=AValue;
  1887. MarkPropertyChanged(AIndex);
  1888. end;
  1889. { --------------------------------------------------------------------
  1890. TPageviews
  1891. --------------------------------------------------------------------}
  1892. Procedure TPageviews.SetblogId(AIndex : Integer; const AValue : String);
  1893. begin
  1894. If (FblogId=AValue) then exit;
  1895. FblogId:=AValue;
  1896. MarkPropertyChanged(AIndex);
  1897. end;
  1898. Procedure TPageviews.Setcounts(AIndex : Integer; const AValue : TPageviewsTypecountsArray);
  1899. begin
  1900. If (Fcounts=AValue) then exit;
  1901. Fcounts:=AValue;
  1902. MarkPropertyChanged(AIndex);
  1903. end;
  1904. Procedure TPageviews.Setkind(AIndex : Integer; const AValue : String);
  1905. begin
  1906. If (Fkind=AValue) then exit;
  1907. Fkind:=AValue;
  1908. MarkPropertyChanged(AIndex);
  1909. end;
  1910. //2.6.4. bug workaround
  1911. {$IFDEF VER2_6}
  1912. Procedure TPageviews.SetArrayLength(Const AName : String; ALength : Longint);
  1913. begin
  1914. Case AName of
  1915. 'counts' : SetLength(Fcounts,ALength);
  1916. else
  1917. Inherited SetArrayLength(AName,ALength);
  1918. end;
  1919. end;
  1920. {$ENDIF VER2_6}
  1921. { --------------------------------------------------------------------
  1922. TPostTypeauthorTypeimage
  1923. --------------------------------------------------------------------}
  1924. Procedure TPostTypeauthorTypeimage.Seturl(AIndex : Integer; const AValue : String);
  1925. begin
  1926. If (Furl=AValue) then exit;
  1927. Furl:=AValue;
  1928. MarkPropertyChanged(AIndex);
  1929. end;
  1930. { --------------------------------------------------------------------
  1931. TPostTypeauthor
  1932. --------------------------------------------------------------------}
  1933. Procedure TPostTypeauthor.SetdisplayName(AIndex : Integer; const AValue : String);
  1934. begin
  1935. If (FdisplayName=AValue) then exit;
  1936. FdisplayName:=AValue;
  1937. MarkPropertyChanged(AIndex);
  1938. end;
  1939. Procedure TPostTypeauthor.Setid(AIndex : Integer; const AValue : String);
  1940. begin
  1941. If (Fid=AValue) then exit;
  1942. Fid:=AValue;
  1943. MarkPropertyChanged(AIndex);
  1944. end;
  1945. Procedure TPostTypeauthor.Setimage(AIndex : Integer; const AValue : TPostTypeauthorTypeimage);
  1946. begin
  1947. If (Fimage=AValue) then exit;
  1948. Fimage:=AValue;
  1949. MarkPropertyChanged(AIndex);
  1950. end;
  1951. Procedure TPostTypeauthor.Seturl(AIndex : Integer; const AValue : String);
  1952. begin
  1953. If (Furl=AValue) then exit;
  1954. Furl:=AValue;
  1955. MarkPropertyChanged(AIndex);
  1956. end;
  1957. { --------------------------------------------------------------------
  1958. TPostTypeblog
  1959. --------------------------------------------------------------------}
  1960. Procedure TPostTypeblog.Setid(AIndex : Integer; const AValue : String);
  1961. begin
  1962. If (Fid=AValue) then exit;
  1963. Fid:=AValue;
  1964. MarkPropertyChanged(AIndex);
  1965. end;
  1966. { --------------------------------------------------------------------
  1967. TPostTypeimagesItem
  1968. --------------------------------------------------------------------}
  1969. Procedure TPostTypeimagesItem.Seturl(AIndex : Integer; const AValue : String);
  1970. begin
  1971. If (Furl=AValue) then exit;
  1972. Furl:=AValue;
  1973. MarkPropertyChanged(AIndex);
  1974. end;
  1975. { --------------------------------------------------------------------
  1976. TPostTypelocation
  1977. --------------------------------------------------------------------}
  1978. Procedure TPostTypelocation.Setlat(AIndex : Integer; const AValue : double);
  1979. begin
  1980. If (Flat=AValue) then exit;
  1981. Flat:=AValue;
  1982. MarkPropertyChanged(AIndex);
  1983. end;
  1984. Procedure TPostTypelocation.Setlng(AIndex : Integer; const AValue : double);
  1985. begin
  1986. If (Flng=AValue) then exit;
  1987. Flng:=AValue;
  1988. MarkPropertyChanged(AIndex);
  1989. end;
  1990. Procedure TPostTypelocation.Setname(AIndex : Integer; const AValue : String);
  1991. begin
  1992. If (Fname=AValue) then exit;
  1993. Fname:=AValue;
  1994. MarkPropertyChanged(AIndex);
  1995. end;
  1996. Procedure TPostTypelocation.Setspan(AIndex : Integer; const AValue : String);
  1997. begin
  1998. If (Fspan=AValue) then exit;
  1999. Fspan:=AValue;
  2000. MarkPropertyChanged(AIndex);
  2001. end;
  2002. { --------------------------------------------------------------------
  2003. TPostTypereplies
  2004. --------------------------------------------------------------------}
  2005. Procedure TPostTypereplies.Setitems(AIndex : Integer; const AValue : TPostTyperepliesTypeitemsArray);
  2006. begin
  2007. If (Fitems=AValue) then exit;
  2008. Fitems:=AValue;
  2009. MarkPropertyChanged(AIndex);
  2010. end;
  2011. Procedure TPostTypereplies.SetselfLink(AIndex : Integer; const AValue : String);
  2012. begin
  2013. If (FselfLink=AValue) then exit;
  2014. FselfLink:=AValue;
  2015. MarkPropertyChanged(AIndex);
  2016. end;
  2017. Procedure TPostTypereplies.SettotalItems(AIndex : Integer; const AValue : String);
  2018. begin
  2019. If (FtotalItems=AValue) then exit;
  2020. FtotalItems:=AValue;
  2021. MarkPropertyChanged(AIndex);
  2022. end;
  2023. //2.6.4. bug workaround
  2024. {$IFDEF VER2_6}
  2025. Procedure TPostTypereplies.SetArrayLength(Const AName : String; ALength : Longint);
  2026. begin
  2027. Case AName of
  2028. 'items' : SetLength(Fitems,ALength);
  2029. else
  2030. Inherited SetArrayLength(AName,ALength);
  2031. end;
  2032. end;
  2033. {$ENDIF VER2_6}
  2034. { --------------------------------------------------------------------
  2035. TPost
  2036. --------------------------------------------------------------------}
  2037. Procedure TPost.Setauthor(AIndex : Integer; const AValue : TPostTypeauthor);
  2038. begin
  2039. If (Fauthor=AValue) then exit;
  2040. Fauthor:=AValue;
  2041. MarkPropertyChanged(AIndex);
  2042. end;
  2043. Procedure TPost.Setblog(AIndex : Integer; const AValue : TPostTypeblog);
  2044. begin
  2045. If (Fblog=AValue) then exit;
  2046. Fblog:=AValue;
  2047. MarkPropertyChanged(AIndex);
  2048. end;
  2049. Procedure TPost.Setcontent(AIndex : Integer; const AValue : String);
  2050. begin
  2051. If (Fcontent=AValue) then exit;
  2052. Fcontent:=AValue;
  2053. MarkPropertyChanged(AIndex);
  2054. end;
  2055. Procedure TPost.SetcustomMetaData(AIndex : Integer; const AValue : String);
  2056. begin
  2057. If (FcustomMetaData=AValue) then exit;
  2058. FcustomMetaData:=AValue;
  2059. MarkPropertyChanged(AIndex);
  2060. end;
  2061. Procedure TPost.Setetag(AIndex : Integer; const AValue : String);
  2062. begin
  2063. If (Fetag=AValue) then exit;
  2064. Fetag:=AValue;
  2065. MarkPropertyChanged(AIndex);
  2066. end;
  2067. Procedure TPost.Setid(AIndex : Integer; const AValue : String);
  2068. begin
  2069. If (Fid=AValue) then exit;
  2070. Fid:=AValue;
  2071. MarkPropertyChanged(AIndex);
  2072. end;
  2073. Procedure TPost.Setimages(AIndex : Integer; const AValue : TPostTypeimagesArray);
  2074. begin
  2075. If (Fimages=AValue) then exit;
  2076. Fimages:=AValue;
  2077. MarkPropertyChanged(AIndex);
  2078. end;
  2079. Procedure TPost.Setkind(AIndex : Integer; const AValue : String);
  2080. begin
  2081. If (Fkind=AValue) then exit;
  2082. Fkind:=AValue;
  2083. MarkPropertyChanged(AIndex);
  2084. end;
  2085. Procedure TPost.Setlabels(AIndex : Integer; const AValue : TStringArray);
  2086. begin
  2087. If (Flabels=AValue) then exit;
  2088. Flabels:=AValue;
  2089. MarkPropertyChanged(AIndex);
  2090. end;
  2091. Procedure TPost.Setlocation(AIndex : Integer; const AValue : TPostTypelocation);
  2092. begin
  2093. If (Flocation=AValue) then exit;
  2094. Flocation:=AValue;
  2095. MarkPropertyChanged(AIndex);
  2096. end;
  2097. Procedure TPost.Set_published(AIndex : Integer; const AValue : TDatetime);
  2098. begin
  2099. If (F_published=AValue) then exit;
  2100. F_published:=AValue;
  2101. MarkPropertyChanged(AIndex);
  2102. end;
  2103. Procedure TPost.SetreaderComments(AIndex : Integer; const AValue : String);
  2104. begin
  2105. If (FreaderComments=AValue) then exit;
  2106. FreaderComments:=AValue;
  2107. MarkPropertyChanged(AIndex);
  2108. end;
  2109. Procedure TPost.Setreplies(AIndex : Integer; const AValue : TPostTypereplies);
  2110. begin
  2111. If (Freplies=AValue) then exit;
  2112. Freplies:=AValue;
  2113. MarkPropertyChanged(AIndex);
  2114. end;
  2115. Procedure TPost.SetselfLink(AIndex : Integer; const AValue : String);
  2116. begin
  2117. If (FselfLink=AValue) then exit;
  2118. FselfLink:=AValue;
  2119. MarkPropertyChanged(AIndex);
  2120. end;
  2121. Procedure TPost.Setstatus(AIndex : Integer; const AValue : String);
  2122. begin
  2123. If (Fstatus=AValue) then exit;
  2124. Fstatus:=AValue;
  2125. MarkPropertyChanged(AIndex);
  2126. end;
  2127. Procedure TPost.Settitle(AIndex : Integer; const AValue : String);
  2128. begin
  2129. If (Ftitle=AValue) then exit;
  2130. Ftitle:=AValue;
  2131. MarkPropertyChanged(AIndex);
  2132. end;
  2133. Procedure TPost.SettitleLink(AIndex : Integer; const AValue : String);
  2134. begin
  2135. If (FtitleLink=AValue) then exit;
  2136. FtitleLink:=AValue;
  2137. MarkPropertyChanged(AIndex);
  2138. end;
  2139. Procedure TPost.Setupdated(AIndex : Integer; const AValue : TDatetime);
  2140. begin
  2141. If (Fupdated=AValue) then exit;
  2142. Fupdated:=AValue;
  2143. MarkPropertyChanged(AIndex);
  2144. end;
  2145. Procedure TPost.Seturl(AIndex : Integer; const AValue : String);
  2146. begin
  2147. If (Furl=AValue) then exit;
  2148. Furl:=AValue;
  2149. MarkPropertyChanged(AIndex);
  2150. end;
  2151. Class Function TPost.ExportPropertyName(Const AName : String) :String;
  2152. begin
  2153. Case AName of
  2154. '_published' : Result:='published';
  2155. else
  2156. Result:=Inherited ExportPropertyName(AName);
  2157. end;
  2158. end;
  2159. //2.6.4. bug workaround
  2160. {$IFDEF VER2_6}
  2161. Procedure TPost.SetArrayLength(Const AName : String; ALength : Longint);
  2162. begin
  2163. Case AName of
  2164. 'images' : SetLength(Fimages,ALength);
  2165. 'labels' : SetLength(Flabels,ALength);
  2166. else
  2167. Inherited SetArrayLength(AName,ALength);
  2168. end;
  2169. end;
  2170. {$ENDIF VER2_6}
  2171. { --------------------------------------------------------------------
  2172. TPostList
  2173. --------------------------------------------------------------------}
  2174. Procedure TPostList.Setetag(AIndex : Integer; const AValue : String);
  2175. begin
  2176. If (Fetag=AValue) then exit;
  2177. Fetag:=AValue;
  2178. MarkPropertyChanged(AIndex);
  2179. end;
  2180. Procedure TPostList.Setitems(AIndex : Integer; const AValue : TPostListTypeitemsArray);
  2181. begin
  2182. If (Fitems=AValue) then exit;
  2183. Fitems:=AValue;
  2184. MarkPropertyChanged(AIndex);
  2185. end;
  2186. Procedure TPostList.Setkind(AIndex : Integer; const AValue : String);
  2187. begin
  2188. If (Fkind=AValue) then exit;
  2189. Fkind:=AValue;
  2190. MarkPropertyChanged(AIndex);
  2191. end;
  2192. Procedure TPostList.SetnextPageToken(AIndex : Integer; const AValue : String);
  2193. begin
  2194. If (FnextPageToken=AValue) then exit;
  2195. FnextPageToken:=AValue;
  2196. MarkPropertyChanged(AIndex);
  2197. end;
  2198. //2.6.4. bug workaround
  2199. {$IFDEF VER2_6}
  2200. Procedure TPostList.SetArrayLength(Const AName : String; ALength : Longint);
  2201. begin
  2202. Case AName of
  2203. 'items' : SetLength(Fitems,ALength);
  2204. else
  2205. Inherited SetArrayLength(AName,ALength);
  2206. end;
  2207. end;
  2208. {$ENDIF VER2_6}
  2209. { --------------------------------------------------------------------
  2210. TPostPerUserInfo
  2211. --------------------------------------------------------------------}
  2212. Procedure TPostPerUserInfo.SetblogId(AIndex : Integer; const AValue : String);
  2213. begin
  2214. If (FblogId=AValue) then exit;
  2215. FblogId:=AValue;
  2216. MarkPropertyChanged(AIndex);
  2217. end;
  2218. Procedure TPostPerUserInfo.SethasEditAccess(AIndex : Integer; const AValue : boolean);
  2219. begin
  2220. If (FhasEditAccess=AValue) then exit;
  2221. FhasEditAccess:=AValue;
  2222. MarkPropertyChanged(AIndex);
  2223. end;
  2224. Procedure TPostPerUserInfo.Setkind(AIndex : Integer; const AValue : String);
  2225. begin
  2226. If (Fkind=AValue) then exit;
  2227. Fkind:=AValue;
  2228. MarkPropertyChanged(AIndex);
  2229. end;
  2230. Procedure TPostPerUserInfo.SetpostId(AIndex : Integer; const AValue : String);
  2231. begin
  2232. If (FpostId=AValue) then exit;
  2233. FpostId:=AValue;
  2234. MarkPropertyChanged(AIndex);
  2235. end;
  2236. Procedure TPostPerUserInfo.SetuserId(AIndex : Integer; const AValue : String);
  2237. begin
  2238. If (FuserId=AValue) then exit;
  2239. FuserId:=AValue;
  2240. MarkPropertyChanged(AIndex);
  2241. end;
  2242. { --------------------------------------------------------------------
  2243. TPostUserInfo
  2244. --------------------------------------------------------------------}
  2245. Procedure TPostUserInfo.Setkind(AIndex : Integer; const AValue : String);
  2246. begin
  2247. If (Fkind=AValue) then exit;
  2248. Fkind:=AValue;
  2249. MarkPropertyChanged(AIndex);
  2250. end;
  2251. Procedure TPostUserInfo.Setpost(AIndex : Integer; const AValue : TPost);
  2252. begin
  2253. If (Fpost=AValue) then exit;
  2254. Fpost:=AValue;
  2255. MarkPropertyChanged(AIndex);
  2256. end;
  2257. Procedure TPostUserInfo.Setpost_user_info(AIndex : Integer; const AValue : TPostPerUserInfo);
  2258. begin
  2259. If (Fpost_user_info=AValue) then exit;
  2260. Fpost_user_info:=AValue;
  2261. MarkPropertyChanged(AIndex);
  2262. end;
  2263. { --------------------------------------------------------------------
  2264. TPostUserInfosList
  2265. --------------------------------------------------------------------}
  2266. Procedure TPostUserInfosList.Setitems(AIndex : Integer; const AValue : TPostUserInfosListTypeitemsArray);
  2267. begin
  2268. If (Fitems=AValue) then exit;
  2269. Fitems:=AValue;
  2270. MarkPropertyChanged(AIndex);
  2271. end;
  2272. Procedure TPostUserInfosList.Setkind(AIndex : Integer; const AValue : String);
  2273. begin
  2274. If (Fkind=AValue) then exit;
  2275. Fkind:=AValue;
  2276. MarkPropertyChanged(AIndex);
  2277. end;
  2278. Procedure TPostUserInfosList.SetnextPageToken(AIndex : Integer; const AValue : String);
  2279. begin
  2280. If (FnextPageToken=AValue) then exit;
  2281. FnextPageToken:=AValue;
  2282. MarkPropertyChanged(AIndex);
  2283. end;
  2284. //2.6.4. bug workaround
  2285. {$IFDEF VER2_6}
  2286. Procedure TPostUserInfosList.SetArrayLength(Const AName : String; ALength : Longint);
  2287. begin
  2288. Case AName of
  2289. 'items' : SetLength(Fitems,ALength);
  2290. else
  2291. Inherited SetArrayLength(AName,ALength);
  2292. end;
  2293. end;
  2294. {$ENDIF VER2_6}
  2295. { --------------------------------------------------------------------
  2296. TUserTypeblogs
  2297. --------------------------------------------------------------------}
  2298. Procedure TUserTypeblogs.SetselfLink(AIndex : Integer; const AValue : String);
  2299. begin
  2300. If (FselfLink=AValue) then exit;
  2301. FselfLink:=AValue;
  2302. MarkPropertyChanged(AIndex);
  2303. end;
  2304. { --------------------------------------------------------------------
  2305. TUserTypelocale
  2306. --------------------------------------------------------------------}
  2307. Procedure TUserTypelocale.Setcountry(AIndex : Integer; const AValue : String);
  2308. begin
  2309. If (Fcountry=AValue) then exit;
  2310. Fcountry:=AValue;
  2311. MarkPropertyChanged(AIndex);
  2312. end;
  2313. Procedure TUserTypelocale.Setlanguage(AIndex : Integer; const AValue : String);
  2314. begin
  2315. If (Flanguage=AValue) then exit;
  2316. Flanguage:=AValue;
  2317. MarkPropertyChanged(AIndex);
  2318. end;
  2319. Procedure TUserTypelocale.Setvariant(AIndex : Integer; const AValue : String);
  2320. begin
  2321. If (Fvariant=AValue) then exit;
  2322. Fvariant:=AValue;
  2323. MarkPropertyChanged(AIndex);
  2324. end;
  2325. { --------------------------------------------------------------------
  2326. TUser
  2327. --------------------------------------------------------------------}
  2328. Procedure TUser.Setabout(AIndex : Integer; const AValue : String);
  2329. begin
  2330. If (Fabout=AValue) then exit;
  2331. Fabout:=AValue;
  2332. MarkPropertyChanged(AIndex);
  2333. end;
  2334. Procedure TUser.Setblogs(AIndex : Integer; const AValue : TUserTypeblogs);
  2335. begin
  2336. If (Fblogs=AValue) then exit;
  2337. Fblogs:=AValue;
  2338. MarkPropertyChanged(AIndex);
  2339. end;
  2340. Procedure TUser.Setcreated(AIndex : Integer; const AValue : TDatetime);
  2341. begin
  2342. If (Fcreated=AValue) then exit;
  2343. Fcreated:=AValue;
  2344. MarkPropertyChanged(AIndex);
  2345. end;
  2346. Procedure TUser.SetdisplayName(AIndex : Integer; const AValue : String);
  2347. begin
  2348. If (FdisplayName=AValue) then exit;
  2349. FdisplayName:=AValue;
  2350. MarkPropertyChanged(AIndex);
  2351. end;
  2352. Procedure TUser.Setid(AIndex : Integer; const AValue : String);
  2353. begin
  2354. If (Fid=AValue) then exit;
  2355. Fid:=AValue;
  2356. MarkPropertyChanged(AIndex);
  2357. end;
  2358. Procedure TUser.Setkind(AIndex : Integer; const AValue : String);
  2359. begin
  2360. If (Fkind=AValue) then exit;
  2361. Fkind:=AValue;
  2362. MarkPropertyChanged(AIndex);
  2363. end;
  2364. Procedure TUser.Setlocale(AIndex : Integer; const AValue : TUserTypelocale);
  2365. begin
  2366. If (Flocale=AValue) then exit;
  2367. Flocale:=AValue;
  2368. MarkPropertyChanged(AIndex);
  2369. end;
  2370. Procedure TUser.SetselfLink(AIndex : Integer; const AValue : String);
  2371. begin
  2372. If (FselfLink=AValue) then exit;
  2373. FselfLink:=AValue;
  2374. MarkPropertyChanged(AIndex);
  2375. end;
  2376. Procedure TUser.Seturl(AIndex : Integer; const AValue : String);
  2377. begin
  2378. If (Furl=AValue) then exit;
  2379. Furl:=AValue;
  2380. MarkPropertyChanged(AIndex);
  2381. end;
  2382. { --------------------------------------------------------------------
  2383. TBlogUserInfosResource
  2384. --------------------------------------------------------------------}
  2385. Class Function TBlogUserInfosResource.ResourceName : String;
  2386. begin
  2387. Result:='blogUserInfos';
  2388. end;
  2389. Class Function TBlogUserInfosResource.DefaultAPI : TGoogleAPIClass;
  2390. begin
  2391. Result:=TbloggerAPI;
  2392. end;
  2393. Function TBlogUserInfosResource.Get(blogId: string; userId: string; AQuery : string = '') : TBlogUserInfo;
  2394. Const
  2395. _HTTPMethod = 'GET';
  2396. _Path = 'users/{userId}/blogs/{blogId}';
  2397. _Methodid = 'blogger.blogUserInfos.get';
  2398. Var
  2399. _P : String;
  2400. begin
  2401. _P:=SubstitutePath(_Path,['blogId',blogId,'userId',userId]);
  2402. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TBlogUserInfo) as TBlogUserInfo;
  2403. end;
  2404. Function TBlogUserInfosResource.Get(blogId: string; userId: string; AQuery : TBlogUserInfosgetOptions) : TBlogUserInfo;
  2405. Var
  2406. _Q : String;
  2407. begin
  2408. _Q:='';
  2409. AddToQuery(_Q,'maxPosts',AQuery.maxPosts);
  2410. Result:=Get(blogId,userId,_Q);
  2411. end;
  2412. { --------------------------------------------------------------------
  2413. TBlogsResource
  2414. --------------------------------------------------------------------}
  2415. Class Function TBlogsResource.ResourceName : String;
  2416. begin
  2417. Result:='blogs';
  2418. end;
  2419. Class Function TBlogsResource.DefaultAPI : TGoogleAPIClass;
  2420. begin
  2421. Result:=TbloggerAPI;
  2422. end;
  2423. Function TBlogsResource.Get(blogId: string; AQuery : string = '') : TBlog;
  2424. Const
  2425. _HTTPMethod = 'GET';
  2426. _Path = 'blogs/{blogId}';
  2427. _Methodid = 'blogger.blogs.get';
  2428. Var
  2429. _P : String;
  2430. begin
  2431. _P:=SubstitutePath(_Path,['blogId',blogId]);
  2432. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TBlog) as TBlog;
  2433. end;
  2434. Function TBlogsResource.Get(blogId: string; AQuery : TBlogsgetOptions) : TBlog;
  2435. Var
  2436. _Q : String;
  2437. begin
  2438. _Q:='';
  2439. AddToQuery(_Q,'maxPosts',AQuery.maxPosts);
  2440. AddToQuery(_Q,'view',AQuery.view);
  2441. Result:=Get(blogId,_Q);
  2442. end;
  2443. Function TBlogsResource.GetByUrl(AQuery : string = '') : TBlog;
  2444. Const
  2445. _HTTPMethod = 'GET';
  2446. _Path = 'blogs/byurl';
  2447. _Methodid = 'blogger.blogs.getByUrl';
  2448. begin
  2449. Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TBlog) as TBlog;
  2450. end;
  2451. Function TBlogsResource.GetByUrl(AQuery : TBlogsgetByUrlOptions) : TBlog;
  2452. Var
  2453. _Q : String;
  2454. begin
  2455. _Q:='';
  2456. AddToQuery(_Q,'url',AQuery.url);
  2457. AddToQuery(_Q,'view',AQuery.view);
  2458. Result:=GetByUrl(_Q);
  2459. end;
  2460. Function TBlogsResource.ListByUser(userId: string; AQuery : string = '') : TBlogList;
  2461. Const
  2462. _HTTPMethod = 'GET';
  2463. _Path = 'users/{userId}/blogs';
  2464. _Methodid = 'blogger.blogs.listByUser';
  2465. Var
  2466. _P : String;
  2467. begin
  2468. _P:=SubstitutePath(_Path,['userId',userId]);
  2469. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TBlogList) as TBlogList;
  2470. end;
  2471. Function TBlogsResource.ListByUser(userId: string; AQuery : TBlogslistByUserOptions) : TBlogList;
  2472. Var
  2473. _Q : String;
  2474. begin
  2475. _Q:='';
  2476. AddToQuery(_Q,'fetchUserInfo',AQuery.fetchUserInfo);
  2477. AddToQuery(_Q,'role',AQuery.role);
  2478. AddToQuery(_Q,'status',AQuery.status);
  2479. AddToQuery(_Q,'view',AQuery.view);
  2480. Result:=ListByUser(userId,_Q);
  2481. end;
  2482. { --------------------------------------------------------------------
  2483. TCommentsResource
  2484. --------------------------------------------------------------------}
  2485. Class Function TCommentsResource.ResourceName : String;
  2486. begin
  2487. Result:='comments';
  2488. end;
  2489. Class Function TCommentsResource.DefaultAPI : TGoogleAPIClass;
  2490. begin
  2491. Result:=TbloggerAPI;
  2492. end;
  2493. Function TCommentsResource.Approve(blogId: string; commentId: string; postId: string) : TComment;
  2494. Const
  2495. _HTTPMethod = 'POST';
  2496. _Path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}/approve';
  2497. _Methodid = 'blogger.comments.approve';
  2498. Var
  2499. _P : String;
  2500. begin
  2501. _P:=SubstitutePath(_Path,['blogId',blogId,'commentId',commentId,'postId',postId]);
  2502. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TComment) as TComment;
  2503. end;
  2504. Procedure TCommentsResource.Delete(blogId: string; commentId: string; postId: string);
  2505. Const
  2506. _HTTPMethod = 'DELETE';
  2507. _Path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}';
  2508. _Methodid = 'blogger.comments.delete';
  2509. Var
  2510. _P : String;
  2511. begin
  2512. _P:=SubstitutePath(_Path,['blogId',blogId,'commentId',commentId,'postId',postId]);
  2513. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  2514. end;
  2515. Function TCommentsResource.Get(blogId: string; commentId: string; postId: string; AQuery : string = '') : TComment;
  2516. Const
  2517. _HTTPMethod = 'GET';
  2518. _Path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}';
  2519. _Methodid = 'blogger.comments.get';
  2520. Var
  2521. _P : String;
  2522. begin
  2523. _P:=SubstitutePath(_Path,['blogId',blogId,'commentId',commentId,'postId',postId]);
  2524. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TComment) as TComment;
  2525. end;
  2526. Function TCommentsResource.Get(blogId: string; commentId: string; postId: string; AQuery : TCommentsgetOptions) : TComment;
  2527. Var
  2528. _Q : String;
  2529. begin
  2530. _Q:='';
  2531. AddToQuery(_Q,'view',AQuery.view);
  2532. Result:=Get(blogId,commentId,postId,_Q);
  2533. end;
  2534. Function TCommentsResource.List(blogId: string; postId: string; AQuery : string = '') : TCommentList;
  2535. Const
  2536. _HTTPMethod = 'GET';
  2537. _Path = 'blogs/{blogId}/posts/{postId}/comments';
  2538. _Methodid = 'blogger.comments.list';
  2539. Var
  2540. _P : String;
  2541. begin
  2542. _P:=SubstitutePath(_Path,['blogId',blogId,'postId',postId]);
  2543. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TCommentList) as TCommentList;
  2544. end;
  2545. Function TCommentsResource.List(blogId: string; postId: string; AQuery : TCommentslistOptions) : TCommentList;
  2546. Var
  2547. _Q : String;
  2548. begin
  2549. _Q:='';
  2550. AddToQuery(_Q,'endDate',AQuery.endDate);
  2551. AddToQuery(_Q,'fetchBodies',AQuery.fetchBodies);
  2552. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2553. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2554. AddToQuery(_Q,'startDate',AQuery.startDate);
  2555. AddToQuery(_Q,'status',AQuery.status);
  2556. AddToQuery(_Q,'view',AQuery.view);
  2557. Result:=List(blogId,postId,_Q);
  2558. end;
  2559. Function TCommentsResource.ListByBlog(blogId: string; AQuery : string = '') : TCommentList;
  2560. Const
  2561. _HTTPMethod = 'GET';
  2562. _Path = 'blogs/{blogId}/comments';
  2563. _Methodid = 'blogger.comments.listByBlog';
  2564. Var
  2565. _P : String;
  2566. begin
  2567. _P:=SubstitutePath(_Path,['blogId',blogId]);
  2568. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TCommentList) as TCommentList;
  2569. end;
  2570. Function TCommentsResource.ListByBlog(blogId: string; AQuery : TCommentslistByBlogOptions) : TCommentList;
  2571. Var
  2572. _Q : String;
  2573. begin
  2574. _Q:='';
  2575. AddToQuery(_Q,'endDate',AQuery.endDate);
  2576. AddToQuery(_Q,'fetchBodies',AQuery.fetchBodies);
  2577. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2578. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2579. AddToQuery(_Q,'startDate',AQuery.startDate);
  2580. AddToQuery(_Q,'status',AQuery.status);
  2581. Result:=ListByBlog(blogId,_Q);
  2582. end;
  2583. Function TCommentsResource.MarkAsSpam(blogId: string; commentId: string; postId: string) : TComment;
  2584. Const
  2585. _HTTPMethod = 'POST';
  2586. _Path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}/spam';
  2587. _Methodid = 'blogger.comments.markAsSpam';
  2588. Var
  2589. _P : String;
  2590. begin
  2591. _P:=SubstitutePath(_Path,['blogId',blogId,'commentId',commentId,'postId',postId]);
  2592. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TComment) as TComment;
  2593. end;
  2594. Function TCommentsResource.RemoveContent(blogId: string; commentId: string; postId: string) : TComment;
  2595. Const
  2596. _HTTPMethod = 'POST';
  2597. _Path = 'blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent';
  2598. _Methodid = 'blogger.comments.removeContent';
  2599. Var
  2600. _P : String;
  2601. begin
  2602. _P:=SubstitutePath(_Path,['blogId',blogId,'commentId',commentId,'postId',postId]);
  2603. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TComment) as TComment;
  2604. end;
  2605. { --------------------------------------------------------------------
  2606. TPageViewsResource
  2607. --------------------------------------------------------------------}
  2608. Class Function TPageViewsResource.ResourceName : String;
  2609. begin
  2610. Result:='pageViews';
  2611. end;
  2612. Class Function TPageViewsResource.DefaultAPI : TGoogleAPIClass;
  2613. begin
  2614. Result:=TbloggerAPI;
  2615. end;
  2616. Function TPageViewsResource.Get(blogId: string; AQuery : string = '') : TPageviews;
  2617. Const
  2618. _HTTPMethod = 'GET';
  2619. _Path = 'blogs/{blogId}/pageviews';
  2620. _Methodid = 'blogger.pageViews.get';
  2621. Var
  2622. _P : String;
  2623. begin
  2624. _P:=SubstitutePath(_Path,['blogId',blogId]);
  2625. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPageviews) as TPageviews;
  2626. end;
  2627. Function TPageViewsResource.Get(blogId: string; AQuery : TPageViewsgetOptions) : TPageviews;
  2628. Var
  2629. _Q : String;
  2630. begin
  2631. _Q:='';
  2632. AddToQuery(_Q,'range',AQuery.range);
  2633. Result:=Get(blogId,_Q);
  2634. end;
  2635. { --------------------------------------------------------------------
  2636. TPagesResource
  2637. --------------------------------------------------------------------}
  2638. Class Function TPagesResource.ResourceName : String;
  2639. begin
  2640. Result:='pages';
  2641. end;
  2642. Class Function TPagesResource.DefaultAPI : TGoogleAPIClass;
  2643. begin
  2644. Result:=TbloggerAPI;
  2645. end;
  2646. Procedure TPagesResource.Delete(blogId: string; pageId: string);
  2647. Const
  2648. _HTTPMethod = 'DELETE';
  2649. _Path = 'blogs/{blogId}/pages/{pageId}';
  2650. _Methodid = 'blogger.pages.delete';
  2651. Var
  2652. _P : String;
  2653. begin
  2654. _P:=SubstitutePath(_Path,['blogId',blogId,'pageId',pageId]);
  2655. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  2656. end;
  2657. Function TPagesResource.Get(blogId: string; pageId: string; AQuery : string = '') : TPage;
  2658. Const
  2659. _HTTPMethod = 'GET';
  2660. _Path = 'blogs/{blogId}/pages/{pageId}';
  2661. _Methodid = 'blogger.pages.get';
  2662. Var
  2663. _P : String;
  2664. begin
  2665. _P:=SubstitutePath(_Path,['blogId',blogId,'pageId',pageId]);
  2666. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPage) as TPage;
  2667. end;
  2668. Function TPagesResource.Get(blogId: string; pageId: string; AQuery : TPagesgetOptions) : TPage;
  2669. Var
  2670. _Q : String;
  2671. begin
  2672. _Q:='';
  2673. AddToQuery(_Q,'view',AQuery.view);
  2674. Result:=Get(blogId,pageId,_Q);
  2675. end;
  2676. Function TPagesResource.Insert(blogId: string; aPage : TPage; AQuery : string = '') : TPage;
  2677. Const
  2678. _HTTPMethod = 'POST';
  2679. _Path = 'blogs/{blogId}/pages';
  2680. _Methodid = 'blogger.pages.insert';
  2681. Var
  2682. _P : String;
  2683. begin
  2684. _P:=SubstitutePath(_Path,['blogId',blogId]);
  2685. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aPage,TPage) as TPage;
  2686. end;
  2687. Function TPagesResource.Insert(blogId: string; aPage : TPage; AQuery : TPagesinsertOptions) : TPage;
  2688. Var
  2689. _Q : String;
  2690. begin
  2691. _Q:='';
  2692. AddToQuery(_Q,'isDraft',AQuery.isDraft);
  2693. Result:=Insert(blogId,aPage,_Q);
  2694. end;
  2695. Function TPagesResource.List(blogId: string; AQuery : string = '') : TPageList;
  2696. Const
  2697. _HTTPMethod = 'GET';
  2698. _Path = 'blogs/{blogId}/pages';
  2699. _Methodid = 'blogger.pages.list';
  2700. Var
  2701. _P : String;
  2702. begin
  2703. _P:=SubstitutePath(_Path,['blogId',blogId]);
  2704. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPageList) as TPageList;
  2705. end;
  2706. Function TPagesResource.List(blogId: string; AQuery : TPageslistOptions) : TPageList;
  2707. Var
  2708. _Q : String;
  2709. begin
  2710. _Q:='';
  2711. AddToQuery(_Q,'fetchBodies',AQuery.fetchBodies);
  2712. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2713. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2714. AddToQuery(_Q,'status',AQuery.status);
  2715. AddToQuery(_Q,'view',AQuery.view);
  2716. Result:=List(blogId,_Q);
  2717. end;
  2718. Function TPagesResource.Patch(blogId: string; pageId: string; aPage : TPage; AQuery : string = '') : TPage;
  2719. Const
  2720. _HTTPMethod = 'PATCH';
  2721. _Path = 'blogs/{blogId}/pages/{pageId}';
  2722. _Methodid = 'blogger.pages.patch';
  2723. Var
  2724. _P : String;
  2725. begin
  2726. _P:=SubstitutePath(_Path,['blogId',blogId,'pageId',pageId]);
  2727. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aPage,TPage) as TPage;
  2728. end;
  2729. Function TPagesResource.Patch(blogId: string; pageId: string; aPage : TPage; AQuery : TPagespatchOptions) : TPage;
  2730. Var
  2731. _Q : String;
  2732. begin
  2733. _Q:='';
  2734. AddToQuery(_Q,'publish',AQuery.publish);
  2735. AddToQuery(_Q,'revert',AQuery.revert);
  2736. Result:=Patch(blogId,pageId,aPage,_Q);
  2737. end;
  2738. Function TPagesResource.Publish(blogId: string; pageId: string) : TPage;
  2739. Const
  2740. _HTTPMethod = 'POST';
  2741. _Path = 'blogs/{blogId}/pages/{pageId}/publish';
  2742. _Methodid = 'blogger.pages.publish';
  2743. Var
  2744. _P : String;
  2745. begin
  2746. _P:=SubstitutePath(_Path,['blogId',blogId,'pageId',pageId]);
  2747. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPage) as TPage;
  2748. end;
  2749. Function TPagesResource.Revert(blogId: string; pageId: string) : TPage;
  2750. Const
  2751. _HTTPMethod = 'POST';
  2752. _Path = 'blogs/{blogId}/pages/{pageId}/revert';
  2753. _Methodid = 'blogger.pages.revert';
  2754. Var
  2755. _P : String;
  2756. begin
  2757. _P:=SubstitutePath(_Path,['blogId',blogId,'pageId',pageId]);
  2758. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPage) as TPage;
  2759. end;
  2760. Function TPagesResource.Update(blogId: string; pageId: string; aPage : TPage; AQuery : string = '') : TPage;
  2761. Const
  2762. _HTTPMethod = 'PUT';
  2763. _Path = 'blogs/{blogId}/pages/{pageId}';
  2764. _Methodid = 'blogger.pages.update';
  2765. Var
  2766. _P : String;
  2767. begin
  2768. _P:=SubstitutePath(_Path,['blogId',blogId,'pageId',pageId]);
  2769. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aPage,TPage) as TPage;
  2770. end;
  2771. Function TPagesResource.Update(blogId: string; pageId: string; aPage : TPage; AQuery : TPagesupdateOptions) : TPage;
  2772. Var
  2773. _Q : String;
  2774. begin
  2775. _Q:='';
  2776. AddToQuery(_Q,'publish',AQuery.publish);
  2777. AddToQuery(_Q,'revert',AQuery.revert);
  2778. Result:=Update(blogId,pageId,aPage,_Q);
  2779. end;
  2780. { --------------------------------------------------------------------
  2781. TPostUserInfosResource
  2782. --------------------------------------------------------------------}
  2783. Class Function TPostUserInfosResource.ResourceName : String;
  2784. begin
  2785. Result:='postUserInfos';
  2786. end;
  2787. Class Function TPostUserInfosResource.DefaultAPI : TGoogleAPIClass;
  2788. begin
  2789. Result:=TbloggerAPI;
  2790. end;
  2791. Function TPostUserInfosResource.Get(blogId: string; postId: string; userId: string; AQuery : string = '') : TPostUserInfo;
  2792. Const
  2793. _HTTPMethod = 'GET';
  2794. _Path = 'users/{userId}/blogs/{blogId}/posts/{postId}';
  2795. _Methodid = 'blogger.postUserInfos.get';
  2796. Var
  2797. _P : String;
  2798. begin
  2799. _P:=SubstitutePath(_Path,['blogId',blogId,'postId',postId,'userId',userId]);
  2800. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPostUserInfo) as TPostUserInfo;
  2801. end;
  2802. Function TPostUserInfosResource.Get(blogId: string; postId: string; userId: string; AQuery : TPostUserInfosgetOptions) : TPostUserInfo;
  2803. Var
  2804. _Q : String;
  2805. begin
  2806. _Q:='';
  2807. AddToQuery(_Q,'maxComments',AQuery.maxComments);
  2808. Result:=Get(blogId,postId,userId,_Q);
  2809. end;
  2810. Function TPostUserInfosResource.List(blogId: string; userId: string; AQuery : string = '') : TPostUserInfosList;
  2811. Const
  2812. _HTTPMethod = 'GET';
  2813. _Path = 'users/{userId}/blogs/{blogId}/posts';
  2814. _Methodid = 'blogger.postUserInfos.list';
  2815. Var
  2816. _P : String;
  2817. begin
  2818. _P:=SubstitutePath(_Path,['blogId',blogId,'userId',userId]);
  2819. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPostUserInfosList) as TPostUserInfosList;
  2820. end;
  2821. Function TPostUserInfosResource.List(blogId: string; userId: string; AQuery : TPostUserInfoslistOptions) : TPostUserInfosList;
  2822. Var
  2823. _Q : String;
  2824. begin
  2825. _Q:='';
  2826. AddToQuery(_Q,'endDate',AQuery.endDate);
  2827. AddToQuery(_Q,'fetchBodies',AQuery.fetchBodies);
  2828. AddToQuery(_Q,'labels',AQuery.labels);
  2829. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2830. AddToQuery(_Q,'orderBy',AQuery.orderBy);
  2831. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2832. AddToQuery(_Q,'startDate',AQuery.startDate);
  2833. AddToQuery(_Q,'status',AQuery.status);
  2834. AddToQuery(_Q,'view',AQuery.view);
  2835. Result:=List(blogId,userId,_Q);
  2836. end;
  2837. { --------------------------------------------------------------------
  2838. TPostsResource
  2839. --------------------------------------------------------------------}
  2840. Class Function TPostsResource.ResourceName : String;
  2841. begin
  2842. Result:='posts';
  2843. end;
  2844. Class Function TPostsResource.DefaultAPI : TGoogleAPIClass;
  2845. begin
  2846. Result:=TbloggerAPI;
  2847. end;
  2848. Procedure TPostsResource.Delete(blogId: string; postId: string);
  2849. Const
  2850. _HTTPMethod = 'DELETE';
  2851. _Path = 'blogs/{blogId}/posts/{postId}';
  2852. _Methodid = 'blogger.posts.delete';
  2853. Var
  2854. _P : String;
  2855. begin
  2856. _P:=SubstitutePath(_Path,['blogId',blogId,'postId',postId]);
  2857. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  2858. end;
  2859. Function TPostsResource.Get(blogId: string; postId: string; AQuery : string = '') : TPost;
  2860. Const
  2861. _HTTPMethod = 'GET';
  2862. _Path = 'blogs/{blogId}/posts/{postId}';
  2863. _Methodid = 'blogger.posts.get';
  2864. Var
  2865. _P : String;
  2866. begin
  2867. _P:=SubstitutePath(_Path,['blogId',blogId,'postId',postId]);
  2868. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPost) as TPost;
  2869. end;
  2870. Function TPostsResource.Get(blogId: string; postId: string; AQuery : TPostsgetOptions) : TPost;
  2871. Var
  2872. _Q : String;
  2873. begin
  2874. _Q:='';
  2875. AddToQuery(_Q,'fetchBody',AQuery.fetchBody);
  2876. AddToQuery(_Q,'fetchImages',AQuery.fetchImages);
  2877. AddToQuery(_Q,'maxComments',AQuery.maxComments);
  2878. AddToQuery(_Q,'view',AQuery.view);
  2879. Result:=Get(blogId,postId,_Q);
  2880. end;
  2881. Function TPostsResource.GetByPath(blogId: string; AQuery : string = '') : TPost;
  2882. Const
  2883. _HTTPMethod = 'GET';
  2884. _Path = 'blogs/{blogId}/posts/bypath';
  2885. _Methodid = 'blogger.posts.getByPath';
  2886. Var
  2887. _P : String;
  2888. begin
  2889. _P:=SubstitutePath(_Path,['blogId',blogId]);
  2890. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPost) as TPost;
  2891. end;
  2892. Function TPostsResource.GetByPath(blogId: string; AQuery : TPostsgetByPathOptions) : TPost;
  2893. Var
  2894. _Q : String;
  2895. begin
  2896. _Q:='';
  2897. AddToQuery(_Q,'maxComments',AQuery.maxComments);
  2898. AddToQuery(_Q,'path',AQuery.path);
  2899. AddToQuery(_Q,'view',AQuery.view);
  2900. Result:=GetByPath(blogId,_Q);
  2901. end;
  2902. Function TPostsResource.Insert(blogId: string; aPost : TPost; AQuery : string = '') : TPost;
  2903. Const
  2904. _HTTPMethod = 'POST';
  2905. _Path = 'blogs/{blogId}/posts';
  2906. _Methodid = 'blogger.posts.insert';
  2907. Var
  2908. _P : String;
  2909. begin
  2910. _P:=SubstitutePath(_Path,['blogId',blogId]);
  2911. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aPost,TPost) as TPost;
  2912. end;
  2913. Function TPostsResource.Insert(blogId: string; aPost : TPost; AQuery : TPostsinsertOptions) : TPost;
  2914. Var
  2915. _Q : String;
  2916. begin
  2917. _Q:='';
  2918. AddToQuery(_Q,'fetchBody',AQuery.fetchBody);
  2919. AddToQuery(_Q,'fetchImages',AQuery.fetchImages);
  2920. AddToQuery(_Q,'isDraft',AQuery.isDraft);
  2921. Result:=Insert(blogId,aPost,_Q);
  2922. end;
  2923. Function TPostsResource.List(blogId: string; AQuery : string = '') : TPostList;
  2924. Const
  2925. _HTTPMethod = 'GET';
  2926. _Path = 'blogs/{blogId}/posts';
  2927. _Methodid = 'blogger.posts.list';
  2928. Var
  2929. _P : String;
  2930. begin
  2931. _P:=SubstitutePath(_Path,['blogId',blogId]);
  2932. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPostList) as TPostList;
  2933. end;
  2934. Function TPostsResource.List(blogId: string; AQuery : TPostslistOptions) : TPostList;
  2935. Var
  2936. _Q : String;
  2937. begin
  2938. _Q:='';
  2939. AddToQuery(_Q,'endDate',AQuery.endDate);
  2940. AddToQuery(_Q,'fetchBodies',AQuery.fetchBodies);
  2941. AddToQuery(_Q,'fetchImages',AQuery.fetchImages);
  2942. AddToQuery(_Q,'labels',AQuery.labels);
  2943. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2944. AddToQuery(_Q,'orderBy',AQuery.orderBy);
  2945. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2946. AddToQuery(_Q,'startDate',AQuery.startDate);
  2947. AddToQuery(_Q,'status',AQuery.status);
  2948. AddToQuery(_Q,'view',AQuery.view);
  2949. Result:=List(blogId,_Q);
  2950. end;
  2951. Function TPostsResource.Patch(blogId: string; postId: string; aPost : TPost; AQuery : string = '') : TPost;
  2952. Const
  2953. _HTTPMethod = 'PATCH';
  2954. _Path = 'blogs/{blogId}/posts/{postId}';
  2955. _Methodid = 'blogger.posts.patch';
  2956. Var
  2957. _P : String;
  2958. begin
  2959. _P:=SubstitutePath(_Path,['blogId',blogId,'postId',postId]);
  2960. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aPost,TPost) as TPost;
  2961. end;
  2962. Function TPostsResource.Patch(blogId: string; postId: string; aPost : TPost; AQuery : TPostspatchOptions) : TPost;
  2963. Var
  2964. _Q : String;
  2965. begin
  2966. _Q:='';
  2967. AddToQuery(_Q,'fetchBody',AQuery.fetchBody);
  2968. AddToQuery(_Q,'fetchImages',AQuery.fetchImages);
  2969. AddToQuery(_Q,'maxComments',AQuery.maxComments);
  2970. AddToQuery(_Q,'publish',AQuery.publish);
  2971. AddToQuery(_Q,'revert',AQuery.revert);
  2972. Result:=Patch(blogId,postId,aPost,_Q);
  2973. end;
  2974. Function TPostsResource.Publish(blogId: string; postId: string; AQuery : string = '') : TPost;
  2975. Const
  2976. _HTTPMethod = 'POST';
  2977. _Path = 'blogs/{blogId}/posts/{postId}/publish';
  2978. _Methodid = 'blogger.posts.publish';
  2979. Var
  2980. _P : String;
  2981. begin
  2982. _P:=SubstitutePath(_Path,['blogId',blogId,'postId',postId]);
  2983. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPost) as TPost;
  2984. end;
  2985. Function TPostsResource.Publish(blogId: string; postId: string; AQuery : TPostspublishOptions) : TPost;
  2986. Var
  2987. _Q : String;
  2988. begin
  2989. _Q:='';
  2990. AddToQuery(_Q,'publishDate',AQuery.publishDate);
  2991. Result:=Publish(blogId,postId,_Q);
  2992. end;
  2993. Function TPostsResource.Revert(blogId: string; postId: string) : TPost;
  2994. Const
  2995. _HTTPMethod = 'POST';
  2996. _Path = 'blogs/{blogId}/posts/{postId}/revert';
  2997. _Methodid = 'blogger.posts.revert';
  2998. Var
  2999. _P : String;
  3000. begin
  3001. _P:=SubstitutePath(_Path,['blogId',blogId,'postId',postId]);
  3002. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPost) as TPost;
  3003. end;
  3004. Function TPostsResource.Search(blogId: string; AQuery : string = '') : TPostList;
  3005. Const
  3006. _HTTPMethod = 'GET';
  3007. _Path = 'blogs/{blogId}/posts/search';
  3008. _Methodid = 'blogger.posts.search';
  3009. Var
  3010. _P : String;
  3011. begin
  3012. _P:=SubstitutePath(_Path,['blogId',blogId]);
  3013. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPostList) as TPostList;
  3014. end;
  3015. Function TPostsResource.Search(blogId: string; AQuery : TPostssearchOptions) : TPostList;
  3016. Var
  3017. _Q : String;
  3018. begin
  3019. _Q:='';
  3020. AddToQuery(_Q,'fetchBodies',AQuery.fetchBodies);
  3021. AddToQuery(_Q,'orderBy',AQuery.orderBy);
  3022. AddToQuery(_Q,'q',AQuery.q);
  3023. Result:=Search(blogId,_Q);
  3024. end;
  3025. Function TPostsResource.Update(blogId: string; postId: string; aPost : TPost; AQuery : string = '') : TPost;
  3026. Const
  3027. _HTTPMethod = 'PUT';
  3028. _Path = 'blogs/{blogId}/posts/{postId}';
  3029. _Methodid = 'blogger.posts.update';
  3030. Var
  3031. _P : String;
  3032. begin
  3033. _P:=SubstitutePath(_Path,['blogId',blogId,'postId',postId]);
  3034. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aPost,TPost) as TPost;
  3035. end;
  3036. Function TPostsResource.Update(blogId: string; postId: string; aPost : TPost; AQuery : TPostsupdateOptions) : TPost;
  3037. Var
  3038. _Q : String;
  3039. begin
  3040. _Q:='';
  3041. AddToQuery(_Q,'fetchBody',AQuery.fetchBody);
  3042. AddToQuery(_Q,'fetchImages',AQuery.fetchImages);
  3043. AddToQuery(_Q,'maxComments',AQuery.maxComments);
  3044. AddToQuery(_Q,'publish',AQuery.publish);
  3045. AddToQuery(_Q,'revert',AQuery.revert);
  3046. Result:=Update(blogId,postId,aPost,_Q);
  3047. end;
  3048. { --------------------------------------------------------------------
  3049. TUsersResource
  3050. --------------------------------------------------------------------}
  3051. Class Function TUsersResource.ResourceName : String;
  3052. begin
  3053. Result:='users';
  3054. end;
  3055. Class Function TUsersResource.DefaultAPI : TGoogleAPIClass;
  3056. begin
  3057. Result:=TbloggerAPI;
  3058. end;
  3059. Function TUsersResource.Get(userId: string) : TUser;
  3060. Const
  3061. _HTTPMethod = 'GET';
  3062. _Path = 'users/{userId}';
  3063. _Methodid = 'blogger.users.get';
  3064. Var
  3065. _P : String;
  3066. begin
  3067. _P:=SubstitutePath(_Path,['userId',userId]);
  3068. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TUser) as TUser;
  3069. end;
  3070. { --------------------------------------------------------------------
  3071. TBloggerAPI
  3072. --------------------------------------------------------------------}
  3073. Class Function TBloggerAPI.APIName : String;
  3074. begin
  3075. Result:='blogger';
  3076. end;
  3077. Class Function TBloggerAPI.APIVersion : String;
  3078. begin
  3079. Result:='v3';
  3080. end;
  3081. Class Function TBloggerAPI.APIRevision : String;
  3082. begin
  3083. Result:='20150422';
  3084. end;
  3085. Class Function TBloggerAPI.APIID : String;
  3086. begin
  3087. Result:='blogger:v3';
  3088. end;
  3089. Class Function TBloggerAPI.APITitle : String;
  3090. begin
  3091. Result:='Blogger API';
  3092. end;
  3093. Class Function TBloggerAPI.APIDescription : String;
  3094. begin
  3095. Result:='API for access to the data within Blogger.';
  3096. end;
  3097. Class Function TBloggerAPI.APIOwnerDomain : String;
  3098. begin
  3099. Result:='google.com';
  3100. end;
  3101. Class Function TBloggerAPI.APIOwnerName : String;
  3102. begin
  3103. Result:='Google';
  3104. end;
  3105. Class Function TBloggerAPI.APIIcon16 : String;
  3106. begin
  3107. Result:='https://www.google.com/images/icons/product/blogger-16.png';
  3108. end;
  3109. Class Function TBloggerAPI.APIIcon32 : String;
  3110. begin
  3111. Result:='https://www.google.com/images/icons/product/blogger-32.png';
  3112. end;
  3113. Class Function TBloggerAPI.APIdocumentationLink : String;
  3114. begin
  3115. Result:='https://developers.google.com/blogger/docs/3.0/getting_started';
  3116. end;
  3117. Class Function TBloggerAPI.APIrootUrl : string;
  3118. begin
  3119. Result:='https://www.googleapis.com/';
  3120. end;
  3121. Class Function TBloggerAPI.APIbasePath : string;
  3122. begin
  3123. Result:='/blogger/v3/';
  3124. end;
  3125. Class Function TBloggerAPI.APIbaseURL : String;
  3126. begin
  3127. Result:='https://www.googleapis.com/blogger/v3/';
  3128. end;
  3129. Class Function TBloggerAPI.APIProtocol : string;
  3130. begin
  3131. Result:='rest';
  3132. end;
  3133. Class Function TBloggerAPI.APIservicePath : string;
  3134. begin
  3135. Result:='blogger/v3/';
  3136. end;
  3137. Class Function TBloggerAPI.APIbatchPath : String;
  3138. begin
  3139. Result:='batch';
  3140. end;
  3141. Class Function TBloggerAPI.APIAuthScopes : TScopeInfoArray;
  3142. begin
  3143. SetLength(Result,2);
  3144. Result[0].Name:='https://www.googleapis.com/auth/blogger';
  3145. Result[0].Description:='Manage your Blogger account';
  3146. Result[1].Name:='https://www.googleapis.com/auth/blogger.readonly';
  3147. Result[1].Description:='View your Blogger account';
  3148. end;
  3149. Class Function TBloggerAPI.APINeedsAuth : Boolean;
  3150. begin
  3151. Result:=True;
  3152. end;
  3153. Class Procedure TBloggerAPI.RegisterAPIResources;
  3154. begin
  3155. TBlogTypelocale.RegisterObject;
  3156. TBlogTypepages.RegisterObject;
  3157. TBlogTypeposts.RegisterObject;
  3158. TBlog.RegisterObject;
  3159. TBlogList.RegisterObject;
  3160. TBlogPerUserInfo.RegisterObject;
  3161. TBlogUserInfo.RegisterObject;
  3162. TCommentTypeauthorTypeimage.RegisterObject;
  3163. TCommentTypeauthor.RegisterObject;
  3164. TCommentTypeblog.RegisterObject;
  3165. TCommentTypeinReplyTo.RegisterObject;
  3166. TCommentTypepost.RegisterObject;
  3167. TComment.RegisterObject;
  3168. TCommentList.RegisterObject;
  3169. TPageTypeauthorTypeimage.RegisterObject;
  3170. TPageTypeauthor.RegisterObject;
  3171. TPageTypeblog.RegisterObject;
  3172. TPage.RegisterObject;
  3173. TPageList.RegisterObject;
  3174. TPageviewsTypecountsItem.RegisterObject;
  3175. TPageviews.RegisterObject;
  3176. TPostTypeauthorTypeimage.RegisterObject;
  3177. TPostTypeauthor.RegisterObject;
  3178. TPostTypeblog.RegisterObject;
  3179. TPostTypeimagesItem.RegisterObject;
  3180. TPostTypelocation.RegisterObject;
  3181. TPostTypereplies.RegisterObject;
  3182. TPost.RegisterObject;
  3183. TPostList.RegisterObject;
  3184. TPostPerUserInfo.RegisterObject;
  3185. TPostUserInfo.RegisterObject;
  3186. TPostUserInfosList.RegisterObject;
  3187. TUserTypeblogs.RegisterObject;
  3188. TUserTypelocale.RegisterObject;
  3189. TUser.RegisterObject;
  3190. end;
  3191. Function TBloggerAPI.GetBlogUserInfosInstance : TBlogUserInfosResource;
  3192. begin
  3193. if (FBlogUserInfosInstance=Nil) then
  3194. FBlogUserInfosInstance:=CreateBlogUserInfosResource;
  3195. Result:=FBlogUserInfosInstance;
  3196. end;
  3197. Function TBloggerAPI.CreateBlogUserInfosResource : TBlogUserInfosResource;
  3198. begin
  3199. Result:=CreateBlogUserInfosResource(Self);
  3200. end;
  3201. Function TBloggerAPI.CreateBlogUserInfosResource(AOwner : TComponent) : TBlogUserInfosResource;
  3202. begin
  3203. Result:=TBlogUserInfosResource.Create(AOwner);
  3204. Result.API:=Self.API;
  3205. end;
  3206. Function TBloggerAPI.GetBlogsInstance : TBlogsResource;
  3207. begin
  3208. if (FBlogsInstance=Nil) then
  3209. FBlogsInstance:=CreateBlogsResource;
  3210. Result:=FBlogsInstance;
  3211. end;
  3212. Function TBloggerAPI.CreateBlogsResource : TBlogsResource;
  3213. begin
  3214. Result:=CreateBlogsResource(Self);
  3215. end;
  3216. Function TBloggerAPI.CreateBlogsResource(AOwner : TComponent) : TBlogsResource;
  3217. begin
  3218. Result:=TBlogsResource.Create(AOwner);
  3219. Result.API:=Self.API;
  3220. end;
  3221. Function TBloggerAPI.GetCommentsInstance : TCommentsResource;
  3222. begin
  3223. if (FCommentsInstance=Nil) then
  3224. FCommentsInstance:=CreateCommentsResource;
  3225. Result:=FCommentsInstance;
  3226. end;
  3227. Function TBloggerAPI.CreateCommentsResource : TCommentsResource;
  3228. begin
  3229. Result:=CreateCommentsResource(Self);
  3230. end;
  3231. Function TBloggerAPI.CreateCommentsResource(AOwner : TComponent) : TCommentsResource;
  3232. begin
  3233. Result:=TCommentsResource.Create(AOwner);
  3234. Result.API:=Self.API;
  3235. end;
  3236. Function TBloggerAPI.GetPageViewsInstance : TPageViewsResource;
  3237. begin
  3238. if (FPageViewsInstance=Nil) then
  3239. FPageViewsInstance:=CreatePageViewsResource;
  3240. Result:=FPageViewsInstance;
  3241. end;
  3242. Function TBloggerAPI.CreatePageViewsResource : TPageViewsResource;
  3243. begin
  3244. Result:=CreatePageViewsResource(Self);
  3245. end;
  3246. Function TBloggerAPI.CreatePageViewsResource(AOwner : TComponent) : TPageViewsResource;
  3247. begin
  3248. Result:=TPageViewsResource.Create(AOwner);
  3249. Result.API:=Self.API;
  3250. end;
  3251. Function TBloggerAPI.GetPagesInstance : TPagesResource;
  3252. begin
  3253. if (FPagesInstance=Nil) then
  3254. FPagesInstance:=CreatePagesResource;
  3255. Result:=FPagesInstance;
  3256. end;
  3257. Function TBloggerAPI.CreatePagesResource : TPagesResource;
  3258. begin
  3259. Result:=CreatePagesResource(Self);
  3260. end;
  3261. Function TBloggerAPI.CreatePagesResource(AOwner : TComponent) : TPagesResource;
  3262. begin
  3263. Result:=TPagesResource.Create(AOwner);
  3264. Result.API:=Self.API;
  3265. end;
  3266. Function TBloggerAPI.GetPostUserInfosInstance : TPostUserInfosResource;
  3267. begin
  3268. if (FPostUserInfosInstance=Nil) then
  3269. FPostUserInfosInstance:=CreatePostUserInfosResource;
  3270. Result:=FPostUserInfosInstance;
  3271. end;
  3272. Function TBloggerAPI.CreatePostUserInfosResource : TPostUserInfosResource;
  3273. begin
  3274. Result:=CreatePostUserInfosResource(Self);
  3275. end;
  3276. Function TBloggerAPI.CreatePostUserInfosResource(AOwner : TComponent) : TPostUserInfosResource;
  3277. begin
  3278. Result:=TPostUserInfosResource.Create(AOwner);
  3279. Result.API:=Self.API;
  3280. end;
  3281. Function TBloggerAPI.GetPostsInstance : TPostsResource;
  3282. begin
  3283. if (FPostsInstance=Nil) then
  3284. FPostsInstance:=CreatePostsResource;
  3285. Result:=FPostsInstance;
  3286. end;
  3287. Function TBloggerAPI.CreatePostsResource : TPostsResource;
  3288. begin
  3289. Result:=CreatePostsResource(Self);
  3290. end;
  3291. Function TBloggerAPI.CreatePostsResource(AOwner : TComponent) : TPostsResource;
  3292. begin
  3293. Result:=TPostsResource.Create(AOwner);
  3294. Result.API:=Self.API;
  3295. end;
  3296. Function TBloggerAPI.GetUsersInstance : TUsersResource;
  3297. begin
  3298. if (FUsersInstance=Nil) then
  3299. FUsersInstance:=CreateUsersResource;
  3300. Result:=FUsersInstance;
  3301. end;
  3302. Function TBloggerAPI.CreateUsersResource : TUsersResource;
  3303. begin
  3304. Result:=CreateUsersResource(Self);
  3305. end;
  3306. Function TBloggerAPI.CreateUsersResource(AOwner : TComponent) : TUsersResource;
  3307. begin
  3308. Result:=TUsersResource.Create(AOwner);
  3309. Result.API:=Self.API;
  3310. end;
  3311. initialization
  3312. TBloggerAPI.RegisterAPI;
  3313. end.