Bez popisu

CloudNaturalLanguageAPI.php 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. /**
  18. * Service definition for CloudNaturalLanguageAPI (v1beta1).
  19. *
  20. * <p>
  21. * Google Cloud Natural Language API provides natural language understanding
  22. * technologies to developers. Examples include sentiment analysis, entity
  23. * recognition, and text annotations.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/natural-language/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class Google_Service_CloudNaturalLanguageAPI extends Google_Service
  33. {
  34. /** View and manage your data across Google Cloud Platform services. */
  35. const CLOUD_PLATFORM =
  36. "https://www.googleapis.com/auth/cloud-platform";
  37. public $documents;
  38. /**
  39. * Constructs the internal representation of the CloudNaturalLanguageAPI
  40. * service.
  41. *
  42. * @param Google_Client $client
  43. */
  44. public function __construct(Google_Client $client)
  45. {
  46. parent::__construct($client);
  47. $this->rootUrl = 'https://language.googleapis.com/';
  48. $this->servicePath = '';
  49. $this->version = 'v1beta1';
  50. $this->serviceName = 'language';
  51. $this->documents = new Google_Service_CloudNaturalLanguageAPI_Resource_Documents(
  52. $this,
  53. $this->serviceName,
  54. 'documents',
  55. array(
  56. 'methods' => array(
  57. 'analyzeEntities' => array(
  58. 'path' => 'v1beta1/documents:analyzeEntities',
  59. 'httpMethod' => 'POST',
  60. 'parameters' => array(),
  61. ),'analyzeSentiment' => array(
  62. 'path' => 'v1beta1/documents:analyzeSentiment',
  63. 'httpMethod' => 'POST',
  64. 'parameters' => array(),
  65. ),'annotateText' => array(
  66. 'path' => 'v1beta1/documents:annotateText',
  67. 'httpMethod' => 'POST',
  68. 'parameters' => array(),
  69. ),
  70. )
  71. )
  72. );
  73. }
  74. }