googleblogger.pp 119 KB

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