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

This package is not auto-updated.

Last update: 2024-04-22 12:29:25 UTC


README

Build Status

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 integrate google-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