我正在使用以下代码来检索API数据:
let iterations = 10,
url =“https://graph.facebook.com/v2.10/[ACCOUNT ID] /见解?access_token = [ACCESS TOKEN]”,
FnGetOnePage =
(url) as record =>
let
Source = Json.Document(Web.Contents(url)),
data = try Source[data] otherwise null,
next = try Source[paging][next] otherwise null,
res = [Data=data, Next=next]
in
res,
GeneratedList =
List.Generate(
()=>[i=0, res = FnGetOnePage(url)],
each [i]<iterations and [res][Data]<>null,
each [i=[i]+1, res = FnGetOnePage([res][Next])],
each [res][Data])
in
GeneratedList
我需要对原始代码进行哪些更改?
非常感谢任何帮助,建议或指导!
非常感谢, Tanim