Class MetaClient
java.lang.Object
ink.icoding.github4j.GithubClient
ink.icoding.github4j.client.MetaClient
GitHub API 元数据客户端。
提供 API 根端点、服务器元信息、Octocat、Zen 等基础信息查询。
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription获取 GitHub API 根端点信息。getMeta()获取 GitHub 服务器元信息(IP 地址、已安装的钩子类型等)。getOctocat(String s) 获取 Octocat ASCII 图案。获取当前 API 速率限制状态。getZen()获取一句 Zen of GitHub 语录。Methods inherited from class GithubClient
actions, builder, configureObjectMapper, delete, get, get, getPaged, getRaw, gists, git, issues, meta, notifications, orgs, patch, post, projects, pulls, put, putNoBody, releases, repos, search, teams, users, webhooksModifier and TypeMethodDescriptionactions()static GithubClientBuilderbuilder()protected com.fasterxml.jackson.databind.ObjectMapperconfigureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) protected GithubResponse<Void> protected <T> GithubResponse<T> get(String path, com.fasterxml.jackson.core.type.TypeReference<T> typeRef, Map<String, String> queryParams) protected <T> GithubResponse<T> protected <T> Page<T> protected GithubResponse<byte[]> gists()git()issues()meta()orgs()protected <T> GithubResponse<T> protected <T> GithubResponse<T> projects()pulls()protected <T> GithubResponse<T> protected GithubResponse<Void> releases()repos()search()teams()users()webhooks()
-
Constructor Details
-
MetaClient
-
-
Method Details
-
getApiRoot
获取 GitHub API 根端点信息。对应端点:
GET /- Returns:
- API 根端点的链接信息
-
getMeta
获取 GitHub 服务器元信息(IP 地址、已安装的钩子类型等)。对应端点:
GET /meta- Returns:
- 服务器元信息,包含 hooks、web、api、git 等 IP 段
-
getOctocat
获取 Octocat ASCII 图案。对应端点:
GET /octocat- Parameters:
s- 可选的自定义消息(显示在 Octocat 旁边)- Returns:
- Octocat ASCII 艺术字
-
getZen
获取一句 Zen of GitHub 语录。对应端点:
GET /zen- Returns:
- GitHub 的设计哲学语录
-
getRateLimit
获取当前 API 速率限制状态。对应端点:
GET /rate_limit返回 core、search、graphql、integration_manifest 等各类资源的限额信息。
- Returns:
- 速率限制概览,包含各类资源的 limit、remaining、reset 时间
-