我正在使用StackExchange App Documentation中的此代码从StackOverflow获取用户信息。
var arr2 = (1...10).map{ _ in Int(arc4random_uniform(50)) }.sorted()
print(arr2) // -> [4, 5, 14, 20, 21, 27, 30, 37, 39, 43]
print(arr2.first!) // -> 4
print(arr2.last!) // -> 43
此代码工作正常,但我注意到每次触发并给出响应access_token更改。我如何才能使用访问令牌获取用户信息。此外,这将返回用户所有其他网站的数据。如何将其限制为StackOverflow。我无法为此找到适当的文档。
有人可以指点我从StackExchange API进行API调用的JS方法吗?