From 1d70b41ccb5f5044d053c3961ff337f4590a89bd Mon Sep 17 00:00:00 2001 From: Nameless Dude <72940077+namelessperson0@users.noreply.github.com> Date: Wed, 23 Nov 2022 18:54:02 +0530 Subject: [PATCH 1/2] Updated link for backend implementation. --- for-developers/backend/blockchain-data/api/post-endpoints.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/for-developers/backend/blockchain-data/api/post-endpoints.md b/for-developers/backend/blockchain-data/api/post-endpoints.md index 134c1dd..bc55309 100644 --- a/for-developers/backend/blockchain-data/api/post-endpoints.md +++ b/for-developers/backend/blockchain-data/api/post-endpoints.md @@ -272,7 +272,7 @@ if true, only return posts that have images, videos, or embed video URLs. {% swagger-description %} Get Hot Feed returns a page of Posts that are currently "hot". A post's hotness is determined by the time since the post was created and the number of likes, diamonds, comments, reposts, and quote reposts. -Endpoint implementation in [backend](https://github.com/deso-protocol/backend/blob/709cbfbc62cf3a0e6d56c393e555fc277c93fb76/routes/hot\_feed.go#L605). +Endpoint implementation in [backend](https://github.com/deso-protocol/backend/blob/main/routes/hot_feed.go#L943). Example usages in [diamondapp.com](https://diamondapp.com)'s frontend:\ \- Make request to [Get Hot Feed](https://github.com/diamond-app/frontend/blob/735634e38dfa0605035ded19b46b92766ec856c4/src/app/backend-api.service.ts#L1153)\ From 6d219f2b0fd4090a96819ed64da8746fc2190683 Mon Sep 17 00:00:00 2001 From: Nameless Dude <72940077+namelessperson0@users.noreply.github.com> Date: Wed, 23 Nov 2022 19:02:50 +0530 Subject: [PATCH 2/2] Added documentation for updated api. --- .../backend/blockchain-data/api/post-endpoints.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/for-developers/backend/blockchain-data/api/post-endpoints.md b/for-developers/backend/blockchain-data/api/post-endpoints.md index bc55309..1bf8812 100644 --- a/for-developers/backend/blockchain-data/api/post-endpoints.md +++ b/for-developers/backend/blockchain-data/api/post-endpoints.md @@ -291,6 +291,14 @@ A list of posts that have already been seen by the reader Number of posts to fetch {% endswagger-parameter %} +{% swagger-parameter in="body" name="Tag" type="String" %} + If defined, only get the hot feed for posts tagged with this tag. +{% endswagger-parameter %} + +{% swagger-parameter in="body" name="SortByNew" type="bool" %} + If true, sort by new instead of by hotness. Only applies to queries where "Tag" is defined. +{% endswagger-parameter %} + {% swagger-response status="200: OK" description="Successfully retrieved posts from the hot feed" %} {% tabs %} {% tab title="Sample Response" %}