155

Github.vim - Another github v3 api implemented in vim script : vim online

 6 years ago
source link: http://www.vim.org/scripts/script.php?script_id=5625
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Another github v3 api implemented in vim script : vim online

Github.vim : Another github v3 api implemented in vim script

 script karma  Rating 8/2, Downloaded by 812  Comments, bugs, improvements  Vim wiki
created by
Shidong Wang
 
script type
utility
 
description
This is a vim script library to access the Github API v3. With it, you can manage Github resources (repositories, user profiles, organizations, etc.) from viml scripts.

for example, to creat an issue:

function! CreateIssue(owner, repo) abort
    let username = input('your github username:')
    let password = input('your github password:')
    let title = input('Issue title: ')
    let issue = {
                \ 'title': title,
                \ 'body': s:body(),
                \ }
    let response = github#api#issues#Create(a:owner, a:repo,
                \ username, password, issue)
    if !empty(response)
        echomsg 'Create successed! ' . response.url
    else
        echom 'Create failed!'
    endif
endfunction

func! s:body()
    return 'Testting Github.vim...'
endf
 
install details
For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the user making requests.Increasing the unauthenticated rate limit, you need Create OAuth app, and set EVN: CLIENTID and CLIENTSECRET.
 
rate this script Life Changing Helpful Unfulfilling 

script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
GitHub.vim-master.zip v0.1.1 2017-12-01 7.0 Shidong Wang Initial upload

ip used for rating: 45.77.178.235


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK