mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 20:49:15 +00:00
17 lines
473 B
TypeScript
17 lines
473 B
TypeScript
/**
|
|
* GET API from OpenCollective
|
|
* @returns
|
|
*/
|
|
export const fetchOpenCollective = async () => {
|
|
const data = await fetch(`https://opencollective.com/bot-whatsapp/members/users.json?limit=22&offset=0`, {
|
|
method: 'GET',
|
|
})
|
|
const listUsers = await data.json()
|
|
return listUsers.map((u: any) => ({
|
|
html_url: u.profile,
|
|
avatar_url: u.image ?? 'https://i.imgur.com/HhiYKwN.png',
|
|
login: u.name,
|
|
id: u.MemberId,
|
|
}))
|
|
}
|