mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-19 20:19:15 +00:00
fix(bot): 📝 more docs
This commit is contained in:
19
packages/docs/src/services/opencollective.ts
Normal file
19
packages/docs/src/services/opencollective.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* GET API from OpenCollective
|
||||
* @returns
|
||||
*/
|
||||
export const fetchOpenCollective = async () => {
|
||||
const data = await fetch(
|
||||
`https://opencollective.com/bot-whatsapp/members/users.json?limit=10&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,
|
||||
}))
|
||||
}
|
||||
Reference in New Issue
Block a user