-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsure Idea: API for xLog #615
Comments
IMO, providing a series of APIs, can make xLog more of a platform than just an app I tried using as a universal lib, I think we should turn this into a discussion |
In addition, I really want to expand Crossbell's notes API for more convenient content classification and recommendation, but it seems difficult to achieve. |
@enpitsuLin We don't have the discussions tab so far. We could have one but I think there would be too many places for "discussions" (issues tab, discussions tab, discord channels).
@DIYgod Could you elaborate more on this? |
I am also like you, now publishing to xlog in mx-space/admin is also implemented through crossbell.js and unidata. |
Any progress on this? |
@hyoban I appreciate that you could pick this up. You could start with an API proposal. Let me know if we could help with anything here or in the Discord server. |
@Songkeys Because it should be a long task, maybe it will be more convenient to discuss on discord. I will get in touch with you there. |
Background
I'm aware of the
crossbell.js
indexer API that can query anything on the blockchain. But what if we had specific APIs for xLog?Benefits
Drawbacks
Examples
Reads:
/api/sites/:handle/posts
: fetch all xLog posts from a user/api/sites/:handle/posts/:slug
: get one post/api/sites/:handle/posts/:slug/comments
: get comments on a post/api/sites/:handle/posts/:slug/stats
: get "reads", "likes", "mints", etc. stats for one postWrites:
I'm not sure if this would make things more complex - If the user has authorized siwe + operator, they can use the token to write with API (just another wrapper of the
/op
APIs on the current indexer)POST /api/sites/:handle/posts
: post a new articlePUT /api/sites/:handle/posts/:slug/likes
: like a new articleThe text was updated successfully, but these errors were encountered: