Pimentoso / mini4wdchrono

Software for Arduino based 3-lane lap timer for Tamiya Mini4wd.
MIT License
21 stars 1 forks source link

Check for updates automatically with Github API #63

Open Pimentoso opened 4 years ago

Pimentoso commented 4 years ago

API endpoint: https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/latest

Sample output:

{"url"=>
  "https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/31844547",
 "assets_url"=>
  "https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/31844547/assets",
 "upload_url"=>
  "https://uploads.github.com/repos/Pimentoso/mini4wdchrono/releases/31844547/assets{?name,label}",
 "html_url"=>"https://github.com/Pimentoso/mini4wdchrono/releases/tag/0.13.3",
 "id"=>31844547,
 "node_id"=>"MDc6UmVsZWFzZTMxODQ0NTQ3",
 "tag_name"=>"0.13.3",
 "target_commitish"=>"master",
 "name"=>"v0.13.3 - 2020/9/26",
 "draft"=>false,
 "author"=>
  {"login"=>"Pimentoso",
   "id"=>6085909,
   "node_id"=>"MDQ6VXNlcjYwODU5MDk=",
   "avatar_url"=>"https://avatars2.githubusercontent.com/u/6085909?v=4",
   "gravatar_id"=>"",
   "url"=>"https://api.github.com/users/Pimentoso",
   "html_url"=>"https://github.com/Pimentoso",
   "followers_url"=>"https://api.github.com/users/Pimentoso/followers",
   "following_url"=>
    "https://api.github.com/users/Pimentoso/following{/other_user}",
   "gists_url"=>"https://api.github.com/users/Pimentoso/gists{/gist_id}",
   "starred_url"=>
    "https://api.github.com/users/Pimentoso/starred{/owner}{/repo}",
   "subscriptions_url"=>"https://api.github.com/users/Pimentoso/subscriptions",
   "organizations_url"=>"https://api.github.com/users/Pimentoso/orgs",
   "repos_url"=>"https://api.github.com/users/Pimentoso/repos",
   "events_url"=>"https://api.github.com/users/Pimentoso/events{/privacy}",
   "received_events_url"=>
    "https://api.github.com/users/Pimentoso/received_events",
   "type"=>"User",
   "site_admin"=>false},
 "prerelease"=>false,
 "created_at"=>"2020-09-26T15:10:39Z",
 "published_at"=>"2020-09-26T15:14:04Z",
 "assets"=>
  [{"url"=>
     "https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/assets/26225611",
    "id"=>26225611,
    "node_id"=>"MDEyOlJlbGVhc2VBc3NldDI2MjI1NjEx",
    "name"=>"Mini4wdChrono-mac.zip",
    "label"=>nil,
    "uploader"=>
     {"login"=>"Pimentoso",
      "id"=>6085909,
      "node_id"=>"MDQ6VXNlcjYwODU5MDk=",
      "avatar_url"=>"https://avatars2.githubusercontent.com/u/6085909?v=4",
      "gravatar_id"=>"",
      "url"=>"https://api.github.com/users/Pimentoso",
      "html_url"=>"https://github.com/Pimentoso",
      "followers_url"=>"https://api.github.com/users/Pimentoso/followers",
      "following_url"=>
       "https://api.github.com/users/Pimentoso/following{/other_user}",
      "gists_url"=>"https://api.github.com/users/Pimentoso/gists{/gist_id}",
      "starred_url"=>
       "https://api.github.com/users/Pimentoso/starred{/owner}{/repo}",
      "subscriptions_url"=>
       "https://api.github.com/users/Pimentoso/subscriptions",
      "organizations_url"=>"https://api.github.com/users/Pimentoso/orgs",
      "repos_url"=>"https://api.github.com/users/Pimentoso/repos",
      "events_url"=>"https://api.github.com/users/Pimentoso/events{/privacy}",
      "received_events_url"=>
       "https://api.github.com/users/Pimentoso/received_events",
      "type"=>"User",
      "site_admin"=>false},
    "content_type"=>"application/zip",
    "state"=>"uploaded",
    "size"=>74385630,
    "download_count"=>0,
    "created_at"=>"2020-09-26T15:12:36Z",
    "updated_at"=>"2020-09-26T15:13:58Z",
    "browser_download_url"=>
     "https://github.com/Pimentoso/mini4wdchrono/releases/download/0.13.3/Mini4wdChrono-mac.zip"},
   {"url"=>
     "https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/assets/26225753",
    "id"=>26225753,
    "node_id"=>"MDEyOlJlbGVhc2VBc3NldDI2MjI1NzUz",
    "name"=>"Mini4wdChrono-windows.zip",
    "label"=>nil,
    "uploader"=>
     {"login"=>"Pimentoso",
      "id"=>6085909,
      "node_id"=>"MDQ6VXNlcjYwODU5MDk=",
      "avatar_url"=>"https://avatars2.githubusercontent.com/u/6085909?v=4",
      "gravatar_id"=>"",
      "url"=>"https://api.github.com/users/Pimentoso",
      "html_url"=>"https://github.com/Pimentoso",
      "followers_url"=>"https://api.github.com/users/Pimentoso/followers",
      "following_url"=>
       "https://api.github.com/users/Pimentoso/following{/other_user}",
      "gists_url"=>"https://api.github.com/users/Pimentoso/gists{/gist_id}",
      "starred_url"=>
       "https://api.github.com/users/Pimentoso/starred{/owner}{/repo}",
      "subscriptions_url"=>
       "https://api.github.com/users/Pimentoso/subscriptions",
      "organizations_url"=>"https://api.github.com/users/Pimentoso/orgs",
      "repos_url"=>"https://api.github.com/users/Pimentoso/repos",
      "events_url"=>"https://api.github.com/users/Pimentoso/events{/privacy}",
      "received_events_url"=>
       "https://api.github.com/users/Pimentoso/received_events",
      "type"=>"User",
      "site_admin"=>false},
    "content_type"=>"application/x-zip-compressed",
    "state"=>"uploaded",
    "size"=>72338418,
    "download_count"=>3,
    "created_at"=>"2020-09-26T15:23:12Z",
    "updated_at"=>"2020-09-26T15:24:34Z",
    "browser_download_url"=>
     "https://github.com/Pimentoso/mini4wdchrono/releases/download/0.13.3/Mini4wdChrono-windows.zip"}],
 "tarball_url"=>
  "https://api.github.com/repos/Pimentoso/mini4wdchrono/tarball/0.13.3",
 "zipball_url"=>
  "https://api.github.com/repos/Pimentoso/mini4wdchrono/zipball/0.13.3",
 "body"=>
  "- Renew some elements of the interface.\r\n" +
  "- Automatically scroll down interface when race is started to show times better on small screens."}