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

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

waddaboo
Copy link
Collaborator

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.

apps/api/src/app/groups/groups.controller.ts Outdated Show resolved Hide resolved
apps/api/src/app/groups/groups.controller.ts Outdated Show resolved Hide resolved
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