XBorg SDK
  • Introduction
  • Community
    • Details
    • Resources
    • Inventory
    • Prizes
    • Store
    • Achievements
  • User
    • Profile
    • Authentication
    • Socials
    • Wallets
  • Quests
    • User
    • Community
  • Quest Events
    • Details
    • Participation
    • Leaderboard
  • Blockchain
  • Configuration
  • Shared Library SDK
    • Authentication & Setup
    • Quest Management
    • Event Management
      • Working with Events
      • Events Lifecycle
      • Events Requirements
      • Events Quests
      • Events Rewards
    • Quest Rewards
    • 3D Avatar
Powered by GitBook
On this page
  1. Community

Details

The Community API provides a comprehensive set of endpoints to interact with a community, including community details and membership.

PreviousCommunityNextResources

Last updated 4 months ago

The Community Details API allows you to retrieve information about a community using either its ID or slug. This API provides valuable insights into community metrics and content.

Community

Communities

GET /v1/community

Ranking

Leaderboard

GET /v1/community/{id}/leaderboard/{slug}

Membership

Retrieve community details using either its id or slug

get
Path parameters
communityIdstringRequired

The id or slug of the community

Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{communityId} HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Fetches all communities

get
Query parameters
pagenumberRequired
onlyJoinedbooleanRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community?page=1&onlyJoined=true HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Fetch a users ranking in a community for a resource

get
Path parameters
idstringRequired
slugstringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{id}/ranking/{slug} HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Retrieve a community resource leaderboard

get
Path parameters
idstringRequired
slugstringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{id}/leaderboard/{slug} HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Join a community

post
Path parameters
communityIdstringRequired
Query parameters
referrerHandlestringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
post
POST /v1/community/{communityId}/join?referrerHandle=text HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Leave a community

post
Path parameters
communityIdstringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
post
POST /v1/community/{communityId}/leave HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}

Return a users community referrals

get
Path parameters
communityIdstringRequired
Responses
400
Generic Client Error
application/json
401
Authentication related errors: - `GENERIC_UNAUTHORIZED`: Generic unauthorized access error. - `SESSION_TOKEN_EXPIRED`: User session has expired. - `REFRESH_TOKEN_EXPIRED`: Refresh token has expired.
application/json
404
Generic not found
application/json
500
Internal server error
application/json
default
application/json
get
GET /v1/community/{communityId}/referrals HTTP/1.1
Host: 
Accept: */*
{
  "code": 10002,
  "message": "generic_client_error"
}
  • Community
  • GETRetrieve community details using either its id or slug
  • Communities
  • GETFetches all communities
  • Ranking
  • GETFetch a users ranking in a community for a resource
  • Leaderboard
  • GETRetrieve a community resource leaderboard
  • Membership
  • POSTJoin a community
  • POSTLeave a community
  • GETReturn a users community referrals