Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
odannyc authored Aug 19, 2016
1 parent f5b193f commit b0041f9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# google-image-search
You're able to query google for images using Google's new Custom Search API.

``` php
ImageSearch::config()->apiKey('API Goes Here');
ImageSearch::config()->cx('CX Goes Here');

ImageSearch::search('civic'); // returns array of results
```

## Installation
Use composer to install

`composer require odannyc/google-image-search`

## Usage
Set your API and CX string using the config method:

```php
ImageSearch::config()->apiKey('API Goes Here');
ImageSearch::config()->cx('CX Goes Here');
```

Once that's done, use the search method to query a specific string of text

```php
ImageSearch::search('civic');
```

It'll return an array of results. The images are specifically in the `items` key.

0 comments on commit b0041f9

Please sign in to comment.