1
Github API允许我们通过不同的参数搜索用户,其中一个参数是location
。运行下面的查询将给出所有生活在巴基斯坦的用户:如何在Github API的搜索查询中使用'OR'?
curl https://api.github.com/search/users?q=location:pakistan
现在,我想获得的所有用户,要么生活在巴基斯坦和印度,但似乎Github上没有定义的方式因为在印度有巴基斯坦&。
我曾尝试以下查询,但这些都没有工作:
curl https://api.github.com/search/users?q=location:pakistan&location:india
curl https://api.github.com/search/users?q=location:(pakistan|india)
+1告诉我,我的第一次尝试是接近。 +1告诉我为什么我的尝试不工作。 +10(有意10_)用于回答真实情况。 –