123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614 |
- unit googlegamesConfiguration;
- {$MODE objfpc}
- {$H+}
- interface
- uses sysutils, classes, googleservice, restbase, googlebase;
- type
-
- //Top-level schema types
- TAchievementConfiguration = Class;
- TAchievementConfigurationDetail = Class;
- TAchievementConfigurationListResponse = Class;
- TGamesNumberAffixConfiguration = Class;
- TGamesNumberFormatConfiguration = Class;
- TImageConfiguration = Class;
- TLeaderboardConfiguration = Class;
- TLeaderboardConfigurationDetail = Class;
- TLeaderboardConfigurationListResponse = Class;
- TLocalizedString = Class;
- TLocalizedStringBundle = Class;
- TAchievementConfigurationArray = Array of TAchievementConfiguration;
- TAchievementConfigurationDetailArray = Array of TAchievementConfigurationDetail;
- TAchievementConfigurationListResponseArray = Array of TAchievementConfigurationListResponse;
- TGamesNumberAffixConfigurationArray = Array of TGamesNumberAffixConfiguration;
- TGamesNumberFormatConfigurationArray = Array of TGamesNumberFormatConfiguration;
- TImageConfigurationArray = Array of TImageConfiguration;
- TLeaderboardConfigurationArray = Array of TLeaderboardConfiguration;
- TLeaderboardConfigurationDetailArray = Array of TLeaderboardConfigurationDetail;
- TLeaderboardConfigurationListResponseArray = Array of TLeaderboardConfigurationListResponse;
- TLocalizedStringArray = Array of TLocalizedString;
- TLocalizedStringBundleArray = Array of TLocalizedStringBundle;
- //Anonymous types, using auto-generated names
- TAchievementConfigurationListResponseTypeitemsArray = Array of TAchievementConfiguration;
- TLeaderboardConfigurationListResponseTypeitemsArray = Array of TLeaderboardConfiguration;
- TLocalizedStringBundleTypetranslationsArray = Array of TLocalizedString;
-
- { --------------------------------------------------------------------
- TAchievementConfiguration
- --------------------------------------------------------------------}
-
- TAchievementConfiguration = Class(TGoogleBaseObject)
- Private
- FachievementType : String;
- Fdraft : TAchievementConfigurationDetail;
- Fid : String;
- FinitialState : String;
- Fkind : String;
- F_published : TAchievementConfigurationDetail;
- FstepsToUnlock : integer;
- Ftoken : String;
- Protected
- Class Function ExportPropertyName(Const AName : String) : string; override;
- //Property setters
- Procedure SetachievementType(AIndex : Integer; const AValue : String); virtual;
- Procedure Setdraft(AIndex : Integer; const AValue : TAchievementConfigurationDetail); virtual;
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure SetinitialState(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Set_published(AIndex : Integer; const AValue : TAchievementConfigurationDetail); virtual;
- Procedure SetstepsToUnlock(AIndex : Integer; const AValue : integer); virtual;
- Procedure Settoken(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property achievementType : String Index 0 Read FachievementType Write SetachievementType;
- Property draft : TAchievementConfigurationDetail Index 8 Read Fdraft Write Setdraft;
- Property id : String Index 16 Read Fid Write Setid;
- Property initialState : String Index 24 Read FinitialState Write SetinitialState;
- Property kind : String Index 32 Read Fkind Write Setkind;
- Property _published : TAchievementConfigurationDetail Index 40 Read F_published Write Set_published;
- Property stepsToUnlock : integer Index 48 Read FstepsToUnlock Write SetstepsToUnlock;
- Property token : String Index 56 Read Ftoken Write Settoken;
- end;
- TAchievementConfigurationClass = Class of TAchievementConfiguration;
-
- { --------------------------------------------------------------------
- TAchievementConfigurationDetail
- --------------------------------------------------------------------}
-
- TAchievementConfigurationDetail = Class(TGoogleBaseObject)
- Private
- Fdescription : TLocalizedStringBundle;
- FiconUrl : String;
- Fkind : String;
- Fname : TLocalizedStringBundle;
- FpointValue : integer;
- FsortRank : integer;
- Protected
- //Property setters
- Procedure Setdescription(AIndex : Integer; const AValue : TLocalizedStringBundle); virtual;
- Procedure SeticonUrl(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setname(AIndex : Integer; const AValue : TLocalizedStringBundle); virtual;
- Procedure SetpointValue(AIndex : Integer; const AValue : integer); virtual;
- Procedure SetsortRank(AIndex : Integer; const AValue : integer); virtual;
- Public
- Published
- Property description : TLocalizedStringBundle Index 0 Read Fdescription Write Setdescription;
- Property iconUrl : String Index 8 Read FiconUrl Write SeticonUrl;
- Property kind : String Index 16 Read Fkind Write Setkind;
- Property name : TLocalizedStringBundle Index 24 Read Fname Write Setname;
- Property pointValue : integer Index 32 Read FpointValue Write SetpointValue;
- Property sortRank : integer Index 40 Read FsortRank Write SetsortRank;
- end;
- TAchievementConfigurationDetailClass = Class of TAchievementConfigurationDetail;
-
- { --------------------------------------------------------------------
- TAchievementConfigurationListResponse
- --------------------------------------------------------------------}
-
- TAchievementConfigurationListResponse = Class(TGoogleBaseObject)
- Private
- Fitems : TAchievementConfigurationListResponseTypeitemsArray;
- Fkind : String;
- FnextPageToken : String;
- Protected
- //Property setters
- Procedure Setitems(AIndex : Integer; const AValue : TAchievementConfigurationListResponseTypeitemsArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property items : TAchievementConfigurationListResponseTypeitemsArray Index 0 Read Fitems Write Setitems;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
- end;
- TAchievementConfigurationListResponseClass = Class of TAchievementConfigurationListResponse;
-
- { --------------------------------------------------------------------
- TGamesNumberAffixConfiguration
- --------------------------------------------------------------------}
-
- TGamesNumberAffixConfiguration = Class(TGoogleBaseObject)
- Private
- Ffew : TLocalizedStringBundle;
- Fmany : TLocalizedStringBundle;
- Fone : TLocalizedStringBundle;
- Fother : TLocalizedStringBundle;
- Ftwo : TLocalizedStringBundle;
- Fzero : TLocalizedStringBundle;
- Protected
- //Property setters
- Procedure Setfew(AIndex : Integer; const AValue : TLocalizedStringBundle); virtual;
- Procedure Setmany(AIndex : Integer; const AValue : TLocalizedStringBundle); virtual;
- Procedure Setone(AIndex : Integer; const AValue : TLocalizedStringBundle); virtual;
- Procedure Setother(AIndex : Integer; const AValue : TLocalizedStringBundle); virtual;
- Procedure Settwo(AIndex : Integer; const AValue : TLocalizedStringBundle); virtual;
- Procedure Setzero(AIndex : Integer; const AValue : TLocalizedStringBundle); virtual;
- Public
- Published
- Property few : TLocalizedStringBundle Index 0 Read Ffew Write Setfew;
- Property many : TLocalizedStringBundle Index 8 Read Fmany Write Setmany;
- Property one : TLocalizedStringBundle Index 16 Read Fone Write Setone;
- Property other : TLocalizedStringBundle Index 24 Read Fother Write Setother;
- Property two : TLocalizedStringBundle Index 32 Read Ftwo Write Settwo;
- Property zero : TLocalizedStringBundle Index 40 Read Fzero Write Setzero;
- end;
- TGamesNumberAffixConfigurationClass = Class of TGamesNumberAffixConfiguration;
-
- { --------------------------------------------------------------------
- TGamesNumberFormatConfiguration
- --------------------------------------------------------------------}
-
- TGamesNumberFormatConfiguration = Class(TGoogleBaseObject)
- Private
- FcurrencyCode : String;
- FnumDecimalPlaces : integer;
- FnumberFormatType : String;
- Fsuffix : TGamesNumberAffixConfiguration;
- Protected
- //Property setters
- Procedure SetcurrencyCode(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnumDecimalPlaces(AIndex : Integer; const AValue : integer); virtual;
- Procedure SetnumberFormatType(AIndex : Integer; const AValue : String); virtual;
- Procedure Setsuffix(AIndex : Integer; const AValue : TGamesNumberAffixConfiguration); virtual;
- Public
- Published
- Property currencyCode : String Index 0 Read FcurrencyCode Write SetcurrencyCode;
- Property numDecimalPlaces : integer Index 8 Read FnumDecimalPlaces Write SetnumDecimalPlaces;
- Property numberFormatType : String Index 16 Read FnumberFormatType Write SetnumberFormatType;
- Property suffix : TGamesNumberAffixConfiguration Index 24 Read Fsuffix Write Setsuffix;
- end;
- TGamesNumberFormatConfigurationClass = Class of TGamesNumberFormatConfiguration;
-
- { --------------------------------------------------------------------
- TImageConfiguration
- --------------------------------------------------------------------}
-
- TImageConfiguration = Class(TGoogleBaseObject)
- Private
- FimageType : String;
- Fkind : String;
- FresourceId : String;
- Furl : String;
- Protected
- //Property setters
- Procedure SetimageType(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetresourceId(AIndex : Integer; const AValue : String); virtual;
- Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property imageType : String Index 0 Read FimageType Write SetimageType;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property resourceId : String Index 16 Read FresourceId Write SetresourceId;
- Property url : String Index 24 Read Furl Write Seturl;
- end;
- TImageConfigurationClass = Class of TImageConfiguration;
-
- { --------------------------------------------------------------------
- TLeaderboardConfiguration
- --------------------------------------------------------------------}
-
- TLeaderboardConfiguration = Class(TGoogleBaseObject)
- Private
- Fdraft : TLeaderboardConfigurationDetail;
- Fid : String;
- Fkind : String;
- F_published : TLeaderboardConfigurationDetail;
- FscoreMax : String;
- FscoreMin : String;
- FscoreOrder : String;
- Ftoken : String;
- Protected
- Class Function ExportPropertyName(Const AName : String) : string; override;
- //Property setters
- Procedure Setdraft(AIndex : Integer; const AValue : TLeaderboardConfigurationDetail); virtual;
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Set_published(AIndex : Integer; const AValue : TLeaderboardConfigurationDetail); virtual;
- Procedure SetscoreMax(AIndex : Integer; const AValue : String); virtual;
- Procedure SetscoreMin(AIndex : Integer; const AValue : String); virtual;
- Procedure SetscoreOrder(AIndex : Integer; const AValue : String); virtual;
- Procedure Settoken(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property draft : TLeaderboardConfigurationDetail Index 0 Read Fdraft Write Setdraft;
- Property id : String Index 8 Read Fid Write Setid;
- Property kind : String Index 16 Read Fkind Write Setkind;
- Property _published : TLeaderboardConfigurationDetail Index 24 Read F_published Write Set_published;
- Property scoreMax : String Index 32 Read FscoreMax Write SetscoreMax;
- Property scoreMin : String Index 40 Read FscoreMin Write SetscoreMin;
- Property scoreOrder : String Index 48 Read FscoreOrder Write SetscoreOrder;
- Property token : String Index 56 Read Ftoken Write Settoken;
- end;
- TLeaderboardConfigurationClass = Class of TLeaderboardConfiguration;
-
- { --------------------------------------------------------------------
- TLeaderboardConfigurationDetail
- --------------------------------------------------------------------}
-
- TLeaderboardConfigurationDetail = Class(TGoogleBaseObject)
- Private
- FiconUrl : String;
- Fkind : String;
- Fname : TLocalizedStringBundle;
- FscoreFormat : TGamesNumberFormatConfiguration;
- FsortRank : integer;
- Protected
- //Property setters
- Procedure SeticonUrl(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setname(AIndex : Integer; const AValue : TLocalizedStringBundle); virtual;
- Procedure SetscoreFormat(AIndex : Integer; const AValue : TGamesNumberFormatConfiguration); virtual;
- Procedure SetsortRank(AIndex : Integer; const AValue : integer); virtual;
- Public
- Published
- Property iconUrl : String Index 0 Read FiconUrl Write SeticonUrl;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property name : TLocalizedStringBundle Index 16 Read Fname Write Setname;
- Property scoreFormat : TGamesNumberFormatConfiguration Index 24 Read FscoreFormat Write SetscoreFormat;
- Property sortRank : integer Index 32 Read FsortRank Write SetsortRank;
- end;
- TLeaderboardConfigurationDetailClass = Class of TLeaderboardConfigurationDetail;
-
- { --------------------------------------------------------------------
- TLeaderboardConfigurationListResponse
- --------------------------------------------------------------------}
-
- TLeaderboardConfigurationListResponse = Class(TGoogleBaseObject)
- Private
- Fitems : TLeaderboardConfigurationListResponseTypeitemsArray;
- Fkind : String;
- FnextPageToken : String;
- Protected
- //Property setters
- Procedure Setitems(AIndex : Integer; const AValue : TLeaderboardConfigurationListResponseTypeitemsArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property items : TLeaderboardConfigurationListResponseTypeitemsArray Index 0 Read Fitems Write Setitems;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
- end;
- TLeaderboardConfigurationListResponseClass = Class of TLeaderboardConfigurationListResponse;
-
- { --------------------------------------------------------------------
- TLocalizedString
- --------------------------------------------------------------------}
-
- TLocalizedString = Class(TGoogleBaseObject)
- Private
- Fkind : String;
- Flocale : String;
- Fvalue : String;
- Protected
- //Property setters
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setlocale(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property kind : String Index 0 Read Fkind Write Setkind;
- Property locale : String Index 8 Read Flocale Write Setlocale;
- Property value : String Index 16 Read Fvalue Write Setvalue;
- end;
- TLocalizedStringClass = Class of TLocalizedString;
-
- { --------------------------------------------------------------------
- TLocalizedStringBundle
- --------------------------------------------------------------------}
-
- TLocalizedStringBundle = Class(TGoogleBaseObject)
- Private
- Fkind : String;
- Ftranslations : TLocalizedStringBundleTypetranslationsArray;
- Protected
- //Property setters
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Settranslations(AIndex : Integer; const AValue : TLocalizedStringBundleTypetranslationsArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property kind : String Index 0 Read Fkind Write Setkind;
- Property translations : TLocalizedStringBundleTypetranslationsArray Index 8 Read Ftranslations Write Settranslations;
- end;
- TLocalizedStringBundleClass = Class of TLocalizedStringBundle;
-
- { --------------------------------------------------------------------
- TAchievementConfigurationsResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TAchievementConfigurationsResource, method List
-
- TAchievementConfigurationsListOptions = Record
- maxResults : integer;
- pageToken : String;
- end;
-
- TAchievementConfigurationsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Procedure Delete(achievementId: string);
- Function Get(achievementId: string) : TAchievementConfiguration;
- Function Insert(applicationId: string; aAchievementConfiguration : TAchievementConfiguration) : TAchievementConfiguration;
- Function List(applicationId: string; AQuery : string = '') : TAchievementConfigurationListResponse;
- Function List(applicationId: string; AQuery : TAchievementConfigurationslistOptions) : TAchievementConfigurationListResponse;
- Function Patch(achievementId: string; aAchievementConfiguration : TAchievementConfiguration) : TAchievementConfiguration;
- Function Update(achievementId: string; aAchievementConfiguration : TAchievementConfiguration) : TAchievementConfiguration;
- end;
-
-
- { --------------------------------------------------------------------
- TImageConfigurationsResource
- --------------------------------------------------------------------}
-
- TImageConfigurationsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Upload(imageType: string; resourceId: string) : TImageConfiguration;
- end;
-
-
- { --------------------------------------------------------------------
- TLeaderboardConfigurationsResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TLeaderboardConfigurationsResource, method List
-
- TLeaderboardConfigurationsListOptions = Record
- maxResults : integer;
- pageToken : String;
- end;
-
- TLeaderboardConfigurationsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Procedure Delete(leaderboardId: string);
- Function Get(leaderboardId: string) : TLeaderboardConfiguration;
- Function Insert(applicationId: string; aLeaderboardConfiguration : TLeaderboardConfiguration) : TLeaderboardConfiguration;
- Function List(applicationId: string; AQuery : string = '') : TLeaderboardConfigurationListResponse;
- Function List(applicationId: string; AQuery : TLeaderboardConfigurationslistOptions) : TLeaderboardConfigurationListResponse;
- Function Patch(leaderboardId: string; aLeaderboardConfiguration : TLeaderboardConfiguration) : TLeaderboardConfiguration;
- Function Update(leaderboardId: string; aLeaderboardConfiguration : TLeaderboardConfiguration) : TLeaderboardConfiguration;
- end;
-
-
- { --------------------------------------------------------------------
- TGamesConfigurationAPI
- --------------------------------------------------------------------}
-
- TGamesConfigurationAPI = Class(TGoogleAPI)
- Private
- FAchievementConfigurationsInstance : TAchievementConfigurationsResource;
- FImageConfigurationsInstance : TImageConfigurationsResource;
- FLeaderboardConfigurationsInstance : TLeaderboardConfigurationsResource;
- Function GetAchievementConfigurationsInstance : TAchievementConfigurationsResource;virtual;
- Function GetImageConfigurationsInstance : TImageConfigurationsResource;virtual;
- Function GetLeaderboardConfigurationsInstance : TLeaderboardConfigurationsResource;virtual;
- Public
- //Override class functions with API info
- Class Function APIName : String; override;
- Class Function APIVersion : String; override;
- Class Function APIRevision : String; override;
- Class Function APIID : String; override;
- Class Function APITitle : String; override;
- Class Function APIDescription : String; override;
- Class Function APIOwnerDomain : String; override;
- Class Function APIOwnerName : String; override;
- Class Function APIIcon16 : String; override;
- Class Function APIIcon32 : String; override;
- Class Function APIdocumentationLink : String; override;
- Class Function APIrootUrl : string; override;
- Class Function APIbasePath : string;override;
- Class Function APIbaseURL : String;override;
- Class Function APIProtocol : string;override;
- Class Function APIservicePath : string;override;
- Class Function APIbatchPath : String;override;
- Class Function APIAuthScopes : TScopeInfoArray;override;
- Class Function APINeedsAuth : Boolean;override;
- Class Procedure RegisterAPIResources; override;
- //Add create function for resources
- Function CreateAchievementConfigurationsResource(AOwner : TComponent) : TAchievementConfigurationsResource;virtual;overload;
- Function CreateAchievementConfigurationsResource : TAchievementConfigurationsResource;virtual;overload;
- Function CreateImageConfigurationsResource(AOwner : TComponent) : TImageConfigurationsResource;virtual;overload;
- Function CreateImageConfigurationsResource : TImageConfigurationsResource;virtual;overload;
- Function CreateLeaderboardConfigurationsResource(AOwner : TComponent) : TLeaderboardConfigurationsResource;virtual;overload;
- Function CreateLeaderboardConfigurationsResource : TLeaderboardConfigurationsResource;virtual;overload;
- //Add default on-demand instances for resources
- Property AchievementConfigurationsResource : TAchievementConfigurationsResource Read GetAchievementConfigurationsInstance;
- Property ImageConfigurationsResource : TImageConfigurationsResource Read GetImageConfigurationsInstance;
- Property LeaderboardConfigurationsResource : TLeaderboardConfigurationsResource Read GetLeaderboardConfigurationsInstance;
- end;
- implementation
- { --------------------------------------------------------------------
- TAchievementConfiguration
- --------------------------------------------------------------------}
- Procedure TAchievementConfiguration.SetachievementType(AIndex : Integer; const AValue : String);
- begin
- If (FachievementType=AValue) then exit;
- FachievementType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfiguration.Setdraft(AIndex : Integer; const AValue : TAchievementConfigurationDetail);
- begin
- If (Fdraft=AValue) then exit;
- Fdraft:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfiguration.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfiguration.SetinitialState(AIndex : Integer; const AValue : String);
- begin
- If (FinitialState=AValue) then exit;
- FinitialState:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfiguration.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfiguration.Set_published(AIndex : Integer; const AValue : TAchievementConfigurationDetail);
- begin
- If (F_published=AValue) then exit;
- F_published:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfiguration.SetstepsToUnlock(AIndex : Integer; const AValue : integer);
- begin
- If (FstepsToUnlock=AValue) then exit;
- FstepsToUnlock:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfiguration.Settoken(AIndex : Integer; const AValue : String);
- begin
- If (Ftoken=AValue) then exit;
- Ftoken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Class Function TAchievementConfiguration.ExportPropertyName(Const AName : String) :String;
- begin
- Case AName of
- '_published' : Result:='published';
- else
- Result:=Inherited ExportPropertyName(AName);
- end;
- end;
- { --------------------------------------------------------------------
- TAchievementConfigurationDetail
- --------------------------------------------------------------------}
- Procedure TAchievementConfigurationDetail.Setdescription(AIndex : Integer; const AValue : TLocalizedStringBundle);
- begin
- If (Fdescription=AValue) then exit;
- Fdescription:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfigurationDetail.SeticonUrl(AIndex : Integer; const AValue : String);
- begin
- If (FiconUrl=AValue) then exit;
- FiconUrl:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfigurationDetail.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfigurationDetail.Setname(AIndex : Integer; const AValue : TLocalizedStringBundle);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfigurationDetail.SetpointValue(AIndex : Integer; const AValue : integer);
- begin
- If (FpointValue=AValue) then exit;
- FpointValue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfigurationDetail.SetsortRank(AIndex : Integer; const AValue : integer);
- begin
- If (FsortRank=AValue) then exit;
- FsortRank:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TAchievementConfigurationListResponse
- --------------------------------------------------------------------}
- Procedure TAchievementConfigurationListResponse.Setitems(AIndex : Integer; const AValue : TAchievementConfigurationListResponseTypeitemsArray);
- begin
- If (Fitems=AValue) then exit;
- Fitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfigurationListResponse.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAchievementConfigurationListResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TAchievementConfigurationListResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'items' : SetLength(Fitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TGamesNumberAffixConfiguration
- --------------------------------------------------------------------}
- Procedure TGamesNumberAffixConfiguration.Setfew(AIndex : Integer; const AValue : TLocalizedStringBundle);
- begin
- If (Ffew=AValue) then exit;
- Ffew:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TGamesNumberAffixConfiguration.Setmany(AIndex : Integer; const AValue : TLocalizedStringBundle);
- begin
- If (Fmany=AValue) then exit;
- Fmany:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TGamesNumberAffixConfiguration.Setone(AIndex : Integer; const AValue : TLocalizedStringBundle);
- begin
- If (Fone=AValue) then exit;
- Fone:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TGamesNumberAffixConfiguration.Setother(AIndex : Integer; const AValue : TLocalizedStringBundle);
- begin
- If (Fother=AValue) then exit;
- Fother:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TGamesNumberAffixConfiguration.Settwo(AIndex : Integer; const AValue : TLocalizedStringBundle);
- begin
- If (Ftwo=AValue) then exit;
- Ftwo:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TGamesNumberAffixConfiguration.Setzero(AIndex : Integer; const AValue : TLocalizedStringBundle);
- begin
- If (Fzero=AValue) then exit;
- Fzero:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TGamesNumberFormatConfiguration
- --------------------------------------------------------------------}
- Procedure TGamesNumberFormatConfiguration.SetcurrencyCode(AIndex : Integer; const AValue : String);
- begin
- If (FcurrencyCode=AValue) then exit;
- FcurrencyCode:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TGamesNumberFormatConfiguration.SetnumDecimalPlaces(AIndex : Integer; const AValue : integer);
- begin
- If (FnumDecimalPlaces=AValue) then exit;
- FnumDecimalPlaces:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TGamesNumberFormatConfiguration.SetnumberFormatType(AIndex : Integer; const AValue : String);
- begin
- If (FnumberFormatType=AValue) then exit;
- FnumberFormatType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TGamesNumberFormatConfiguration.Setsuffix(AIndex : Integer; const AValue : TGamesNumberAffixConfiguration);
- begin
- If (Fsuffix=AValue) then exit;
- Fsuffix:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TImageConfiguration
- --------------------------------------------------------------------}
- Procedure TImageConfiguration.SetimageType(AIndex : Integer; const AValue : String);
- begin
- If (FimageType=AValue) then exit;
- FimageType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TImageConfiguration.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TImageConfiguration.SetresourceId(AIndex : Integer; const AValue : String);
- begin
- If (FresourceId=AValue) then exit;
- FresourceId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TImageConfiguration.Seturl(AIndex : Integer; const AValue : String);
- begin
- If (Furl=AValue) then exit;
- Furl:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TLeaderboardConfiguration
- --------------------------------------------------------------------}
- Procedure TLeaderboardConfiguration.Setdraft(AIndex : Integer; const AValue : TLeaderboardConfigurationDetail);
- begin
- If (Fdraft=AValue) then exit;
- Fdraft:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfiguration.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfiguration.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfiguration.Set_published(AIndex : Integer; const AValue : TLeaderboardConfigurationDetail);
- begin
- If (F_published=AValue) then exit;
- F_published:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfiguration.SetscoreMax(AIndex : Integer; const AValue : String);
- begin
- If (FscoreMax=AValue) then exit;
- FscoreMax:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfiguration.SetscoreMin(AIndex : Integer; const AValue : String);
- begin
- If (FscoreMin=AValue) then exit;
- FscoreMin:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfiguration.SetscoreOrder(AIndex : Integer; const AValue : String);
- begin
- If (FscoreOrder=AValue) then exit;
- FscoreOrder:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfiguration.Settoken(AIndex : Integer; const AValue : String);
- begin
- If (Ftoken=AValue) then exit;
- Ftoken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Class Function TLeaderboardConfiguration.ExportPropertyName(Const AName : String) :String;
- begin
- Case AName of
- '_published' : Result:='published';
- else
- Result:=Inherited ExportPropertyName(AName);
- end;
- end;
- { --------------------------------------------------------------------
- TLeaderboardConfigurationDetail
- --------------------------------------------------------------------}
- Procedure TLeaderboardConfigurationDetail.SeticonUrl(AIndex : Integer; const AValue : String);
- begin
- If (FiconUrl=AValue) then exit;
- FiconUrl:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfigurationDetail.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfigurationDetail.Setname(AIndex : Integer; const AValue : TLocalizedStringBundle);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfigurationDetail.SetscoreFormat(AIndex : Integer; const AValue : TGamesNumberFormatConfiguration);
- begin
- If (FscoreFormat=AValue) then exit;
- FscoreFormat:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfigurationDetail.SetsortRank(AIndex : Integer; const AValue : integer);
- begin
- If (FsortRank=AValue) then exit;
- FsortRank:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TLeaderboardConfigurationListResponse
- --------------------------------------------------------------------}
- Procedure TLeaderboardConfigurationListResponse.Setitems(AIndex : Integer; const AValue : TLeaderboardConfigurationListResponseTypeitemsArray);
- begin
- If (Fitems=AValue) then exit;
- Fitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfigurationListResponse.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLeaderboardConfigurationListResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TLeaderboardConfigurationListResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'items' : SetLength(Fitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TLocalizedString
- --------------------------------------------------------------------}
- Procedure TLocalizedString.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocalizedString.Setlocale(AIndex : Integer; const AValue : String);
- begin
- If (Flocale=AValue) then exit;
- Flocale:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocalizedString.Setvalue(AIndex : Integer; const AValue : String);
- begin
- If (Fvalue=AValue) then exit;
- Fvalue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TLocalizedStringBundle
- --------------------------------------------------------------------}
- Procedure TLocalizedStringBundle.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocalizedStringBundle.Settranslations(AIndex : Integer; const AValue : TLocalizedStringBundleTypetranslationsArray);
- begin
- If (Ftranslations=AValue) then exit;
- Ftranslations:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TLocalizedStringBundle.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'translations' : SetLength(Ftranslations,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TAchievementConfigurationsResource
- --------------------------------------------------------------------}
- Class Function TAchievementConfigurationsResource.ResourceName : String;
- begin
- Result:='achievementConfigurations';
- end;
- Class Function TAchievementConfigurationsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TgamesConfigurationAPI;
- end;
- Procedure TAchievementConfigurationsResource.Delete(achievementId: string);
- Const
- _HTTPMethod = 'DELETE';
- _Path = 'achievements/{achievementId}';
- _Methodid = 'gamesConfiguration.achievementConfigurations.delete';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['achievementId',achievementId]);
- ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
- end;
- Function TAchievementConfigurationsResource.Get(achievementId: string) : TAchievementConfiguration;
- Const
- _HTTPMethod = 'GET';
- _Path = 'achievements/{achievementId}';
- _Methodid = 'gamesConfiguration.achievementConfigurations.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['achievementId',achievementId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TAchievementConfiguration) as TAchievementConfiguration;
- end;
- Function TAchievementConfigurationsResource.Insert(applicationId: string; aAchievementConfiguration : TAchievementConfiguration) : TAchievementConfiguration;
- Const
- _HTTPMethod = 'POST';
- _Path = 'applications/{applicationId}/achievements';
- _Methodid = 'gamesConfiguration.achievementConfigurations.insert';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['applicationId',applicationId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aAchievementConfiguration,TAchievementConfiguration) as TAchievementConfiguration;
- end;
- Function TAchievementConfigurationsResource.List(applicationId: string; AQuery : string = '') : TAchievementConfigurationListResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'applications/{applicationId}/achievements';
- _Methodid = 'gamesConfiguration.achievementConfigurations.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['applicationId',applicationId]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TAchievementConfigurationListResponse) as TAchievementConfigurationListResponse;
- end;
- Function TAchievementConfigurationsResource.List(applicationId: string; AQuery : TAchievementConfigurationslistOptions) : TAchievementConfigurationListResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'maxResults',AQuery.maxResults);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- Result:=List(applicationId,_Q);
- end;
- Function TAchievementConfigurationsResource.Patch(achievementId: string; aAchievementConfiguration : TAchievementConfiguration) : TAchievementConfiguration;
- Const
- _HTTPMethod = 'PATCH';
- _Path = 'achievements/{achievementId}';
- _Methodid = 'gamesConfiguration.achievementConfigurations.patch';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['achievementId',achievementId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aAchievementConfiguration,TAchievementConfiguration) as TAchievementConfiguration;
- end;
- Function TAchievementConfigurationsResource.Update(achievementId: string; aAchievementConfiguration : TAchievementConfiguration) : TAchievementConfiguration;
- Const
- _HTTPMethod = 'PUT';
- _Path = 'achievements/{achievementId}';
- _Methodid = 'gamesConfiguration.achievementConfigurations.update';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['achievementId',achievementId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aAchievementConfiguration,TAchievementConfiguration) as TAchievementConfiguration;
- end;
- { --------------------------------------------------------------------
- TImageConfigurationsResource
- --------------------------------------------------------------------}
- Class Function TImageConfigurationsResource.ResourceName : String;
- begin
- Result:='imageConfigurations';
- end;
- Class Function TImageConfigurationsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TgamesConfigurationAPI;
- end;
- Function TImageConfigurationsResource.Upload(imageType: string; resourceId: string) : TImageConfiguration;
- Const
- _HTTPMethod = 'POST';
- _Path = 'images/{resourceId}/imageType/{imageType}';
- _Methodid = 'gamesConfiguration.imageConfigurations.upload';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['imageType',imageType,'resourceId',resourceId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TImageConfiguration) as TImageConfiguration;
- end;
- { --------------------------------------------------------------------
- TLeaderboardConfigurationsResource
- --------------------------------------------------------------------}
- Class Function TLeaderboardConfigurationsResource.ResourceName : String;
- begin
- Result:='leaderboardConfigurations';
- end;
- Class Function TLeaderboardConfigurationsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TgamesConfigurationAPI;
- end;
- Procedure TLeaderboardConfigurationsResource.Delete(leaderboardId: string);
- Const
- _HTTPMethod = 'DELETE';
- _Path = 'leaderboards/{leaderboardId}';
- _Methodid = 'gamesConfiguration.leaderboardConfigurations.delete';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['leaderboardId',leaderboardId]);
- ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
- end;
- Function TLeaderboardConfigurationsResource.Get(leaderboardId: string) : TLeaderboardConfiguration;
- Const
- _HTTPMethod = 'GET';
- _Path = 'leaderboards/{leaderboardId}';
- _Methodid = 'gamesConfiguration.leaderboardConfigurations.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['leaderboardId',leaderboardId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TLeaderboardConfiguration) as TLeaderboardConfiguration;
- end;
- Function TLeaderboardConfigurationsResource.Insert(applicationId: string; aLeaderboardConfiguration : TLeaderboardConfiguration) : TLeaderboardConfiguration;
- Const
- _HTTPMethod = 'POST';
- _Path = 'applications/{applicationId}/leaderboards';
- _Methodid = 'gamesConfiguration.leaderboardConfigurations.insert';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['applicationId',applicationId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aLeaderboardConfiguration,TLeaderboardConfiguration) as TLeaderboardConfiguration;
- end;
- Function TLeaderboardConfigurationsResource.List(applicationId: string; AQuery : string = '') : TLeaderboardConfigurationListResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'applications/{applicationId}/leaderboards';
- _Methodid = 'gamesConfiguration.leaderboardConfigurations.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['applicationId',applicationId]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TLeaderboardConfigurationListResponse) as TLeaderboardConfigurationListResponse;
- end;
- Function TLeaderboardConfigurationsResource.List(applicationId: string; AQuery : TLeaderboardConfigurationslistOptions) : TLeaderboardConfigurationListResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'maxResults',AQuery.maxResults);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- Result:=List(applicationId,_Q);
- end;
- Function TLeaderboardConfigurationsResource.Patch(leaderboardId: string; aLeaderboardConfiguration : TLeaderboardConfiguration) : TLeaderboardConfiguration;
- Const
- _HTTPMethod = 'PATCH';
- _Path = 'leaderboards/{leaderboardId}';
- _Methodid = 'gamesConfiguration.leaderboardConfigurations.patch';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['leaderboardId',leaderboardId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aLeaderboardConfiguration,TLeaderboardConfiguration) as TLeaderboardConfiguration;
- end;
- Function TLeaderboardConfigurationsResource.Update(leaderboardId: string; aLeaderboardConfiguration : TLeaderboardConfiguration) : TLeaderboardConfiguration;
- Const
- _HTTPMethod = 'PUT';
- _Path = 'leaderboards/{leaderboardId}';
- _Methodid = 'gamesConfiguration.leaderboardConfigurations.update';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['leaderboardId',leaderboardId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aLeaderboardConfiguration,TLeaderboardConfiguration) as TLeaderboardConfiguration;
- end;
- { --------------------------------------------------------------------
- TGamesConfigurationAPI
- --------------------------------------------------------------------}
- Class Function TGamesConfigurationAPI.APIName : String;
- begin
- Result:='gamesConfiguration';
- end;
- Class Function TGamesConfigurationAPI.APIVersion : String;
- begin
- Result:='v1configuration';
- end;
- Class Function TGamesConfigurationAPI.APIRevision : String;
- begin
- Result:='20160519';
- end;
- Class Function TGamesConfigurationAPI.APIID : String;
- begin
- Result:='gamesConfiguration:v1configuration';
- end;
- Class Function TGamesConfigurationAPI.APITitle : String;
- begin
- Result:='Google Play Game Services Publishing API';
- end;
- Class Function TGamesConfigurationAPI.APIDescription : String;
- begin
- Result:='The Publishing API for Google Play Game Services.';
- end;
- Class Function TGamesConfigurationAPI.APIOwnerDomain : String;
- begin
- Result:='google.com';
- end;
- Class Function TGamesConfigurationAPI.APIOwnerName : String;
- begin
- Result:='Google';
- end;
- Class Function TGamesConfigurationAPI.APIIcon16 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-16.gif';
- end;
- Class Function TGamesConfigurationAPI.APIIcon32 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-32.gif';
- end;
- Class Function TGamesConfigurationAPI.APIdocumentationLink : String;
- begin
- Result:='https://developers.google.com/games/services';
- end;
- Class Function TGamesConfigurationAPI.APIrootUrl : string;
- begin
- Result:='https://www.googleapis.com/';
- end;
- Class Function TGamesConfigurationAPI.APIbasePath : string;
- begin
- Result:='/games/v1configuration/';
- end;
- Class Function TGamesConfigurationAPI.APIbaseURL : String;
- begin
- Result:='https://www.googleapis.com/games/v1configuration/';
- end;
- Class Function TGamesConfigurationAPI.APIProtocol : string;
- begin
- Result:='rest';
- end;
- Class Function TGamesConfigurationAPI.APIservicePath : string;
- begin
- Result:='games/v1configuration/';
- end;
- Class Function TGamesConfigurationAPI.APIbatchPath : String;
- begin
- Result:='batch';
- end;
- Class Function TGamesConfigurationAPI.APIAuthScopes : TScopeInfoArray;
- begin
- SetLength(Result,1);
- Result[0].Name:='https://www.googleapis.com/auth/androidpublisher';
- Result[0].Description:='View and manage your Google Play Developer account';
-
- end;
- Class Function TGamesConfigurationAPI.APINeedsAuth : Boolean;
- begin
- Result:=True;
- end;
- Class Procedure TGamesConfigurationAPI.RegisterAPIResources;
- begin
- TAchievementConfiguration.RegisterObject;
- TAchievementConfigurationDetail.RegisterObject;
- TAchievementConfigurationListResponse.RegisterObject;
- TGamesNumberAffixConfiguration.RegisterObject;
- TGamesNumberFormatConfiguration.RegisterObject;
- TImageConfiguration.RegisterObject;
- TLeaderboardConfiguration.RegisterObject;
- TLeaderboardConfigurationDetail.RegisterObject;
- TLeaderboardConfigurationListResponse.RegisterObject;
- TLocalizedString.RegisterObject;
- TLocalizedStringBundle.RegisterObject;
- end;
- Function TGamesConfigurationAPI.GetAchievementConfigurationsInstance : TAchievementConfigurationsResource;
- begin
- if (FAchievementConfigurationsInstance=Nil) then
- FAchievementConfigurationsInstance:=CreateAchievementConfigurationsResource;
- Result:=FAchievementConfigurationsInstance;
- end;
- Function TGamesConfigurationAPI.CreateAchievementConfigurationsResource : TAchievementConfigurationsResource;
- begin
- Result:=CreateAchievementConfigurationsResource(Self);
- end;
- Function TGamesConfigurationAPI.CreateAchievementConfigurationsResource(AOwner : TComponent) : TAchievementConfigurationsResource;
- begin
- Result:=TAchievementConfigurationsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TGamesConfigurationAPI.GetImageConfigurationsInstance : TImageConfigurationsResource;
- begin
- if (FImageConfigurationsInstance=Nil) then
- FImageConfigurationsInstance:=CreateImageConfigurationsResource;
- Result:=FImageConfigurationsInstance;
- end;
- Function TGamesConfigurationAPI.CreateImageConfigurationsResource : TImageConfigurationsResource;
- begin
- Result:=CreateImageConfigurationsResource(Self);
- end;
- Function TGamesConfigurationAPI.CreateImageConfigurationsResource(AOwner : TComponent) : TImageConfigurationsResource;
- begin
- Result:=TImageConfigurationsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TGamesConfigurationAPI.GetLeaderboardConfigurationsInstance : TLeaderboardConfigurationsResource;
- begin
- if (FLeaderboardConfigurationsInstance=Nil) then
- FLeaderboardConfigurationsInstance:=CreateLeaderboardConfigurationsResource;
- Result:=FLeaderboardConfigurationsInstance;
- end;
- Function TGamesConfigurationAPI.CreateLeaderboardConfigurationsResource : TLeaderboardConfigurationsResource;
- begin
- Result:=CreateLeaderboardConfigurationsResource(Self);
- end;
- Function TGamesConfigurationAPI.CreateLeaderboardConfigurationsResource(AOwner : TComponent) : TLeaderboardConfigurationsResource;
- begin
- Result:=TLeaderboardConfigurationsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- initialization
- TGamesConfigurationAPI.RegisterAPI;
- end.
|