@platform/sdk-community
Typed TypeScript client for services/community. The page is generated from the SDK package source plus its generated OpenAPI types.
Installation
npm install @platform/sdk-communityYou’ll also need the shared auth/client helpers:
npm install @platform/hosts @platform/sdkQuick start
import { LoopClient } from "@platform/sdk";
import { platformHost, SERVICE_NAMES } from "@platform/hosts";
import { createCommunityClient } from "@platform/sdk-community";
const loop = new LoopClient({
clientId: process.env.LOOP_CLIENT_ID!,
clientSecret: process.env.LOOP_CLIENT_SECRET!,
redirectUri: "https://your-app.example.com/auth/loop/callback",
});
const community = createCommunityClient({
baseUrl: platformHost({ service: SERVICE_NAMES.COMMUNITY }),
accessToken: tokens.access_token,
});Use the convenience helpers below when the SDK exposes them, or call the typed endpoint methods directly with GET / POST / PATCH / DELETE.
Convenience helpers
banCommunityUser
Underlying REST endpoint: POST /v1/admin/community/users/\{user_id\}/ban
Parameters
userId: stringbody: BanCommunityUserBody
Return type
Promise<Result<UserRestriction>>Example
const result = await community.banCommunityUser("<userId>", {
/* BanCommunityUserBody */
});createActivity
Underlying REST endpoint: POST /v1/posts
Parameters
input: CreatePostBody
Return type
Promise<Result<Post>>Example
const result = await community.createActivity({
/* CreatePostBody */
});createComment
Underlying REST endpoint: POST /v1/posts/\{post_id\}/comments
Parameters
postId: stringinput: CreateCommentBody
Return type
Promise<Result<Comment>>Example
const result = await community.createComment("<postId>", {
/* CreateCommentBody */
});createCommunity
Underlying REST endpoint: POST /v1/communities
Parameters
input: CreateCommunityBody
Return type
Promise<Result<Community>>Example
const result = await community.createCommunity({
/* CreateCommunityBody */
});deleteActivity
Underlying REST endpoint: DELETE /v1/posts/\{post_id\}
Parameters
postId: string
Return type
Promise<Result<{ success: true }>>Example
const result = await community.deleteActivity("<postId>");deleteComment
Underlying REST endpoint: DELETE /v1/comments/\{comment_id\}
Parameters
commentId: string
Return type
Promise<Result<{ success: true }>>Example
const result = await community.deleteComment("<commentId>");deleteCommunity
Underlying REST endpoint: DELETE /v1/communities/\{slug\}
Parameters
slug: string
Return type
Promise<Result<{ success: true }>>Example
const result = await community.deleteCommunity("<slug>");deleteCommunityCommentAsAdmin
Underlying REST endpoint: DELETE /v1/admin/community/comments/\{comment_id\}
Parameters
commentId: stringbody: ModerationDeleteBody
Return type
Promise<Result<{ success: true; comment_id: string; deleted_at: string }>>Example
const result = await community.deleteCommunityCommentAsAdmin("<commentId>", {
/* ModerationDeleteBody */
});deleteCommunityPostAsAdmin
Underlying REST endpoint: DELETE /v1/admin/community/posts/\{post_id\}
Parameters
postId: stringbody: ModerationDeleteBody
Return type
Promise<Result<{ success: true; post_id: string; deleted_at: string }>>Example
const result = await community.deleteCommunityPostAsAdmin("<postId>", {
/* ModerationDeleteBody */
});deleteDraft
Underlying REST endpoint: DELETE /v1/drafts/\{id\}
Parameters
id: string
Return type
Promise<Result<{ success: true }>>Example
const result = await community.deleteDraft("<id>");getActivity
Underlying REST endpoint: GET /v1/posts/\{post_id\}
Parameters
postId: string
Return type
Promise<Result<Post>>Example
const result = await community.getActivity("<postId>");getCommunity
Underlying REST endpoint: GET /v1/communities/\{slug\}
Parameters
slug: string
Return type
Promise<Result<Community>>Example
const result = await community.getCommunity("<slug>");getComparison
Underlying REST endpoint: GET /v1/comparisons/\{after_milestone_id\}
Parameters
afterMilestoneId: string
Return type
Promise<Result<Comparison>>Example
const result = await community.getComparison("<afterMilestoneId>");getMilestone
Underlying REST endpoint: GET /v1/milestones/by-id/\{id\}
Parameters
milestoneId: string
Return type
Promise<Result<Milestone>>Example
const result = await community.getMilestone("<milestoneId>");getPoll
Underlying REST endpoint: GET /v1/polls/\{post_id\}
Parameters
postId: string
Return type
Promise<Result<Poll>>Example
const result = await community.getPoll("<postId>");joinCommunity
Underlying REST endpoint: POST /v1/communities/\{slug\}/join
Parameters
slug: string
Return type
Promise<Result<Membership>>Example
const result = await community.joinCommunity("<slug>");leaveCommunity
Underlying REST endpoint: POST /v1/communities/\{slug\}/leave
Parameters
slug: string
Return type
Promise<Result<{ success: true }>>Example
const result = await community.leaveCommunity("<slug>");listActivitiesByAuthor
Underlying REST endpoint: GET /v1/posts/by-author/\{author_id\}
Parameters
opts: ListPostsByAuthorOpts
Return type
Promise<Result<FeedPage>>Example
const result = await community.listActivitiesByAuthor({
/* ListPostsByAuthorOpts */
});listActivitiesByCashtag
Underlying REST endpoint: GET /v1/posts/by-cashtag/\{tag\}
Parameters
opts: ListPostsByCashtagOpts
Return type
Promise<Result<CashtagPostPage>>Example
const result = await community.listActivitiesByCashtag({
/* ListPostsByCashtagOpts */
});listActivitiesByTag
Underlying REST endpoint: GET /v1/posts/by-tag/\{name\}
Parameters
opts: ListPostsByTagOpts
Return type
Promise<Result<FeedPage>>Example
const result = await community.listActivitiesByTag({
/* ListPostsByTagOpts */
});listAdminModerationUsers
Underlying REST endpoint: GET /v1/admin/community/users
Parameters
opts?: ListAdminModerationUsersOpts
Return type
Promise<Result<{ data: AdminModerationUser[] }>>Example
const result = await community.listAdminModerationUsers({
/* ListAdminModerationUsersOpts */
});listAdminReports
Underlying REST endpoint: GET /v1/admin/reports
Parameters
status?: "pending" | "resolved"
Return type
Promise<Result<{ data: ReportItem[] }>>Example
const result = await community.listAdminReports({
/* "pending" | "resolved" */
});listComments
Underlying REST endpoint: GET /v1/posts/\{post_id\}/comments
Parameters
opts: ListCommentOpts
Return type
Promise<Result<CommentPage>>Example
const result = await community.listComments({
/* ListCommentOpts */
});listCommunities
Underlying REST endpoint: GET /v1/communities
Parameters
opts?: ListCommunitiesOpts
Return type
Promise<Result<CommunityListPage>>Example
const result = await community.listCommunities({
/* ListCommunitiesOpts */
});listDrafts
Underlying REST endpoint: GET /v1/drafts
Parameters
None
Return type
Promise<Result<DraftPage>>Example
const result = await community.listDrafts();listFeedActivities
Underlying REST endpoint: GET /v1/feed/\{user_id\}
Parameters
opts: ListFeedActivitiesOpts
Return type
Promise<Result<FeedPage>>Example
const result = await community.listFeedActivities({
/* ListFeedActivitiesOpts */
});listFollowers
Underlying REST endpoint: GET /v1/users/\{user_id\}/followers
Parameters
opts: ListFollowersOpts
Return type
Promise<Result<FollowUserSummaryPage>>Example
const result = await community.listFollowers({
/* ListFollowersOpts */
});listFollowingFor
Underlying REST endpoint: GET /v1/users/\{user_id\}/following
Parameters
opts: ListFollowersOpts
Return type
Promise<Result<FollowUserSummaryPage>>Example
const result = await community.listFollowingFor({
/* ListFollowersOpts */
});listMembers
Underlying REST endpoint: GET /v1/communities/\{slug\}/members
Parameters
opts: ListMembersOpts
Return type
Promise<Result<MemberPage>>Example
const result = await community.listMembers({
/* ListMembersOpts */
});listSuggestedFollows
Underlying REST endpoint: GET /v1/follows/suggestions
Parameters
opts?: ListSuggestedFollowsOpts
Return type
Promise<Result<{ data: FollowUserSummary[] }>>Example
const result = await community.listSuggestedFollows({
/* ListSuggestedFollowsOpts */
});saveDraft
Underlying REST endpoint: POST /v1/drafts
Parameters
input: CreateDraftBody
Return type
Promise<Result<Draft>>Example
const result = await community.saveDraft({
/* CreateDraftBody */
});subscribeFeed
Underlying REST endpoint: POST /v1/feed/subscriptions
Parameters
input: SubscribeBody
Return type
Promise<Result<Subscription>>Example
const result = await community.subscribeFeed({
/* SubscribeBody */
});suspendCommunityUser
Underlying REST endpoint: POST /v1/admin/community/users/\{user_id\}/suspend
Parameters
userId: stringbody: SuspendCommunityUserBody
Return type
Promise<Result<UserRestriction>>Example
const result = await community.suspendCommunityUser("<userId>", {
/* SuspendCommunityUserBody */
});unsubscribeFeed
Underlying REST endpoint: DELETE /v1/feed/subscriptions
Parameters
input: UnsubscribeBody
Return type
Promise<Result<{ success: true }>>Example
const result = await community.unsubscribeFeed({
/* UnsubscribeBody */
});updateActivity
Underlying REST endpoint: PATCH /v1/posts/\{post_id\}
Parameters
postId: stringpatch: UpdatePostBody
Return type
Promise<Result<Post>>Example
const result = await community.updateActivity("<postId>", {
/* UpdatePostBody */
});updateCommunity
Underlying REST endpoint: PATCH /v1/communities/\{slug\}
Parameters
slug: stringpatch: UpdateCommunityBody
Return type
Promise<Result<Community>>Example
const result = await community.updateCommunity("<slug>", {
/* UpdateCommunityBody */
});updateDraft
Underlying REST endpoint: PATCH /v1/drafts/\{id\}
Parameters
id: stringpatch: UpdateDraftBody
Return type
Promise<Result<Draft>>Example
const result = await community.updateDraft("<id>", {
/* UpdateDraftBody */
});votePoll
Underlying REST endpoint: POST /v1/polls/\{post_id\}/vote
Parameters
postId: stringbody: VotePollBody
Return type
Promise<Result<Poll>>Example
const result = await community.votePoll("<postId>", {
/* VotePollBody */
});Endpoint calls
GET /readyz
Underlying REST endpoint: GET /readyz
Parameters
None
Return type
Promise<{
data?: paths["/readyz"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/readyz");POST /v1/admin/communities/{slug}/members
Underlying REST endpoint: POST /v1/admin/communities/\{slug\}/members
Parameters
path: paths["/v1/admin/communities/{slug}/members"]["post"]["parameters"]["path"]body: paths["/v1/admin/communities/{slug}/members"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/admin/communities/{slug}/members"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/admin/communities/{slug}/members", {
params: {
path: {
slug: "<slug>",
},
},
body: {
/* paths["/v1/admin/communities/{slug}/members"]["post"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/admin/community/comments/{comment_id}
Underlying REST endpoint: DELETE /v1/admin/community/comments/\{comment_id\}
Parameters
path: paths["/v1/admin/community/comments/{comment_id}"]["delete"]["parameters"]["path"]body: paths["/v1/admin/community/comments/{comment_id}"]["delete"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/admin/community/comments/{comment_id}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/admin/community/comments/{comment_id}", {
params: {
path: {
comment_id: "<comment_id>",
},
},
body: {
/* paths["/v1/admin/community/comments/{comment_id}"]["delete"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/admin/community/posts/{post_id}
Underlying REST endpoint: DELETE /v1/admin/community/posts/\{post_id\}
Parameters
path: paths["/v1/admin/community/posts/{post_id}"]["delete"]["parameters"]["path"]body: paths["/v1/admin/community/posts/{post_id}"]["delete"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/admin/community/posts/{post_id}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/admin/community/posts/{post_id}", {
params: {
path: {
post_id: "<post_id>",
},
},
body: {
/* paths["/v1/admin/community/posts/{post_id}"]["delete"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/admin/community/users
Underlying REST endpoint: GET /v1/admin/community/users
Parameters
query?: paths["/v1/admin/community/users"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/admin/community/users"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/admin/community/users", {
params: {
query: {
/* paths["/v1/admin/community/users"]["get"]["parameters"]["query"] */
},
},
});POST /v1/admin/community/users/{user_id}/ban
Underlying REST endpoint: POST /v1/admin/community/users/\{user_id\}/ban
Parameters
path: paths["/v1/admin/community/users/{user_id}/ban"]["post"]["parameters"]["path"]body: paths["/v1/admin/community/users/{user_id}/ban"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/admin/community/users/{user_id}/ban"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/admin/community/users/{user_id}/ban", {
params: {
path: {
user_id: "<user_id>",
},
},
body: {
/* paths["/v1/admin/community/users/{user_id}/ban"]["post"]["requestBody"]["content"]["application/json"] */
},
});POST /v1/admin/community/users/{user_id}/suspend
Underlying REST endpoint: POST /v1/admin/community/users/\{user_id\}/suspend
Parameters
path: paths["/v1/admin/community/users/{user_id}/suspend"]["post"]["parameters"]["path"]body: paths["/v1/admin/community/users/{user_id}/suspend"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/admin/community/users/{user_id}/suspend"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/admin/community/users/{user_id}/suspend", {
params: {
path: {
user_id: "<user_id>",
},
},
body: {
/* paths["/v1/admin/community/users/{user_id}/suspend"]["post"]["requestBody"]["content"]["application/json"] */
},
});POST /v1/admin/erasure
Underlying REST endpoint: POST /v1/admin/erasure
Parameters
body: paths["/v1/admin/erasure"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/admin/erasure"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/admin/erasure", {
body: {
/* paths["/v1/admin/erasure"]["post"]["requestBody"]["content"]["application/json"] */
},
});POST /v1/admin/events/process
Underlying REST endpoint: POST /v1/admin/events/process
Parameters
None
Return type
Promise<{
data?: paths["/v1/admin/events/process"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/admin/events/process");POST /v1/admin/follows
Underlying REST endpoint: POST /v1/admin/follows
Parameters
body: paths["/v1/admin/follows"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/admin/follows"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/admin/follows", {
body: {
/* paths["/v1/admin/follows"]["post"]["requestBody"]["content"]["application/json"] */
},
});POST /v1/admin/insights/generate
Underlying REST endpoint: POST /v1/admin/insights/generate
Parameters
None
Return type
Promise<{
data?: paths["/v1/admin/insights/generate"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/admin/insights/generate");DELETE /v1/admin/posts/{post_id}/pin
Underlying REST endpoint: DELETE /v1/admin/posts/\{post_id\}/pin
Parameters
path: paths["/v1/admin/posts/{post_id}/pin"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/admin/posts/{post_id}/pin"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/admin/posts/{post_id}/pin", {
params: {
path: {
post_id: "<post_id>",
},
},
});POST /v1/admin/posts/{post_id}/pin
Underlying REST endpoint: POST /v1/admin/posts/\{post_id\}/pin
Parameters
path: paths["/v1/admin/posts/{post_id}/pin"]["post"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/admin/posts/{post_id}/pin"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/admin/posts/{post_id}/pin", {
params: {
path: {
post_id: "<post_id>",
},
},
});GET /v1/admin/reports
Underlying REST endpoint: GET /v1/admin/reports
Parameters
query?: paths["/v1/admin/reports"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/admin/reports"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/admin/reports", {
params: {
query: {
/* paths["/v1/admin/reports"]["get"]["parameters"]["query"] */
},
},
});POST /v1/admin/reports/{report_id}/resolve
Underlying REST endpoint: POST /v1/admin/reports/\{report_id\}/resolve
Parameters
path: paths["/v1/admin/reports/{report_id}/resolve"]["post"]["parameters"]["path"]body: paths["/v1/admin/reports/{report_id}/resolve"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/admin/reports/{report_id}/resolve"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/admin/reports/{report_id}/resolve", {
params: {
path: {
report_id: "<report_id>",
},
},
body: {
/* paths["/v1/admin/reports/{report_id}/resolve"]["post"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/admin/users/{user_id}/restrictions
Underlying REST endpoint: GET /v1/admin/users/\{user_id\}/restrictions
Parameters
path: paths["/v1/admin/users/{user_id}/restrictions"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/admin/users/{user_id}/restrictions"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/admin/users/{user_id}/restrictions", {
params: {
path: {
user_id: "<user_id>",
},
},
});GET /v1/blocks
Underlying REST endpoint: GET /v1/blocks
Parameters
query?: paths["/v1/blocks"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/blocks"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/blocks", {
params: {
query: {
/* paths["/v1/blocks"]["get"]["parameters"]["query"] */
},
},
});POST /v1/blocks
Underlying REST endpoint: POST /v1/blocks
Parameters
body: paths["/v1/blocks"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/blocks"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/blocks", {
body: {
/* paths["/v1/blocks"]["post"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/bookmarks
Underlying REST endpoint: GET /v1/bookmarks
Parameters
query?: paths["/v1/bookmarks"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/bookmarks"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/bookmarks", {
params: {
query: {
/* paths["/v1/bookmarks"]["get"]["parameters"]["query"] */
},
},
});POST /v1/bookmarks
Underlying REST endpoint: POST /v1/bookmarks
Parameters
body: paths["/v1/bookmarks"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/bookmarks"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/bookmarks", {
body: {
/* paths["/v1/bookmarks"]["post"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/bookmarks/{activity_id}
Underlying REST endpoint: DELETE /v1/bookmarks/\{activity_id\}
Parameters
path: paths["/v1/bookmarks/{activity_id}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/bookmarks/{activity_id}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/bookmarks/{activity_id}", {
params: {
path: {
activity_id: "<activity_id>",
},
},
});DELETE /v1/comments/{comment_id}
Underlying REST endpoint: DELETE /v1/comments/\{comment_id\}
Parameters
path: paths["/v1/comments/{comment_id}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/comments/{comment_id}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/comments/{comment_id}", {
params: {
path: {
comment_id: "<comment_id>",
},
},
});PATCH /v1/comments/{comment_id}
Underlying REST endpoint: PATCH /v1/comments/\{comment_id\}
Parameters
path: paths["/v1/comments/{comment_id}"]["patch"]["parameters"]["path"]body: paths["/v1/comments/{comment_id}"]["patch"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/comments/{comment_id}"]["patch"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.PATCH("/v1/comments/{comment_id}", {
params: {
path: {
comment_id: "<comment_id>",
},
},
body: {
/* paths["/v1/comments/{comment_id}"]["patch"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/comments/{comment_id}/reactions
Underlying REST endpoint: GET /v1/comments/\{comment_id\}/reactions
Parameters
path: paths["/v1/comments/{comment_id}/reactions"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/comments/{comment_id}/reactions"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/comments/{comment_id}/reactions", {
params: {
path: {
comment_id: "<comment_id>",
},
},
});POST /v1/comments/{comment_id}/reactions
Underlying REST endpoint: POST /v1/comments/\{comment_id\}/reactions
Parameters
path: paths["/v1/comments/{comment_id}/reactions"]["post"]["parameters"]["path"]body: paths["/v1/comments/{comment_id}/reactions"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/comments/{comment_id}/reactions"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/comments/{comment_id}/reactions", {
params: {
path: {
comment_id: "<comment_id>",
},
},
body: {
/* paths["/v1/comments/{comment_id}/reactions"]["post"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/comments/{comment_id}/reactions/{kind}
Underlying REST endpoint: DELETE /v1/comments/\{comment_id\}/reactions/\{kind\}
Parameters
path: paths["/v1/comments/{comment_id}/reactions/{kind}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/comments/{comment_id}/reactions/{kind}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/comments/{comment_id}/reactions/{kind}", {
params: {
path: {
comment_id: "<comment_id>",
kind: "<kind>",
},
},
});GET /v1/comments/by-author/{author_id}
Underlying REST endpoint: GET /v1/comments/by-author/\{author_id\}
Parameters
path: paths["/v1/comments/by-author/{author_id}"]["get"]["parameters"]["path"]query: paths["/v1/comments/by-author/{author_id}"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/comments/by-author/{author_id}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/comments/by-author/{author_id}", {
params: {
path: {
author_id: "<author_id>",
},
query: {
/* paths["/v1/comments/by-author/{author_id}"]["get"]["parameters"]["query"] */
},
},
});GET /v1/communities
Underlying REST endpoint: GET /v1/communities
Parameters
query?: paths["/v1/communities"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/communities"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/communities", {
params: {
query: {
/* paths["/v1/communities"]["get"]["parameters"]["query"] */
},
},
});POST /v1/communities
Underlying REST endpoint: POST /v1/communities
Parameters
body: paths["/v1/communities"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/communities"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/communities", {
body: {
/* paths["/v1/communities"]["post"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/communities/{slug}
Underlying REST endpoint: DELETE /v1/communities/\{slug\}
Parameters
path: paths["/v1/communities/{slug}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/communities/{slug}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/communities/{slug}", {
params: {
path: {
slug: "<slug>",
},
},
});GET /v1/communities/{slug}
Underlying REST endpoint: GET /v1/communities/\{slug\}
Parameters
path: paths["/v1/communities/{slug}"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/communities/{slug}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/communities/{slug}", {
params: {
path: {
slug: "<slug>",
},
},
});PATCH /v1/communities/{slug}
Underlying REST endpoint: PATCH /v1/communities/\{slug\}
Parameters
path: paths["/v1/communities/{slug}"]["patch"]["parameters"]["path"]body: paths["/v1/communities/{slug}"]["patch"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/communities/{slug}"]["patch"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.PATCH("/v1/communities/{slug}", {
params: {
path: {
slug: "<slug>",
},
},
body: {
/* paths["/v1/communities/{slug}"]["patch"]["requestBody"]["content"]["application/json"] */
},
});POST /v1/communities/{slug}/join
Underlying REST endpoint: POST /v1/communities/\{slug\}/join
Parameters
path: paths["/v1/communities/{slug}/join"]["post"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/communities/{slug}/join"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/communities/{slug}/join", {
params: {
path: {
slug: "<slug>",
},
},
});POST /v1/communities/{slug}/leave
Underlying REST endpoint: POST /v1/communities/\{slug\}/leave
Parameters
path: paths["/v1/communities/{slug}/leave"]["post"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/communities/{slug}/leave"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/communities/{slug}/leave", {
params: {
path: {
slug: "<slug>",
},
},
});GET /v1/communities/{slug}/members
Underlying REST endpoint: GET /v1/communities/\{slug\}/members
Parameters
path: paths["/v1/communities/{slug}/members"]["get"]["parameters"]["path"]query?: paths["/v1/communities/{slug}/members"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/communities/{slug}/members"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/communities/{slug}/members", {
params: {
path: {
slug: "<slug>",
},
query: {
/* paths["/v1/communities/{slug}/members"]["get"]["parameters"]["query"] */
},
},
});DELETE /v1/communities/{slug}/members/{user_id}
Underlying REST endpoint: DELETE /v1/communities/\{slug\}/members/\{user_id\}
Parameters
path: paths["/v1/communities/{slug}/members/{user_id}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/communities/{slug}/members/{user_id}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/communities/{slug}/members/{user_id}", {
params: {
path: {
slug: "<slug>",
user_id: "<user_id>",
},
},
});PATCH /v1/communities/{slug}/members/{user_id}
Underlying REST endpoint: PATCH /v1/communities/\{slug\}/members/\{user_id\}
Parameters
path: paths["/v1/communities/{slug}/members/{user_id}"]["patch"]["parameters"]["path"]body: paths["/v1/communities/{slug}/members/{user_id}"]["patch"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/communities/{slug}/members/{user_id}"]["patch"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.PATCH("/v1/communities/{slug}/members/{user_id}", {
params: {
path: {
slug: "<slug>",
user_id: "<user_id>",
},
},
body: {
/* paths["/v1/communities/{slug}/members/{user_id}"]["patch"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/communities/by-member/{user_id}
Underlying REST endpoint: GET /v1/communities/by-member/\{user_id\}
Parameters
path: paths["/v1/communities/by-member/{user_id}"]["get"]["parameters"]["path"]query?: paths["/v1/communities/by-member/{user_id}"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/communities/by-member/{user_id}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/communities/by-member/{user_id}", {
params: {
path: {
user_id: "<user_id>",
},
query: {
/* paths["/v1/communities/by-member/{user_id}"]["get"]["parameters"]["query"] */
},
},
});GET /v1/community/trending-protocols
Underlying REST endpoint: GET /v1/community/trending-protocols
Parameters
query?: paths["/v1/community/trending-protocols"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/community/trending-protocols"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/community/trending-protocols", {
params: {
query: {
/* paths["/v1/community/trending-protocols"]["get"]["parameters"]["query"] */
},
},
});POST /v1/comparisons
Underlying REST endpoint: POST /v1/comparisons
Parameters
body: paths["/v1/comparisons"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/comparisons"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/comparisons", {
body: {
/* paths["/v1/comparisons"]["post"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/comparisons/{after_milestone_id}
Underlying REST endpoint: GET /v1/comparisons/\{after_milestone_id\}
Parameters
path: paths["/v1/comparisons/{after_milestone_id}"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/comparisons/{after_milestone_id}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/comparisons/{after_milestone_id}", {
params: {
path: {
after_milestone_id: "<after_milestone_id>",
},
},
});GET /v1/drafts
Underlying REST endpoint: GET /v1/drafts
Parameters
None
Return type
Promise<{
data?: paths["/v1/drafts"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/drafts");POST /v1/drafts
Underlying REST endpoint: POST /v1/drafts
Parameters
body: paths["/v1/drafts"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/drafts"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/drafts", {
body: {
/* paths["/v1/drafts"]["post"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/drafts/{id}
Underlying REST endpoint: DELETE /v1/drafts/\{id\}
Parameters
path: paths["/v1/drafts/{id}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/drafts/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/drafts/{id}", {
params: {
path: {
id: "<id>",
},
},
});PATCH /v1/drafts/{id}
Underlying REST endpoint: PATCH /v1/drafts/\{id\}
Parameters
path: paths["/v1/drafts/{id}"]["patch"]["parameters"]["path"]body: paths["/v1/drafts/{id}"]["patch"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/drafts/{id}"]["patch"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.PATCH("/v1/drafts/{id}", {
params: {
path: {
id: "<id>",
},
},
body: {
/* paths["/v1/drafts/{id}"]["patch"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/feed/{user_id}
Underlying REST endpoint: GET /v1/feed/\{user_id\}
Parameters
path: paths["/v1/feed/{user_id}"]["get"]["parameters"]["path"]query?: paths["/v1/feed/{user_id}"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/feed/{user_id}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/feed/{user_id}", {
params: {
path: {
user_id: "<user_id>",
},
query: {
/* paths["/v1/feed/{user_id}"]["get"]["parameters"]["query"] */
},
},
});GET /v1/feed/by-channel/{channel_key}
Underlying REST endpoint: GET /v1/feed/by-channel/\{channel_key\}
Parameters
path: paths["/v1/feed/by-channel/{channel_key}"]["get"]["parameters"]["path"]query?: paths["/v1/feed/by-channel/{channel_key}"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/feed/by-channel/{channel_key}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/feed/by-channel/{channel_key}", {
params: {
path: {
channel_key: "<channel_key>",
},
query: {
/* paths["/v1/feed/by-channel/{channel_key}"]["get"]["parameters"]["query"] */
},
},
});GET /v1/feed/channels
Underlying REST endpoint: GET /v1/feed/channels
Parameters
None
Return type
Promise<{
data?: paths["/v1/feed/channels"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/feed/channels");DELETE /v1/feed/channels/{channel_key}
Underlying REST endpoint: DELETE /v1/feed/channels/\{channel_key\}
Parameters
path: paths["/v1/feed/channels/{channel_key}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/feed/channels/{channel_key}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/feed/channels/{channel_key}", {
params: {
path: {
channel_key: "<channel_key>",
},
},
});POST /v1/feed/channels/{channel_key}
Underlying REST endpoint: POST /v1/feed/channels/\{channel_key\}
Parameters
path: paths["/v1/feed/channels/{channel_key}"]["post"]["parameters"]["path"]body?: paths["/v1/feed/channels/{channel_key}"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/feed/channels/{channel_key}"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/feed/channels/{channel_key}", {
params: {
path: {
channel_key: "<channel_key>",
},
},
body: {
/* paths["/v1/feed/channels/{channel_key}"]["post"]["requestBody"]["content"]["application/json"] */
},
});PATCH /v1/feed/channels/reorder
Underlying REST endpoint: PATCH /v1/feed/channels/reorder
Parameters
body: paths["/v1/feed/channels/reorder"]["patch"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/feed/channels/reorder"]["patch"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.PATCH("/v1/feed/channels/reorder", {
body: {
/* paths["/v1/feed/channels/reorder"]["patch"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/feed/subscriptions
Underlying REST endpoint: DELETE /v1/feed/subscriptions
Parameters
body: paths["/v1/feed/subscriptions"]["delete"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/feed/subscriptions"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/feed/subscriptions", {
body: {
/* paths["/v1/feed/subscriptions"]["delete"]["requestBody"]["content"]["application/json"] */
},
});POST /v1/feed/subscriptions
Underlying REST endpoint: POST /v1/feed/subscriptions
Parameters
body: paths["/v1/feed/subscriptions"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/feed/subscriptions"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/feed/subscriptions", {
body: {
/* paths["/v1/feed/subscriptions"]["post"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/feed/subscriptions/status
Underlying REST endpoint: GET /v1/feed/subscriptions/status
Parameters
query: paths["/v1/feed/subscriptions/status"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/feed/subscriptions/status"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/feed/subscriptions/status", {
params: {
query: {
/* paths["/v1/feed/subscriptions/status"]["get"]["parameters"]["query"] */
},
},
});GET /v1/follows
Underlying REST endpoint: GET /v1/follows
Parameters
query: paths["/v1/follows"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/follows"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/follows", {
params: {
query: {
/* paths["/v1/follows"]["get"]["parameters"]["query"] */
},
},
});POST /v1/follows
Underlying REST endpoint: POST /v1/follows
Parameters
body: paths["/v1/follows"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/follows"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/follows", {
body: {
/* paths["/v1/follows"]["post"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/follows/{target_user_id}
Underlying REST endpoint: DELETE /v1/follows/\{target_user_id\}
Parameters
path: paths["/v1/follows/{target_user_id}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/follows/{target_user_id}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/follows/{target_user_id}", {
params: {
path: {
target_user_id: "<target_user_id>",
},
},
});GET /v1/follows/suggestions
Underlying REST endpoint: GET /v1/follows/suggestions
Parameters
query?: paths["/v1/follows/suggestions"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/follows/suggestions"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/follows/suggestions", {
params: {
query: {
/* paths["/v1/follows/suggestions"]["get"]["parameters"]["query"] */
},
},
});GET /v1/follows/users/{user_id}/counts
Underlying REST endpoint: GET /v1/follows/users/\{user_id\}/counts
Parameters
path: paths["/v1/follows/users/{user_id}/counts"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/follows/users/{user_id}/counts"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/follows/users/{user_id}/counts", {
params: {
path: {
user_id: "<user_id>",
},
},
});GET /v1/media/{media_token}/{file_name}
Underlying REST endpoint: GET /v1/media/\{media_token\}/\{file_name\}
Parameters
path: paths["/v1/media/{media_token}/{file_name}"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: void;
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/media/{media_token}/{file_name}", {
params: {
path: {
media_token: "<media_token>",
file_name: "<file_name>",
},
},
});POST /v1/media/uploads
Underlying REST endpoint: POST /v1/media/uploads
Parameters
body: paths["/v1/media/uploads"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/media/uploads"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/media/uploads", {
body: {
/* paths["/v1/media/uploads"]["post"]["requestBody"]["content"]["application/json"] */
},
});POST /v1/milestones
Underlying REST endpoint: POST /v1/milestones
Parameters
body: paths["/v1/milestones"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/milestones"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/milestones", {
body: {
/* paths["/v1/milestones"]["post"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/milestones/{id}
Underlying REST endpoint: DELETE /v1/milestones/\{id\}
Parameters
path: paths["/v1/milestones/{id}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/milestones/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/milestones/{id}", {
params: {
path: {
id: "<id>",
},
},
});GET /v1/milestones/{user_id}
Underlying REST endpoint: GET /v1/milestones/\{user_id\}
Parameters
path: paths["/v1/milestones/{user_id}"]["get"]["parameters"]["path"]query?: paths["/v1/milestones/{user_id}"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/milestones/{user_id}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/milestones/{user_id}", {
params: {
path: {
user_id: "<user_id>",
},
query: {
/* paths["/v1/milestones/{user_id}"]["get"]["parameters"]["query"] */
},
},
});GET /v1/milestones/by-id/{id}
Underlying REST endpoint: GET /v1/milestones/by-id/\{id\}
Parameters
path: paths["/v1/milestones/by-id/{id}"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/milestones/by-id/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/milestones/by-id/{id}", {
params: {
path: {
id: "<id>",
},
},
});GET /v1/polls/{post_id}
Underlying REST endpoint: GET /v1/polls/\{post_id\}
Parameters
path: paths["/v1/polls/{post_id}"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/polls/{post_id}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/polls/{post_id}", {
params: {
path: {
post_id: "<post_id>",
},
},
});POST /v1/polls/{post_id}/vote
Underlying REST endpoint: POST /v1/polls/\{post_id\}/vote
Parameters
path: paths["/v1/polls/{post_id}/vote"]["post"]["parameters"]["path"]body: paths["/v1/polls/{post_id}/vote"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/polls/{post_id}/vote"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/polls/{post_id}/vote", {
params: {
path: {
post_id: "<post_id>",
},
},
body: {
/* paths["/v1/polls/{post_id}/vote"]["post"]["requestBody"]["content"]["application/json"] */
},
});POST /v1/posts
Underlying REST endpoint: POST /v1/posts
Parameters
body: paths["/v1/posts"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/posts"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/posts", {
body: {
/* paths["/v1/posts"]["post"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/posts/{post_id}
Underlying REST endpoint: DELETE /v1/posts/\{post_id\}
Parameters
path: paths["/v1/posts/{post_id}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/posts/{post_id}", {
params: {
path: {
post_id: "<post_id>",
},
},
});GET /v1/posts/{post_id}
Underlying REST endpoint: GET /v1/posts/\{post_id\}
Parameters
path: paths["/v1/posts/{post_id}"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/posts/{post_id}", {
params: {
path: {
post_id: "<post_id>",
},
},
});PATCH /v1/posts/{post_id}
Underlying REST endpoint: PATCH /v1/posts/\{post_id\}
Parameters
path: paths["/v1/posts/{post_id}"]["patch"]["parameters"]["path"]body: paths["/v1/posts/{post_id}"]["patch"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}"]["patch"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.PATCH("/v1/posts/{post_id}", {
params: {
path: {
post_id: "<post_id>",
},
},
body: {
/* paths["/v1/posts/{post_id}"]["patch"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/posts/{post_id}/comments
Underlying REST endpoint: GET /v1/posts/\{post_id\}/comments
Parameters
path: paths["/v1/posts/{post_id}/comments"]["get"]["parameters"]["path"]query: paths["/v1/posts/{post_id}/comments"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}/comments"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/posts/{post_id}/comments", {
params: {
path: {
post_id: "<post_id>",
},
query: {
/* paths["/v1/posts/{post_id}/comments"]["get"]["parameters"]["query"] */
},
},
});POST /v1/posts/{post_id}/comments
Underlying REST endpoint: POST /v1/posts/\{post_id\}/comments
Parameters
path: paths["/v1/posts/{post_id}/comments"]["post"]["parameters"]["path"]body: paths["/v1/posts/{post_id}/comments"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}/comments"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/posts/{post_id}/comments", {
params: {
path: {
post_id: "<post_id>",
},
},
body: {
/* paths["/v1/posts/{post_id}/comments"]["post"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/posts/{post_id}/comments/count
Underlying REST endpoint: GET /v1/posts/\{post_id\}/comments/count
Parameters
path: paths["/v1/posts/{post_id}/comments/count"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}/comments/count"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/posts/{post_id}/comments/count", {
params: {
path: {
post_id: "<post_id>",
},
},
});POST /v1/posts/{post_id}/lock
Underlying REST endpoint: POST /v1/posts/\{post_id\}/lock
Parameters
path: paths["/v1/posts/{post_id}/lock"]["post"]["parameters"]["path"]body?: paths["/v1/posts/{post_id}/lock"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}/lock"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/posts/{post_id}/lock", {
params: {
path: {
post_id: "<post_id>",
},
},
body: {
/* paths["/v1/posts/{post_id}/lock"]["post"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/posts/{post_id}/reactions
Underlying REST endpoint: GET /v1/posts/\{post_id\}/reactions
Parameters
path: paths["/v1/posts/{post_id}/reactions"]["get"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}/reactions"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/posts/{post_id}/reactions", {
params: {
path: {
post_id: "<post_id>",
},
},
});POST /v1/posts/{post_id}/reactions
Underlying REST endpoint: POST /v1/posts/\{post_id\}/reactions
Parameters
path: paths["/v1/posts/{post_id}/reactions"]["post"]["parameters"]["path"]body: paths["/v1/posts/{post_id}/reactions"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}/reactions"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/posts/{post_id}/reactions", {
params: {
path: {
post_id: "<post_id>",
},
},
body: {
/* paths["/v1/posts/{post_id}/reactions"]["post"]["requestBody"]["content"]["application/json"] */
},
});DELETE /v1/posts/{post_id}/reactions/{kind}
Underlying REST endpoint: DELETE /v1/posts/\{post_id\}/reactions/\{kind\}
Parameters
path: paths["/v1/posts/{post_id}/reactions/{kind}"]["delete"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}/reactions/{kind}"]["delete"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.DELETE("/v1/posts/{post_id}/reactions/{kind}", {
params: {
path: {
post_id: "<post_id>",
kind: "<kind>",
},
},
});POST /v1/posts/{post_id}/restore
Underlying REST endpoint: POST /v1/posts/\{post_id\}/restore
Parameters
path: paths["/v1/posts/{post_id}/restore"]["post"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}/restore"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/posts/{post_id}/restore", {
params: {
path: {
post_id: "<post_id>",
},
},
});POST /v1/posts/{post_id}/unlock
Underlying REST endpoint: POST /v1/posts/\{post_id\}/unlock
Parameters
path: paths["/v1/posts/{post_id}/unlock"]["post"]["parameters"]["path"]
Return type
Promise<{
data?: paths["/v1/posts/{post_id}/unlock"]["post"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/posts/{post_id}/unlock", {
params: {
path: {
post_id: "<post_id>",
},
},
});GET /v1/posts/by-author/{author_id}
Underlying REST endpoint: GET /v1/posts/by-author/\{author_id\}
Parameters
path: paths["/v1/posts/by-author/{author_id}"]["get"]["parameters"]["path"]query?: paths["/v1/posts/by-author/{author_id}"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/posts/by-author/{author_id}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/posts/by-author/{author_id}", {
params: {
path: {
author_id: "<author_id>",
},
query: {
/* paths["/v1/posts/by-author/{author_id}"]["get"]["parameters"]["query"] */
},
},
});GET /v1/posts/by-cashtag/{tag}
Underlying REST endpoint: GET /v1/posts/by-cashtag/\{tag\}
Parameters
path: paths["/v1/posts/by-cashtag/{tag}"]["get"]["parameters"]["path"]query?: paths["/v1/posts/by-cashtag/{tag}"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/posts/by-cashtag/{tag}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/posts/by-cashtag/{tag}", {
params: {
path: {
tag: "<tag>",
},
query: {
/* paths["/v1/posts/by-cashtag/{tag}"]["get"]["parameters"]["query"] */
},
},
});GET /v1/posts/by-tag/{name}
Underlying REST endpoint: GET /v1/posts/by-tag/\{name\}
Parameters
path: paths["/v1/posts/by-tag/{name}"]["get"]["parameters"]["path"]query: paths["/v1/posts/by-tag/{name}"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/posts/by-tag/{name}"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/posts/by-tag/{name}", {
params: {
path: {
name: "<name>",
},
query: {
/* paths["/v1/posts/by-tag/{name}"]["get"]["parameters"]["query"] */
},
},
});POST /v1/reports
Underlying REST endpoint: POST /v1/reports
Parameters
body: paths["/v1/reports"]["post"]["requestBody"]["content"]["application/json"]
Return type
Promise<{
data?: paths["/v1/reports"]["post"]["responses"]["201"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.POST("/v1/reports", {
body: {
/* paths["/v1/reports"]["post"]["requestBody"]["content"]["application/json"] */
},
});GET /v1/users/{user_id}/followers
Underlying REST endpoint: GET /v1/users/\{user_id\}/followers
Parameters
path: paths["/v1/users/{user_id}/followers"]["get"]["parameters"]["path"]query?: paths["/v1/users/{user_id}/followers"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/users/{user_id}/followers"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/users/{user_id}/followers", {
params: {
path: {
user_id: "<user_id>",
},
query: {
/* paths["/v1/users/{user_id}/followers"]["get"]["parameters"]["query"] */
},
},
});GET /v1/users/{user_id}/following
Underlying REST endpoint: GET /v1/users/\{user_id\}/following
Parameters
path: paths["/v1/users/{user_id}/following"]["get"]["parameters"]["path"]query?: paths["/v1/users/{user_id}/following"]["get"]["parameters"]["query"]
Return type
Promise<{
data?: paths["/v1/users/{user_id}/following"]["get"]["responses"]["200"]["content"]["application/json"];
error?: unknown;
response: Response;
}>Example
const result = await community.GET("/v1/users/{user_id}/following", {
params: {
path: {
user_id: "<user_id>",
},
query: {
/* paths["/v1/users/{user_id}/following"]["get"]["parameters"]["query"] */
},
},
});