Skip to content

Instantly share code, notes, and snippets.

@xmaillard
Last active August 29, 2015 14:24
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 xmaillard/522d78d476d585a28ccc to your computer and use it in GitHub Desktop.
Save xmaillard/522d78d476d585a28ccc to your computer and use it in GitHub Desktop.
(request-response-data (request
(concat dailymile-api-endpoint uri "." (assoc-default 'json dailymile-format))
:type method
:parser (lambda ()
(let (
(json-object-type 'hash-table)
(json-array-type 'list)
(json-key-type 'symbol))
(json-read)))
:params `(("oauth_token" . ,(oauth2-token-access-token
*dailymile-oauth2-token*)))
:status-code '((401 . (lambda (&rest _) (message "Problem
with your access token.")))
(404 . (lambda (&rest _) (message "That's
embarrassing, can't find your stuff."))))
:timeout 2
:sync t
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment