//native
type Miro = {
token: string;
};
/**
* Get a group by its ID
* Returns a list of items in a specific group. Required scope boards:read
Rate limiting Level 2 per item ID
*/
export async function main(auth: Miro, board_id: string, group_id: string) {
const url = new URL(
`https://api.miro.com//v2/boards/${board_id}/groups/${group_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