WP-API.github.io icon indicating copy to clipboard operation
WP-API.github.io copied to clipboard

Add Example Code

Open Shelob9 opened this issue 10 years ago • 2 comments

These docs could really use more example code. Each endpoint should at a minimum have examples for using the WordPress HTTP API, jQuery AJAX & the js-client.

I'd be happy to do most of this, of course. I will need some help on the js-client, but the other ones I already have for the most part.

If this idea is welcome, please let me know and where it should go and I'll work on some PRs.

Shelob9 avatar Oct 29 '14 17:10 Shelob9

Example code would be awesome. The Flatdoc skin we're using has some markdown extras that allow for syntax highlighting, in case you need some help with formatting: http://ricostacruz.com/flatdoc/#flatdoc-markdown-extras

pollyplummer avatar Oct 31 '14 19:10 pollyplummer

@pollyplummer Glad you like the idea. Where would they go in this repo? It would be great if there was a clutter-free way to do them inline with the docs for the endpoints. Alternatively we could have a subfolder for them. If so, would we want one file per route, or one file per endpoint? In either case how do we separate by language?

Shelob9 avatar Nov 01 '14 23:11 Shelob9