This is a ruby implementation of the google api to access gmail.
- Create a google developer project - https://console.developers.google.com/project
- Enable 'Gmail API' under 'APIs & Auth' > 'APIs'
- Click 'Create new Client ID' under 'APIs & Auth' > 'Credentials'
- Chose 'Installed Application'
- Click 'Download as JSON', the rename the file to just 'client_secret.json'
- Put the 'client_secret.json' file in the path
- If you do not want to have a separate file for your client_secret.json replace
client_secrets = Google::APIClient::ClientSecrets.load
with
client_secrets = Google::APIClient::ClientSecrets.new (MultiJson.load('<contents of client_secret.json>')) - The reason I don't share my client is because I don't want to push the limits set by google