Skip to content

Commit

Permalink
Add cursor support to /accounts/<addr>/resources (#5313)
Browse files Browse the repository at this point in the history
  • Loading branch information
banool committed Nov 16, 2022
1 parent a79b59b commit c3a3469
Show file tree
Hide file tree
Showing 17 changed files with 867 additions and 43 deletions.
205 changes: 205 additions & 0 deletions api/doc/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -602,6 +609,29 @@
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "start",
"schema": {
"$ref": "#/components/schemas/StateKeyWrapper"
},
"in": "query",
"description": "Cursor specifying where to start for pagination\n\nThis cursor cannot be derived manually client-side. Instead, you must\ncall this endpoint once without this query parameter specified, and\nthen use the cursor returned in the X-Aptos-Cursor header in the\nresponse.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "query",
"description": "Max number of account resources to retrieve\n\nIf not provided, defaults to default page size.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
Expand Down Expand Up @@ -689,6 +719,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -1133,6 +1170,29 @@
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "start",
"schema": {
"$ref": "#/components/schemas/StateKeyWrapper"
},
"in": "query",
"description": "Cursor specifying where to start for pagination\n\nThis cursor cannot be derived manually client-side. Instead, you must\ncall this endpoint once without this query parameter specified, and\nthen use the cursor returned in the X-Aptos-Cursor header in the\nresponse.",
"required": false,
"deprecated": false,
"explode": true
},
{
"name": "limit",
"schema": {
"type": "integer",
"format": "uint16"
},
"in": "query",
"description": "Max number of account modules to retrieve\n\nIf not provided, defaults to default page size.",
"required": false,
"deprecated": false,
"explode": true
}
],
"responses": {
Expand Down Expand Up @@ -1220,6 +1280,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -1760,6 +1827,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -2017,6 +2091,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -2546,6 +2627,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -3100,6 +3188,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -3665,6 +3760,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -4169,6 +4271,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -4572,6 +4681,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -5111,6 +5227,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -5649,6 +5772,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -6181,6 +6311,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -6702,6 +6839,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -7219,6 +7363,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -7736,6 +7887,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -8279,6 +8437,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -8805,6 +8970,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -8889,6 +9061,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -9450,6 +9629,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -9964,6 +10150,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -10332,6 +10525,13 @@
"type": "integer",
"format": "uint64"
}
},
"X-APTOS-CURSOR": {
"description": "Cursor to be used for endpoints that support cursor-based\npagination. Pass this to the `start` field of the endpoint\non the next call to get the next page of results.",
"deprecated": false,
"schema": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -11844,6 +12044,11 @@
}
}
},
"StateKeyWrapper": {
"type": "string",
"description": "Representation of a StateKey as a hex string. This is used for cursor based pagination.\n",
"example": "0000000000000000000000000000000000000000000000000000000000000000012f0000000000000000000000000000000000000000000000000000000000000000010d7374616b696e675f70726f7879"
},
"SubmitTransactionRequest": {
"type": "object",
"description": "A request to submit a transaction\n\nThis requires a transaction and a signature of it",
Expand Down
Loading

0 comments on commit c3a3469

Please sign in to comment.