API : Google Maps Geo Location APIs

Most important thing is life is heading towards right directions. Now a days getting direction from google is super easy. Some times complex and difficult looking things are super simple and google Maps APIs are one of them. It is very easy to consume.

Google Maps Geocoding API web service link :

https://developers.google.com/maps/documentation/geocoding/intro#Geocoding

A Google Maps Geocoding API request must be of the following format:

https://maps.googleapis.com/maps/api/geocode/output?parameters

where output may be either of the following values:

  • json (recommended) indicates output in JavaScript Object Notation (JSON)
  • xml indicates output as XML

 

Sample get request to find location information related to Pune city in India
https://maps.googleapis.com/maps/api/geocode/json?&address=Pune%2C%20India

Sample Response :

{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "Pune",
               "short_name" : "Pune",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "Pune",
               "short_name" : "Pune",
               "types" : [ "administrative_area_level_2", "political" ]
            },
            {
               "long_name" : "Maharashtra",
               "short_name" : "MH",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "India",
               "short_name" : "IN",
               "types" : [ "country", "political" ]
            },
            {
               "long_name" : "411001",
               "short_name" : "411001",
               "types" : [ "postal_code" ]
            }
         ]
}

 

API : Text messages from https://www.twilio.com/

If you need text / sms notification or alerts to be triggered by your program when https://www.twilio.com/ is the best option. You can consume it in any language like java, python, node etc. Simple to use and very effective.

Here is its code base in python : https://github.com/twilio/twilio-python

Use case :

  1. Bank account it going through some suspicious activities and need text alert.
  2. Text appointment reminder to customers.
  3. Text status of services etc.

Sample code of usage.

__author__ = ‘asee2278’
import twilio

from twilio.rest import TwilioRestClient

# put your own credentials here
ACCOUNT_SID = “AC72b94808df4448e5923b27258493df48”
AUTH_TOKEN = “XXXXXXXXXXXX”

client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)

message = client.messages.create(
to=”+13045047736″,
from_=”+16814044918″,
body=”Test message “,
)

print message.sid