【发布时间】:2022-03-13 13:47:26
【问题描述】:
我一直在尝试通过 GitHub 公开的 GraphQL API 从我的存储库中获取打开的图形图像,但我总是取回我的头像。我尝试查询存储库节点、搜索和用户节点均无济于事。
例如,对于查询:
query {
repository(name: "rust-algorithms", owner: "alexfertel") {
openGraphImageUrl
nameWithOwner
}
}
我明白了:
"repository": {
"openGraphImageUrl": "https://avatars.githubusercontent.com/u/22298999?s=400&v=4",
"nameWithOwner": "alexfertel/rust-algorithms"
},
你可以看出它给出了一个头像,而不是 GitHub 为存储库生成的开放图形图像。
有没有办法在不涉及抓取 GitHub 的情况下获取此图像?
【问题讨论】:
标签: github graphql github-api