Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add Google Maps services

  • Loading branch information...
commit 979a4e0686d753019dca7d18611a9cd862d20eb7 1 parent 9ab930f
@fperrad fperrad authored
View
3  services/Makefile
@@ -3,6 +3,7 @@ SPORE2DOT := perl ../utils/spore2dot.pl
check: spore_validation.rx
@make -C github check
+ @make -C googlemaps check
@$(VALIDATOR) amazons3.json
@$(VALIDATOR) backtweet.json
@$(VALIDATOR) backtype.json
@@ -33,6 +34,7 @@ png: \
ohloh.png \
twitter.png
@make -C github png
+ @make -C googlemaps png
%.png : %.dot
dot -T png -o $@ $<
@@ -42,4 +44,5 @@ png: \
clean:
@make -C github clean
+ @make -C googlemaps clean
-rm *.png *.dot spore_validation.rx
View
29 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
View
31 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"
+ }
+}
View
28 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"
+ }
+}
View
31 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"
+ }
+}
View
40 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"
+ }
+}
View
BIN  services/googlemaps/googlemaps.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.