use reqwest;
const GET_URL:&str = "https://git.wuembed.com/api/v1/repos/z/hardware_toolkit/releases/latest";

/// example json content:
///
/// {
//   "id": 3,
//   "tag_name": "0.0.3",
//   "target_commitish": "master",
//   "name": "测试发布标题",
//   "body": "测试版本描述",
//   "url": "https://git.wuembed.com/api/v1/repos/z/hardware_toolkit/releases/3",
//   "html_url": "https://git.wuembed.com/z/hardware_toolkit/releases/tag/0.0.3",
//   "tarball_url": "https://git.wuembed.com/z/hardware_toolkit/archive/0.0.3.tar.gz",
//   "zipball_url": "https://git.wuembed.com/z/hardware_toolkit/archive/0.0.3.zip",
//   "upload_url": "https://git.wuembed.com/api/v1/repos/z/hardware_toolkit/releases/3/assets",
//   "draft": false,
//   "prerelease": false,
//   "created_at": "2025-07-04T01:23:07+08:00",
//   "published_at": "2025-07-04T01:23:07+08:00",
//   "author": {
//     "id": 1,
//     "login": "z",
//     "login_name": "",
//     "source_id": 0,
//     "full_name": "",
//     "email": "z@noreply.localhost",
//     "avatar_url": "https://git.wuembed.com/avatars/8b2edd24e3e5e88d3e78b5d40989440439931b3bcf7f3702ce87e5b345080c72",
//     "html_url": "https://git.wuembed.com/z",
//     "language": "",
//     "is_admin": false,
//     "last_login": "0001-01-01T00:00:00Z",
//     "created": "2025-06-18T16:21:24+08:00",
//     "restricted": false,
//     "active": false,
//     "prohibit_login": false,
//     "location": "",
//     "website": "",
//     "description": "",
//     "visibility": "public",
//     "followers_count": 0,
//     "following_count": 0,
//     "starred_repos_count": 0,
//     "username": "z"
//   },
//   "assets": [
//     {
//       "id": 2,
//       "name": "hardware_toolkit.exe",
//       "size": 41979904,
//       "download_count": 0,
//       "created_at": "2025-07-04T01:23:05+08:00",
//       "uuid": "a1bc2d0d-bf43-4eb5-b28b-26bdd413c4ce",
//       "browser_download_url": "https://git.wuembed.com/z/hardware_toolkit/releases/download/0.0.3/hardware_toolkit.exe"
//     }
//   ]
// }

#[derive(serde::Serialize,serde::Deserialize)]
struct Assets{
    id:u32,
    name:String,
    size:usize,
    download_count:u32,
    created_at:String,
    browser_download_url:String,
}
#[derive(serde::Serialize, serde::Deserialize)]
struct ReleaseTag{
    // 对标于版本号
    tag_name:String,
    // 对标于发布标题
    name:String,
    // 对标于版本描述
    body:String,
}

