summaryrefslogtreecommitdiff
path: root/services/googlemaps
diff options
context:
space:
mode:
Diffstat (limited to 'services/googlemaps')
-rw-r--r--services/googlemaps/Makefile29
-rw-r--r--services/googlemaps/directions.json31
-rw-r--r--services/googlemaps/distancematrix.json28
-rw-r--r--services/googlemaps/elevation.json31
-rw-r--r--services/googlemaps/geocoding.json40
-rw-r--r--services/googlemaps/googlemaps.pngbin0 -> 40139 bytes
6 files changed, 159 insertions, 0 deletions
diff --git a/services/googlemaps/Makefile b/services/googlemaps/Makefile
new file mode 100644
index 0000000..b072b4b
--- /dev/null
+++ b/services/googlemaps/Makefile
@@ -0,0 +1,29 @@
+
+VALIDATOR := perl ../../utils/validator.pl --schema spore_validation.rx --description
+SPORE2DOT := perl ../../utils/spore2dot.pl
+
+check: spore_validation.rx
+ @$(VALIDATOR) directions.json
+ @$(VALIDATOR) distancematrix.json
+ @$(VALIDATOR) elevation.json
+ @$(VALIDATOR) geocoding.json
+
+test: check
+
+spore_validation.rx:
+ wget http://github.com/SPORE/specifications/raw/master/spore_validation.rx
+
+png: googlemaps.png
+
+%.png : %.dot
+ dot -T png -o $@ $<
+
+googlemaps.dot: \
+ directions.json \
+ distancematrix.json \
+ geocoding.json \
+ elevation.json
+ $(SPORE2DOT) $^ > $@
+
+clean:
+ -rm *.png *.dot spore_validation.rx
diff --git a/services/googlemaps/directions.json b/services/googlemaps/directions.json
new file mode 100644
index 0000000..2d1d53b
--- /dev/null
+++ b/services/googlemaps/directions.json
@@ -0,0 +1,31 @@
+{
+ "version" : "0.1",
+ "base_url" : "http://maps.googleapis.com/maps/api",
+ "methods" : {
+ "directions" : {
+ "path" : "/directions/:format",
+ "method" : "GET",
+ "required_params" : [
+ "format",
+ "origin",
+ "destination",
+ "sensor"
+ ],
+ "optional_params" : [
+ "mode",
+ "waypoints",
+ "alternatives",
+ "avoid",
+ "units",
+ "region",
+ "language"
+ ]
+ }
+ },
+ "authority" : "http://github.com/SPORE",
+ "name" : "Google Maps",
+ "meta" : {
+ "documentation" : "http://code.google.com/apis/maps/documentation/directions/",
+ "module" : "Directions"
+ }
+}
diff --git a/services/googlemaps/distancematrix.json b/services/googlemaps/distancematrix.json
new file mode 100644
index 0000000..37dd023
--- /dev/null
+++ b/services/googlemaps/distancematrix.json
@@ -0,0 +1,28 @@
+{
+ "version" : "0.1",
+ "base_url" : "http://maps.googleapis.com/maps/api",
+ "methods" : {
+ "distancematrix" : {
+ "path" : "/distancematrix/:format",
+ "method" : "GET",
+ "required_params" : [
+ "format",
+ "origins",
+ "destinations",
+ "sensor"
+ ],
+ "optional_params" : [
+ "mode",
+ "language",
+ "avoid",
+ "units"
+ ]
+ }
+ },
+ "authority" : "http://github.com/SPORE",
+ "name" : "Google Maps",
+ "meta" : {
+ "documentation" : "http://code.google.com/apis/maps/documentation/distancematrix/",
+ "module" : "Distance Matrix"
+ }
+}
diff --git a/services/googlemaps/elevation.json b/services/googlemaps/elevation.json
new file mode 100644
index 0000000..0e3f029
--- /dev/null
+++ b/services/googlemaps/elevation.json
@@ -0,0 +1,31 @@
+{
+ "version" : "0.1",
+ "base_url" : "http://maps.googleapis.com/maps/api",
+ "methods" : {
+ "elevation" : {
+ "path" : "/elevation/:format",
+ "method" : "GET",
+ "required_params" : [
+ "format",
+ "locations",
+ "sensor"
+ ]
+ },
+ "elevation_path" : {
+ "path" : "/elevation/:format",
+ "method" : "GET",
+ "required_params" : [
+ "format",
+ "path",
+ "samples",
+ "sensor"
+ ]
+ }
+ },
+ "authority" : "http://github.com/SPORE",
+ "name" : "Google Maps",
+ "meta" : {
+ "documentation" : "http://code.google.com/apis/maps/documentation/elevation/",
+ "module" : "Elevation"
+ }
+}
diff --git a/services/googlemaps/geocoding.json b/services/googlemaps/geocoding.json
new file mode 100644
index 0000000..9ae201f
--- /dev/null
+++ b/services/googlemaps/geocoding.json
@@ -0,0 +1,40 @@
+{
+ "version" : "0.1",
+ "base_url" : "http://maps.googleapis.com/maps/api",
+ "methods" : {
+ "geocode" : {
+ "path" : "/geocode/:format",
+ "method" : "GET",
+ "required_params" : [
+ "format",
+ "address",
+ "sensor"
+ ],
+ "optional_params" : [
+ "bounds",
+ "region",
+ "language"
+ ]
+ },
+ "address_lookup" : {
+ "path" : "/geocode/:format",
+ "method" : "GET",
+ "required_params" : [
+ "format",
+ "latlng",
+ "sensor"
+ ],
+ "optional_params" : [
+ "bounds",
+ "region",
+ "language"
+ ]
+ }
+ },
+ "authority" : "http://github.com/SPORE",
+ "name" : "Google Maps",
+ "meta" : {
+ "documentation" : "http://code.google.com/apis/maps/documentation/geocoding/",
+ "module" : "Geocoding"
+ }
+}
diff --git a/services/googlemaps/googlemaps.png b/services/googlemaps/googlemaps.png
new file mode 100644
index 0000000..cd92135
--- /dev/null
+++ b/services/googlemaps/googlemaps.png
Binary files differ