Editing README
I just prefer the github editor for markdown editing.
This commit is contained in:
parent
81bb478980
commit
6ee3b05f15
1 changed files with 9 additions and 19 deletions
28
README.md
28
README.md
|
@ -6,9 +6,9 @@ PHP Wrapper for the Google Places API.
|
||||||
Origins
|
Origins
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Simply put, when I Googled "php google places" I was presented with [https://github.com/anthony-mills/Google-Places---PHP-]. I attempted to use it, and it was fine as I was able to make it work, but there seemed to be a huge assumption that you already know the Google Places API.
|
Simply put, when I Googled "php google places" I was presented with [Google-Places---PHP-](https://github.com/anthony-mills/Google-Places---PHP-). I attempted to use it, and it was fine as I was able to make it work, but there seemed to be a huge assumption that you already knew a lot of the quirks of the Google Places API.
|
||||||
|
|
||||||
I did not fit into this assumption and set out to built my own wrapper with a heavy focus on sanity checking inputs, utilizing the magical parts of PHP (reads you interact directly with the objecta as you would the API) and avoiding setter methods as they were put here by the devil.
|
I did not fit into this assumption and set out to built my own wrapper with a heavy focus on sanity checking inputs, utilizing the magical parts of PHP (reads: you interact directly with the object as you would the API) and avoiding setter methods as they were put here by the devil.
|
||||||
|
|
||||||
I didn't fork because I was going to change too much and I highly doubt my pull requests would have been accepted.
|
I didn't fork because I was going to change too much and I highly doubt my pull requests would have been accepted.
|
||||||
|
|
||||||
|
@ -18,38 +18,28 @@ Usage Examples
|
||||||
### Getting started
|
### Getting started
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once 'GooglePlaces.php';
|
require_once 'GooglePlaces.php';
|
||||||
|
|
||||||
$google_places = new GooglePlaces('_YOUR_API_KEY');
|
$google_places = new GooglePlaces('_YOUR_API_KEY');
|
||||||
|
|
||||||
?>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Search nearby, ranked by prominence
|
### Search nearby, ranked by prominence
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
|
||||||
|
|
||||||
$google_places->location = array(-33.86820, 151.1945860);
|
$google_places->location = array(-33.86820, 151.1945860);
|
||||||
$google_places->radius = 800;
|
$google_places->radius = 800;
|
||||||
|
$results = $google_places->searchNearby();
|
||||||
$places = $google_places->searchNearby();
|
|
||||||
|
|
||||||
?>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Search nearby, ranked by distance
|
### Search nearby, ranked by distance
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
|
||||||
|
|
||||||
$google_places->location = array(-33.86820, 151.1945860);
|
$google_places->location = array(-33.86820, 151.1945860);
|
||||||
$google_places->rankby = 'distance';
|
$google_places->rankby = 'distance';
|
||||||
$google_places->types = 'restaurant'; // Requires keyword, name or types
|
$google_places->types = 'restaurant'; // Requires keyword, name or types
|
||||||
|
$results = $google_places->searchNearby();
|
||||||
$places = $google_places->searchNearby();
|
|
||||||
|
|
||||||
?>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The Fututre
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Assuming December 21st, 2012 doesn't lead to humanity's demise, the plan is to continue implementing the entire Google Places API into this class and eventually migrating it into my PHP Framework [PICKLES](https://github.com/joshtronic/pickles).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue