Skip to content

Instantly share code, notes, and snippets.

@tstachl
Created August 13, 2014 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tstachl/db12d8ec211e51adb296 to your computer and use it in GitHub Desktop.
Save tstachl/db12d8ec211e51adb296 to your computer and use it in GitHub Desktop.
DeskApi Timeout fix
require 'desk_api'
DeskApi::Default::CONNECTION_OPTIONS[:request] = {
open_timeout: 45,
timeout: 45
}
client = DeskApi::Client.new({
token: 'TOKEN',
token_secret: 'TOKEN_SECRET',
consumer_key: 'CONSUMER_KEY',
consumer_secret: 'CONSUMER_SECRET',
endpoint: 'https://example.desk.com'
})
response = client.post('/api/v2/insights/reports', { resolution: 'weeks' }).body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment