获取最新版本

https://api.github.com/repos/nickchou/paopao/releases/latest

获取版本列表

https://api.github.com/repos/nickchou/paopao/releases

nickhou:github账号,根据需要换成需要的

paopao:github托管的repo项目名,更换为自己想要的

http抓取数据反序列化后解析即可

案例:github获取最新版本(/releases/latest)返回的json

{
"url": "https://api.github.com/repos/nickchou/paopao/releases/12361298",
"assets_url": "https://api.github.com/repos/nickchou/paopao/releases/12361298/assets",
"upload_url": "https://uploads.github.com/repos/nickchou/paopao/releases/12361298/assets{?name,label}",
"html_url": "https://github.com/nickchou/paopao/releases/tag/v1.2",
"id": 12361298,
"node_id": "MDc6UmVsZWFzZTEyMzYxMjk4",
"tag_name": "v1.2",
"target_commitish": "master",
"name": "paopao.v1.2",
"draft": false,
"author": {
"login": "nickchou",
"id": 5896766,
"node_id": "MDQ6VXNlcjU4OTY3NjY=",
"avatar_url": "https://avatars2.githubusercontent.com/u/5896766?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nickchou",
"html_url": "https://github.com/nickchou",
"followers_url": "https://api.github.com/users/nickchou/followers",
"following_url": "https://api.github.com/users/nickchou/following{/other_user}",
"gists_url": "https://api.github.com/users/nickchou/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nickchou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nickchou/subscriptions",
"organizations_url": "https://api.github.com/users/nickchou/orgs",
"repos_url": "https://api.github.com/users/nickchou/repos",
"events_url": "https://api.github.com/users/nickchou/events{/privacy}",
"received_events_url": "https://api.github.com/users/nickchou/received_events",
"type": "User",
"site_admin": false
},
"prerelease": false,
"created_at": "2018-08-11T14:16:10Z",
"published_at": "2018-08-11T14:19:58Z",
"assets": [
{
"url": "https://api.github.com/repos/nickchou/paopao/releases/assets/8212410",
"id": 8212410,
"node_id": "MDEyOlJlbGVhc2VBc3NldDgyMTI0MTA=",
"name": "paopao.v1.2.rar",
"label": null,
"uploader": {
"login": "nickchou",
"id": 5896766,
"node_id": "MDQ6VXNlcjU4OTY3NjY=",
"avatar_url": "https://avatars2.githubusercontent.com/u/5896766?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nickchou",
"html_url": "https://github.com/nickchou",
"followers_url": "https://api.github.com/users/nickchou/followers",
"following_url": "https://api.github.com/users/nickchou/following{/other_user}",
"gists_url": "https://api.github.com/users/nickchou/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nickchou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nickchou/subscriptions",
"organizations_url": "https://api.github.com/users/nickchou/orgs",
"repos_url": "https://api.github.com/users/nickchou/repos",
"events_url": "https://api.github.com/users/nickchou/events{/privacy}",
"received_events_url": "https://api.github.com/users/nickchou/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/octet-stream",
"state": "uploaded",
"size": 120482,
"download_count": 3,
"created_at": "2018-08-11T14:19:42Z",
"updated_at": "2018-08-11T14:19:46Z",
"browser_download_url": "https://github.com/nickchou/paopao/releases/download/v1.2/paopao.v1.2.rar"
}
],
"tarball_url": "https://api.github.com/repos/nickchou/paopao/tarball/v1.2",
"zipball_url": "https://api.github.com/repos/nickchou/paopao/zipball/v1.2",
"body": "* 新增多线程支持\r\n* 新增线程可暂停、终止功能\r\n* 继续优化log4net日志格式\r\n* 窗体resize控件自使用,虽然还是有点丑,讲究用吧\r\n* 执行结果日期格式精简\r\n* 文本日志去空格换行等"
}

github 获取repo 发布的版本号的更多相关文章

  1. Github获取仓库最新Release版本号API

    package me.chunsheng.hongbao.utils; import android.content.Context; import android.content.Intent; i ...

  2. ClickOnce 获取客户端发布版本号

    https://social.microsoft.com/Forums/es-ES/26786b8d-0155-4261-9672-11b786d8c1d6/clickonceandsetup /// ...

  3. Linux获取so/ko文件版本号教程

    一.需要获取版本号的原因 从使用角度而言,有时只有特定版本的库才支持某些功能,所以我们需要确定库文件版本号. 从安全加固角度而言,有些版本存在漏洞有些版本不存在漏洞,所以我们需要获取版本号以确定当前使 ...

  4. Android 发布自动版本号方案

    以前看到一些自动化版本号打包的文章.如果您的项目是用 Git 管理的,并且恰巧又是使用 Gradle 编译(应该绝大部分都是这样的了吧?),本文试图找到一种更加优雅的自动版本管理方法. 背景 我们都知 ...

  5. android 获取应用的当前版本号&获取当前android系统的版本号

    (转自:http://www.cnblogs.com/qsl568/archive/2012/03/14/2395636.html) 获取当前应用的版本号: private String getVer ...

  6. JS获取浏览器类型和版本号

    JS获取浏览器类型和版本号,增加了IE11的判断. 2015/7/5更新: 简化代码逻辑 var zbrowser = {} var ua = navigator.userAgent.toLowerC ...

  7. C++通用WMI接口实现获取Windows操作系统内核版本号

    作为一名Windows开发者,能熟练掌握WMI技术,在开发Windows应用程序的时候往往能够事半功倍.今天来给大家分享一个使用WMI来获取Windows操作系统内核版本号的例子. 首先我们打开WMI ...

  8. Delphi2010如何获取程序内部自身版本号?

    用原来的GetFileVersionInfo只能获取Delpi7的程序版本号,用在Delphi2010中就不管用了 //------ 获取文件版本号function F_GetFileVersion( ...

  9. Android 获取当前应用的版本号和当前系统的版本号

    1.获取当前程序版本名 我们可以在AndroidManifest.xml中设置程序的版本号等,如android:versionName="1.0",那如果想在代码中获取这个版本号呢 ...

随机推荐

  1. 并查集:HDU4496-D-City(倒用并查集)

    D-City Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submis ...

  2. 3、python中的字符串

    一.前言 字符串是python中重要的数据类型.字符串就是一段文本,在python中用引号来标示. 二.字符串分类 字符串根据使用场景不同,一共分成3类: (1)单引号.双引号创建的单行字符串: 在单 ...

  3. Java面向对象---类与对象的关系

    类是对某一类事物的描述,是抽象的.概念上的意义.对象是实际存在的该类事物的每一个个体,也被称为实例. 创建对象:包括声明对象和实例化对象 Person person;//声明 person = new ...

  4. P2920 [USACO08NOV]时间管理Time Management

    P2920 [USACO08NOV]时间管理Time Management 题目描述 Ever the maturing businessman, Farmer John realizes that ...

  5. [转]Git for windows 下vim解决中文乱码的有关问题

    Git for windows 下vim解决中文乱码的问题 原文链接:Git for windows 下vim解决中文乱码的有关问题 1.右键打开Git bash: 2.cd ~ 3.vim .vim ...

  6. js中基础数据类型

    变量声明 undefined //未定义只声明   var age; alert(name);function fc(a1,a2,a3) { //alert(a1); //alert(a2); //a ...

  7. 【IPv6】ISATAP隧道技术详解

    一.基本概念       ISATAP(Intra-SiteAutomatic Tunnel Addressing Protocol)    ISATAP是一种非常容易部署和使用的IPv6过渡机制.在 ...

  8. C++ STL map容器的说明测试1

    // maptest.cpp : 定义控制台应用程序的入口点.// #include "stdafx.h" /*********************************** ...

  9. phpmyadmin4.8.1后台getshell

    phpmyadmin4.8.1后台getshell 包含文件进行getshell 姿势: ① 建立数据库的,新建表,字段名为一句话木马. 会生成对应的数据库文件,相应文件的路径查看 select @@ ...

  10. Python+Selenium基础篇之2-打开和关闭火狐浏览器

    本节介绍如何初始化一个webdriver实例对象driver,然后打开和关闭firefox浏览器.要用selenium打开fiefox浏览器.首先需要去下载一个driver插件geckodriver. ...