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

Stub Core endpoint #3

Closed
iandunn opened this issue Oct 16, 2020 · 3 comments
Closed

Stub Core endpoint #3

iandunn opened this issue Oct 16, 2020 · 3 comments
Assignees
Labels
[Component] Pattern Directory API The pattern API on WordPress.org, and/or the CPT endpoint

Comments

@iandunn
Copy link
Member

iandunn commented Oct 16, 2020

Get rough version working w/ api.w.org, see #2 .

@iandunn iandunn self-assigned this Oct 16, 2020
@ryelle
Copy link
Contributor

ryelle commented Oct 19, 2020

Not a formalized schema, but these are the assumptions I've been working with:

  • An index endpoint that returns all core patterns
  • (Eventually) a search endpoint returning matching patterns
  • (Eventually) an endpoint returning patterns in a given category

The response should be an array of objects, each pattern should match:

  • name: string slug
  • title: string, human-friendly, possibly translated
  • content: string with blocks & HTML, possibly translated
  • viewportWidth: int
  • categories: array of strings

Categories are core-defined, but plugins can add specific categories… for the start I think we can restrict to the core list ("buttons, columns, gallery, header, text"). These could also be translated, but the slugs in the API should remain the same

@ryelle ryelle added the [Component] Pattern Directory API The pattern API on WordPress.org, and/or the CPT endpoint label Oct 27, 2020
@iandunn
Copy link
Member Author

iandunn commented Oct 29, 2020

Rough draft at WordPress/gutenberg#26578

@iandunn
Copy link
Member Author

iandunn commented Jan 14, 2021

This was just created so we'd have something in the Project, WordPress/gutenberg#26578 is the main PR.

Closing since we can just use a "note" in the Project to track instead.

@iandunn iandunn closed this as completed Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Pattern Directory API The pattern API on WordPress.org, and/or the CPT endpoint
Projects
None yet
Development

No branches or pull requests

2 participants