12 lines
680 B
Plaintext
12 lines
680 B
Plaintext
xquery version "3.1";
|
|
|
|
|
|
import module namespace auth="http://release11.com/xquery-allegro-api/authorization" at "authorization.xqm";
|
|
|
|
import module namespace allegro="http://release11.com/xquery-allegro-api/api" at "api.xqm";
|
|
|
|
|
|
let $accessToken := auth:get-access-token("https://allegro.pl/auth/oauth/token?grant_type=client_credentials","NGI3OWMyM2RhOTMxNGE2Y2E0MzhmYTg0YjhjYzA3MDg6UjB5SERBR292TVRDUFQ3aDMxbjltUHNxNWtNT1o1cktZS3k2aXN3dUFMNVppbzBqem9EYkFidU5WYjJsdkp3TQ==")
|
|
let $authorizationHeader := auth:get-authorization-header($accessToken, "Bearer")
|
|
let $categories := allegro:get-categories($authorizationHeader, "https://api.allegro.pl/sale/categories")
|
|
return $categories |