code samples to use google api