text: /**
   * Copyright 2015 Google Inc. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  /* jshint maxlen: false */
  
  'use strict';
  
  var createAPIRequest = require('../../lib/apirequest');
  
  /**
   * Knowledge Graph Search API
   *
   * @classdesc Knowledge Graph Search API allows developers to search the Google Knowledge Graph for entities.
   * @namespace kgsearch
   * @version  v1
   * @variation v1
   * @this Kgsearch
   * @param {object=} options Options for Kgsearch
   */
  function Kgsearch(options) {
  
    var self = this;
    this._options = options || {};
  
    this.entities = {
  
      /**
       * kgsearch.entities.search
       *
       * @desc Searches Knowledge Graph for entities that match the constraints. A list of matched entities will be returned in response, which will be in JSON-LD format and compatible with http://schema.org
       *
       * @alias kgsearch.entities.search
       * @memberOf! kgsearch(v1)
       *
       * @param  {object=} params - Parameters for request
       * @param  {string=} params.query - The literal query string for search.
       * @param  {string=} params.ids - The list of entity id to be used for search instead of query string.
       * @param  {string=} params.languages - The list of language codes (defined in ISO 693) to run the query with, e.g. 'en'.
       * @param  {string=} params.types - Restricts returned entities with these types, e.g. Person (as defined in http://schema.org/Person).
       * @param  {boolean=} params.indent - Enables indenting of json results.
       * @param  {boolean=} params.prefix - Enables prefix match against names and aliases of entities
       * @param  {integer=} params.limit - Limits the number of entities to be returned.
       * @param  {callback} callback - The callback that handles the response.
       * @return {object} Request object
       */
      search: function(params, callback) {
        var parameters = {
          options: {
            url: 'https://kgsearch.googleapis.com/v1/entities:search',
            method: 'GET'
          },
          params: params,
          requiredParams: [],
          pathParams: [],
          context: self
        };
  
        return createAPIRequest(parameters, callback);
      }
  
    };
  }
  
  /**
   * Exports Kgsearch object
   * @type Kgsearch
   */
  module.exports = Kgsearch;