Skip to content
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

Can we get a note by slug without using GraphQL #85

Open
hyoban opened this issue Mar 5, 2024 · 1 comment
Open

Can we get a note by slug without using GraphQL #85

hyoban opened this issue Mar 5, 2024 · 1 comment

Comments

@hyoban
Copy link
Member

hyoban commented Mar 5, 2024

No description provided.

@Songkeys
Copy link
Member

For reference, the note xlog_slug is stored in the attributes field. Here is an example:

{
	"type": "note",
	"title": "人 X 社区 X 物 - v0.1.0",
	// ....
	"attributes": [
		{
			"value": "plrom",
			"trait_type": "xlog_slug"
		}
	],
	// ...
}

Technically, we could access this ability through RESTful API queries. However:

  1. The indexer is planned to be open-sourced soon but is not yet available. Therefore, this ability needs to be implemented by our team member at the current stage.
  2. This API might complicate queries, e.g., /notes?attributes.trait_type=xlog_slug&attributes.value=plrom. What if we need to add more attribute conditions? This needs to be carefully designed.

@runjuu, do you have any good ideas about this? Also, is there a planned date for open-sourcing the indexer so that everyone can contribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants