Created
April 3, 2015 14:51
-
-
Save rhysd/c2f37c569b958a31a137 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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