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

Pattern Directory: Add REST API endpoints #26577

Closed
iandunn opened this issue Oct 29, 2020 · 0 comments · Fixed by #26578
Closed

Pattern Directory: Add REST API endpoints #26577

iandunn opened this issue Oct 29, 2020 · 0 comments · Fixed by #26578
Labels
Core REST API Task Task for Core REST API efforts [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Enhancement A suggestion for improvement.

Comments

@iandunn
Copy link
Member

iandunn commented Oct 29, 2020

The Meta team is discussion creating a pattern directory on wordpress.org, similar to the block directory.

I've created a rough endpoint on api.wordpress.org to experiment with that. It allows browsing all patterns, browsing patterns within a given category, and searching patterns:

Gutenberg could request patterns from those endpoints directly, but for the block directory it created a local endpoint instead. My understanding is that some people preferred that because it prevents api.wordpress.org from seeing the user's IP address.

@talldan talldan added [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Enhancement A suggestion for improvement. Core REST API Task Task for Core REST API efforts labels Nov 3, 2020
iandunn added a commit to iandunn/gutenberg that referenced this issue Jan 28, 2021
Similar to the Block Directory, the endpoints in Gutenberg proxy the api.wordpress.org endpoints, to prevent w.org from receiving the user's IP address. This will also be necessary in the future to combine locally-registered patterns with those hosted in the wordpress.org directory.

Fixes WordPress#26577
TimothyBJacobs pushed a commit that referenced this issue Jan 28, 2021
)

Similar to the Block Directory, the endpoints in Gutenberg proxy the api.wordpress.org endpoints, to prevent w.org from receiving the user's IP address. This will also be necessary in the future to combine locally-registered patterns with those hosted in the wordpress.org directory.

Fixes #26577
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core REST API Task Task for Core REST API efforts [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants