//native
type Miro = {
token: string;
};
/**
* Get shape item
* Retrieves information for a specific shape item on a board.Required scope boards:read Rate limiting Level 1
*/
export async function main(auth: Miro, board_id: string, item_id: string) {
const url = new URL(
`https://api.miro.com//v2-experimental/boards/${board_id}/shapes/${item_id}`,
);
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: "Bearer " + auth.token,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 235 days ago