List
client.vals.list(ValListParams { limit, cursor, privacy, user_id } query, RequestOptionsoptions?): Cursor<Val { id, author, createdAt, 5 more } >
/v2/vals
Lists all vals including all public vals and your unlisted and private vals
Parameters
Returns
import ValTown from "npm:@valtown/sdk";
const client = new ValTown({
bearerToken: 'My Bearer Token',
});
// Automatically fetches more pages as needed.
for await (const val of client.vals.list({ limit: 1 })) {
console.log(val.id);
}
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"author": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"type": "user",
"username": "username"
},
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"imageUrl": "imageUrl",
"links": {
"html": "https://example.com",
"self": "https://example.com"
},
"name": "name",
"privacy": "public"
}
],
"links": {
"self": "https://example.com",
"next": "https://example.com",
"prev": "https://example.com"
}
}Returns Examples
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"author": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"type": "user",
"username": "username"
},
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"imageUrl": "imageUrl",
"links": {
"html": "https://example.com",
"self": "https://example.com"
},
"name": "name",
"privacy": "public"
}
],
"links": {
"self": "https://example.com",
"next": "https://example.com",
"prev": "https://example.com"
}
}