Skip to content

Instantly share code, notes, and snippets.

@rexroof
Created August 3, 2015 03:17
Show Gist options
  • Save rexroof/c6c48ab55a690b8534fb to your computer and use it in GitHub Desktop.
Save rexroof/c6c48ab55a690b8534fb to your computer and use it in GitHub Desktop.
class X
schedule_url = 'http://example.com/2015.json'
constructor: (@robot) ->
@schedule = @populate_schedule()
console.log @schedule
populate_schedule: ->
@robot.http(schedule_url).get() (err, res, body) ->
if err
console.log "schedule error: #{err}"
return
data = JSON.parse body
console.log data
return data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment