class Tact::GoogleContacts::Fetcher
Public Class Methods
info_list()
click to toggle source
# File lib/tact/google_client.rb, line 140 def self.info_list info = JSON.parse(json, symbolize_names: true) if info[:error] puts "ERROR: Please authorize your Google account.".red exit end info[:connections] end
json()
click to toggle source
# File lib/tact/google_client.rb, line 149 def self.json `curl -H "$(oauth2l header --json #{CLIENT_SECRET} https://www.googleapis.com/auth/contacts https://www.googleapis.com/auth/contacts.readonly)"\ https://people.googleapis.com/v1/people/me/connections?requestMask.includeField=person.names,person.phone_numbers,person.email_addresses` end