Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
waddaboo committed Dec 17, 2024
1 parent 1e10c3a commit fc3c9f6
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
29 changes: 29 additions & 0 deletions apps/docs/docs/api-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,21 @@ const memberId = "1"
const groups = await apiSdk.getGroupsByMemberId(memberId)
```

## Get groups by group ids

\# **getGroupByGroupIds**(): _Promise\<Group[]>_

Returns the list of groups by group ids.

```ts
const groupIds = [
"10402173435763029700781503965100",
"20402173435763029700781503965200"
]

const groups = await apiSdk.getGroupsByGroupIds(groupIds)
```

## Is group member

\# **isGroupMember**(): _Promise\<boolean>_
Expand Down Expand Up @@ -390,6 +405,20 @@ const inviteCode = "MQYS4UR5"
await apiSdk.addMemberByInviteCode(groupId, memberId, inviteCode)
```

## Add member to groups using an API Key

\# **addMemberToGroupsByApiKey**(): _Promise\<Group[]>_

Adds a member to multiple groups using an API Key.

```ts
const groupIds = ["10402173435763029700781503965100", "20402173435763029700781503965200"]
const memberId = "1"
const apiKey = "70f07d0d-6aa2-4fe1-b4b9-06c271a641dc"

await apiSdk.addMemberToGroupsByApiKey(groupIds, memberId, apiKey)
```

## Remove member using an API Key

\# **removeMemberByApiKey**(): _Promise\<void>_
Expand Down
32 changes: 32 additions & 0 deletions libs/api-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,21 @@ const memberId = "1"
const groups = await apiSdk.getGroupsByMemberId(memberId)
```

## Get groups by group ids

\# **getGroupByGroupIds**(): _Promise\<Group[]>_

Returns the list of groups by group ids.

```ts
const groupIds = [
"10402173435763029700781503965100",
"20402173435763029700781503965200"
]

const groups = await apiSdk.getGroupsByGroupIds(groupIds)
```

## Is group member

\# **isGroupMember**(): _Promise\<boolean>_
Expand Down Expand Up @@ -413,6 +428,23 @@ const inviteCode = "MQYS4UR5"
await apiSdk.addMemberByInviteCode(groupId, memberId, inviteCode)
```

## Add member to groups using an API Key

\# **addMemberToGroupsByApiKey**(): _Promise\<Group[]>_

Adds a member to multiple groups using an API Key.

```ts
const groupIds = [
"10402173435763029700781503965100",
"20402173435763029700781503965200"
]
const memberId = "1"
const apiKey = "70f07d0d-6aa2-4fe1-b4b9-06c271a641dc"

await apiSdk.addMemberToGroupsByApiKey(groupIds, memberId, apiKey)
```

## Remove member using an API Key

\# **removeMemberByApiKey**(): _Promise\<void>_
Expand Down

0 comments on commit fc3c9f6

Please sign in to comment.