Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add getGroupsByGroupIds and addMemberToGroups #643

Merged
merged 6 commits into from
Feb 27, 2025

Conversation

waddaboo
Copy link
Contributor

Description

This PR introduces 2 new features to API and API SDK which allows users to:

  • Get groups with multiple group ids.
  • Add member to multiple groups.

getGroupsByGroupIds:

API

GET http://localhost:3000/groups?groupIds={groupId}&groupIds={groupId}
const groupIds = ["1", "2"]
const groups = await this.groupsService.getGroups(groupIds)

API SDK

const groupIds = ["1", "2"]
const groups = await apiSdk.getGroupsByGroupIds(groupIds)

addMemberToGroups:

API

POST http://localhost:3000/groups/member/{memberId}
const memberId = "memberId"
const groupIds = ["1", "2"]
const adminId = "adminId"
const apiKey = "apiKey"

const manual = await this.groupsService.addMemberToGroupsManually(groupIds, memberId, adminId)
const api = await this.groupsService.addMemberToGroupsWithApiKey(groupIds, memberId, apiKey)

API SDK

const groupIds = ["1", "2"]
const memberId = "memberId"
const apiKey = "apiKey"

await apiSdk.addMemberToGroupsByApiKey(groupIds, memberId, apiKey)

Related Issue

Closes #633

Does this introduce a breaking change?

  • Yes
  • No

@waddaboo waddaboo requested a review from vplasencia December 17, 2024 11:56
Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bandada-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 5:30am
bandada-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2024 5:30am

Copy link
Member

@vplasencia vplasencia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @waddaboo great work with this PR 💯

I left some comments.

@vplasencia vplasencia merged commit 6562303 into dev Feb 27, 2025
5 checks passed
Copy link

gitpoap-bot bot commented Feb 27, 2025

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2025 Bandada Contributor:

GitPOAP: 2025 Bandada Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants