googlecloudsearch.pp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. unit googlecloudsearch;
  2. {
  3. This is the file COPYING.FPC, it applies to the Free Pascal Run-Time Library
  4. (RTL) and packages (packages) distributed by members of the Free Pascal
  5. Development Team.
  6. The source code of the Free Pascal Runtime Libraries and packages are
  7. distributed under the Library GNU General Public License
  8. (see the file COPYING) with the following modification:
  9. As a special exception, the copyright holders of this library give you
  10. permission to link this library with independent modules to produce an
  11. executable, regardless of the license terms of these independent modules,
  12. and to copy and distribute the resulting executable under terms of your choice,
  13. provided that you also meet, for each linked independent module, the terms
  14. and conditions of the license of that module. An independent module is a module
  15. which is not derived from or based on this library. If you modify this
  16. library, you may extend this exception to your version of the library, but you are
  17. not obligated to do so. If you do not wish to do so, delete this exception
  18. statement from your version.
  19. If you didn't receive a copy of the file COPYING, contact:
  20. Free Software Foundation
  21. 675 Mass Ave
  22. Cambridge, MA 02139
  23. USA
  24. }
  25. {$MODE objfpc}
  26. {$H+}
  27. interface
  28. uses sysutils, classes, googleservice, restbase, googlebase;
  29. type
  30. //
  31. { --------------------------------------------------------------------
  32. TCloudsearchAPI
  33. --------------------------------------------------------------------}
  34. TCloudsearchAPI = Class(TGoogleAPI)
  35. Private
  36. Public
  37. //Override class functions with API info
  38. Class Function APIName : String; override;
  39. Class Function APIVersion : String; override;
  40. Class Function APIRevision : String; override;
  41. Class Function APIID : String; override;
  42. Class Function APITitle : String; override;
  43. Class Function APIDescription : String; override;
  44. Class Function APIOwnerDomain : String; override;
  45. Class Function APIOwnerName : String; override;
  46. Class Function APIIcon16 : String; override;
  47. Class Function APIIcon32 : String; override;
  48. Class Function APIdocumentationLink : String; override;
  49. Class Function APIrootUrl : string; override;
  50. Class Function APIbasePath : string;override;
  51. Class Function APIbaseURL : String;override;
  52. Class Function APIProtocol : string;override;
  53. Class Function APIservicePath : string;override;
  54. Class Function APIbatchPath : String;override;
  55. Class Function APIAuthScopes : TScopeInfoArray;override;
  56. Class Function APINeedsAuth : Boolean;override;
  57. Class Procedure RegisterAPIResources; override;
  58. //Add create function for resources
  59. //Add default on-demand instances for resources
  60. end;
  61. implementation
  62. { --------------------------------------------------------------------
  63. TCloudsearchAPI
  64. --------------------------------------------------------------------}
  65. Class Function TCloudsearchAPI.APIName : String;
  66. begin
  67. Result:='cloudsearch';
  68. end;
  69. Class Function TCloudsearchAPI.APIVersion : String;
  70. begin
  71. Result:='v1';
  72. end;
  73. Class Function TCloudsearchAPI.APIRevision : String;
  74. begin
  75. Result:='20150416';
  76. end;
  77. Class Function TCloudsearchAPI.APIID : String;
  78. begin
  79. Result:='cloudsearch:v1';
  80. end;
  81. Class Function TCloudsearchAPI.APITitle : String;
  82. begin
  83. Result:='Google Cloud Search API';
  84. end;
  85. Class Function TCloudsearchAPI.APIDescription : String;
  86. begin
  87. Result:='The Google Cloud Search API defines an application interface to index documents that contain structured data and to search those indexes. It supports full text search.';
  88. end;
  89. Class Function TCloudsearchAPI.APIOwnerDomain : String;
  90. begin
  91. Result:='google.com';
  92. end;
  93. Class Function TCloudsearchAPI.APIOwnerName : String;
  94. begin
  95. Result:='Google';
  96. end;
  97. Class Function TCloudsearchAPI.APIIcon16 : String;
  98. begin
  99. Result:='http://www.google.com/images/icons/product/search-16.gif';
  100. end;
  101. Class Function TCloudsearchAPI.APIIcon32 : String;
  102. begin
  103. Result:='http://www.google.com/images/icons/product/search-32.gif';
  104. end;
  105. Class Function TCloudsearchAPI.APIdocumentationLink : String;
  106. begin
  107. Result:='';
  108. end;
  109. Class Function TCloudsearchAPI.APIrootUrl : string;
  110. begin
  111. Result:='https://cloudsearch.googleapis.com/';
  112. end;
  113. Class Function TCloudsearchAPI.APIbasePath : string;
  114. begin
  115. Result:='';
  116. end;
  117. Class Function TCloudsearchAPI.APIbaseURL : String;
  118. begin
  119. Result:='https://cloudsearch.googleapis.com/';
  120. end;
  121. Class Function TCloudsearchAPI.APIProtocol : string;
  122. begin
  123. Result:='rest';
  124. end;
  125. Class Function TCloudsearchAPI.APIservicePath : string;
  126. begin
  127. Result:='';
  128. end;
  129. Class Function TCloudsearchAPI.APIbatchPath : String;
  130. begin
  131. Result:='batch';
  132. end;
  133. Class Function TCloudsearchAPI.APIAuthScopes : TScopeInfoArray;
  134. begin
  135. SetLength(Result,0);
  136. end;
  137. Class Function TCloudsearchAPI.APINeedsAuth : Boolean;
  138. begin
  139. Result:=False;
  140. end;
  141. Class Procedure TCloudsearchAPI.RegisterAPIResources;
  142. begin
  143. end;
  144. initialization
  145. TCloudsearchAPI.RegisterAPI;
  146. end.