Skip to content

Commit

Permalink
api file + readme file + gitignore file
Browse files Browse the repository at this point in the history
  • Loading branch information
travisfont committed Apr 21, 2016
1 parent 979a1d2 commit 154cca0
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 22 deletions.
59 changes: 59 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/bootstrap/compiled.php
composer.phar
composer.lock

# Skyfire Specific #
####################
/library/packages/

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# Max OSX generated files #
###########################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
.AppleDouble
.LSOverride

# Windows Generated Files #
###########################
ehthumbs.db
Thumbs.db
Desktop.ini

# Node JSSpecific #
###################
node_modules
npm-debug.log
*.pid

# IDE Specific #
################
*.sublime-workspace
.idea/
.project/
.settings/
.buildpath/
*.sass-cache
Session.vim

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# GPlaz
===

Just another source code repo for some Google APIs.

## Usage

Please see the [example.php](example.php ) file for now. Will eventually add better docs later :]

## License

Code, documentation (if any), and/or examples by Travis van der Font

This library is entirely open-sourced software licensed under the MIT License (MIT). Please see [License File](LICENSE) for more information. But remember, do as you wish!
5 changes: 5 additions & 0 deletions apikey.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

// Place this somewhere safe on the server (not reachable to public)

define('API_KEY', 'abcdefgh1230000000');
29 changes: 29 additions & 0 deletions examples.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

require_once 'Google.php';
require_once 'apikey.php';

$google = new Google(API_KEY);
$google->setAddress('Bertrange, Luxembourg');

if ($results = $google->Geocode())
{
$google_maps = array
(
'address' => 'Bertrange, Luxembourg',
'lat' => $results[0]->geometry->location->lat,
'lng' => $results[0]->geometry->location->lng
);

var_dump(serialize($google_maps));
}

/* Searching places (Using location and store name)
$google = new Google(API_KEY);
$google->setQuery('Walmart, 33065, USA');
$results = $google->searchPlace();
echo '<pre>';
print_r($results);
#print_r($google->error);
*/
22 changes: 0 additions & 22 deletions index.php

This file was deleted.

0 comments on commit 154cca0

Please sign in to comment.