/
get-StoryousDataUniverzalWithoutRecursion.pq
42 lines (42 loc) · 1.36 KB
/
get-StoryousDataUniverzalWithoutRecursion.pq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
let
output =
(name as text, token as text, Id as text) =>
let
urlW = name & "/" & Id,
header = [
#"Authorization" = token
],
call =
Json.Document(
Web.Contents(
"https://api.storyous.com/",
[
RelativePath = urlW,
Headers = header
]
)
)
in
call,
documentation = [
Documentation.Name = " get-StoryousDataOfMarketPlaceBillsByAPI.pq ",
Documentation.Description = " Universal function to get data from Storyous API. You need API Token generated by get-StoryousAPIKey.pq ",
Documentation.Source = "https://www.jaknapowerbi.cz",
Documentation.Version = " 1.0 ",
Documentation.Author = " Štěpán Rešl ",
Documentation.Examples = {
[
Description = " Input: ""merchants"", #""Token"", IdForSpecificNameSpaceOfAPI ",
Code = "",
Result = ""
]
}
]
in
Value.ReplaceType(
output,
Value.ReplaceMetadata(
Value.Type(output),
documentation
)
)