Social Endpoints
Description of endpoints used to get social data on the DeSo blockchain
Last updated
Description of endpoints used to get social data on the DeSo blockchain
Last updated
Please make sure you've read Data: API so you are familiar with the following types referenced in this documentation:
POST
/api/v0/get-hodlers-for-public-key
Get objects for users who are holding (or held by) a certain public key's creator coin. Endpoint implementation in backend.
Example usages in frontend: - Make request to Get Hodlers For Public Key - Use GetHodlersForPublicKey to show all the users who are holding a creator's coin or a creator's DAO coin - Use GetHodlersForPublicKey to see all users who hold your DAO coin - Use GetHodlersForPublicKey to see all DAO coins you hold
Name | Type | Description |
---|---|---|
POST
/api/v0/get-diamonds-for-public-key
Get a list of objects representing all the diamonds a user has given or received.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Get Diamonds For Public Key - Use GetDiamondsForPublicKey to show all users who have given a creator a diamond, how many diamonds they've given to that creator, and the highest level of diamond
POST
/api/v0/get-follows-stateless
Get followers of a certain user/public key or get users followed by a certain user/public key and the total number of followers/followees.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Get Follows Stateless - Use GetFollows to show the total number of users following a creator and the total number of users followed by a creator - Use GetFollows to see all users who follow (or alternatively are followed by) a creator
POST
/api/v0/is-following-public-key
Check if the user is following a public key.
Endpoint implementation in backend.
POST
/api/v0/is-hodling-public-key
Check if the user holds the creator coin of a public key. If user is holding some amount of creator coin, we return the BalanceEntryResponse representing how much the user holds.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Is Hodling Public Key - Use IsHodlingPublicKey to check if a user is a DAO member and can be transferred a DAO coin that is restricted to DAO members only.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Hodlers
[]
Array of objects representing the users who hold (or are held by) the provided public key or username. Each tells you how much that user is holding.
LastPublicKeyBase58Check
String
Public key of the last object from this page of results. Used to fetch the next page of results.
PublicKeyBase58Check*
String
Public key of the user for whom we want to fetch diamonds
FetchYouDiamonded
Boolean
If true, fetch diamonds this user gave out instead of diamond this user received
PublicKeyBase58Check
String
Public key for which we want to fetch followers or followees Required only if Username is not provided
Username
String
Username for which we want to fetch followers or following Required only if PublicKeyBase58Check is not provided
GetEntriesFollowingUsername
Boolean
- If true, get entries that are following the specified user.
- If false, get entries that are followed by the specified user.
LastPublicKeyBase58Check
String
Public key of the last follower/followee from the previous page. Indicates the point at which we want to start returning results.
NumToFetch
uint64
number of records to fetch
PublicKeyBase58Check*
String
Public key of the user that may be following
IsFollowingPublicKeyBase58Check*
String
Public key of the creator we want to check if the user is following
IsFollowing
Boolean
true if the user is following the IsFollowingPublicKeyBase58Check. Otherwise, false
PublicKeyBase58Check*
String
Public key of the user that may be holding the creator coin of IsHodlingPublicKeyBase58Check
IsHodlingPublicKeyBase58Check*
String
Public key of the creator we want to check that the user is holding
IsDAOCoin
Boolean
If true, check if this public key is hodling the DAO coin instead of creator coin
IsHodling
Boolean
true if the user holds the creator coin of IsHodlingPublicKeyBase58Check, Otherwise, false.
BalanceEntry
that shows the amount of creator coins the user holds.
PublicKeyBase58Check
String
Public key for which you want to fetch hodlings or hodlers Required only if Username is not provided
Username
String
Username for which you want to fetch hodlings or hodlers Required only if PublicKeyBase58Check is not provided
LastPublicKeyBase58Check
String
Public key of the last hodler/hodlee from the previous page. Indicates the point at which we want to start returning results.
NumToFetch
uint64
number of records to fetch
FetchHodlings
Boolean
If true, fetch balance entries for hodlings of the user instead of balance entries for hodlers of the user's coin
FetchAll
Boolean
if true, fetch all results. Supercedes NumToFetch.
IsDAOCoin
Boolean
If true, fetch hodlers of DAO coin instead of creator coin