获取最新版本

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. 12.1.VUE学习之-循环li,if判断示例讲解class中应用表达式

    功能: 当点击按键时,改变当前循环数组里的status里的值, 判断staus里的当前的值来,切换显示 删除 和 恢复 的按钮 判断staus里的当前的值来改变span标签里的字体颜色样式 <! ...

  2. Java List 的深拷贝

    老是会遇到深拷贝与浅拷贝的问题,这里进行了一些測试.代码例如以下: </pre><pre name="code" class="java"&g ...

  3. mysql进阶二

    数据库存储数据的特点: 1.数据存放到表中,然后表再放到库中 2.一个库中可以有多张表,每张表具有唯一的表名来标识自己 3.表中有一个或多个列,列又称为“字段” 数据库常见的管理系统 mysql.or ...

  4. java的类加载器体系结构和双亲委派机制

    类加载器将字节码文件加载到内存中,同时在方法区中生成对应的java.land.class对象  作为外部访问方法区的入口. 类加载器的层次结构: 引导类加载器<-------------扩展类加 ...

  5. cakephp 中Console / Shell 有什么优点?

    Which is the advantage of using CakePHP Console / Shell for programmed tasks ? 查看原文 最近用到了cakephp中的sh ...

  6. php和js中数组的总结

      php中数组的表示方法:array()或者[] js中数组的表示方法:new array()或者[] 一.php中初始化命名数组 在PHP中声明数组的方式主要有两种:一是应用array()函数声明 ...

  7. 设计模式之第5章-解释器模式(Java实现)

    设计模式之第5章-解释器模式(Java实现) “开个商店好麻烦,做个收单的系统,发现类的方法好多.”“真是的,不就是简单的四则运算,这都不会!”你说你会啊.来来来,你把以下的方法用代码写出来: a+b ...

  8. 【Word Break II】cpp

    题目: Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where e ...

  9. CSC.exe(C#编译器命令行)

    不要在普通的命令行窗口中编译,请先打开C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2010 ...

  10. SDRAM学习(二)之初始化

    目录 1.SDRAM初始化的内容(结合英文数据手册) 2.SDRAM初始化的时序 3.代码的编写 4.modesim的仿真 SDRAM初始化的内容 SDRAMs must be powered up ...