wildlyinaccurate / google-suggestqueries-api
There is no license information available for the latest version (1.0.1) of this package.
PHP library for retrieving suggestions from Google's suggestqueries API
1.0.1
2013-08-02 10:53 UTC
Requires
- php: >=5.3.2
- ext-curl: *
- kriswallsmith/buzz: 0.10
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2025-05-05 17:34:16 UTC
README
Installation
Install via composer:
{ "require": { "wildlyinaccurate/google-suggestqueries-api" : "1.0.*" } }
google-suggestqueries-api
follows the PSR-0 convention names for its classes, which means you can easily integrategoogle-suggestqueries-api
classes loading in your own autoloader.
Basic usage
<?php // This file is generated by Composer require_once 'vendor/autoload.php'; $client = new Google\SuggestQueries\Client; // $client->getClient() is an instance of Buzz\Client\Curl, so you can set // various options before performing a query: $client->getClient()->setProxy('proxyhost:8080'); $suggestions = $client->getSuggestions($query); // Suggestions can be sorted by their num_queries value: $sortedSuggestions = $suggestions->sortByNumQueries();
Contributing
When submitting pull requests, please include any relevant tests and ensure the entire test suite passes: $ phpunit --bootstrap tests/bootstrap.php tests