Skip to content

Instantly share code, notes, and snippets.

@rhysd
Created April 3, 2015 14:51
Show Gist options
  • Save rhysd/c2f37c569b958a31a137 to your computer and use it in GitHub Desktop.
Save rhysd/c2f37c569b958a31a137 to your computer and use it in GitHub Desktop.
let s:V = vital#of('vital')
let s:H = s:V.import('Web.HTTP')
let s:J = s:V.import('Web.JSON')
function! VimJpIssues()
let response = s:H.request({
\ 'url' : 'https://api.github.com/repos/vim-jp/issues/issues',
\ 'headers' : {'Accept' : 'application/vnd.github.v3+json'},
\ 'method' : 'GET',
\ 'param' : {'state' : 'all'},
\ })
if !response.success
echoerr "request error: " . response.status
return {}
endif
return s:J.decode(response.content)
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment