0.0.12 • Published 5 years ago

taasa v0.0.12

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Here’s the extensive documentation for the API:

Environment requirements:

1.

POST to /govuk/$$VERSION$$/components/$$COMPONENT_NAME$$ where $$COMPONENT_NAME$$ is the name of the component from govuk-frontend (e.g. govukSelect, govukButton, govukHeader) and $$VERSION$$ is the NPM package version (e.g. 3.0.0, 3.1.0), this must be 3.0.0 or greater.

The request body should contain JSON (therefore a content-type: application/json on the request) containing the parameters for the component. For example:

Posting to /govuk/3.3.0/components/govukButton with a body of {"text": "Save and continue"} would return the HTML:

<button class="govuk-button" data-module="govuk-button">
  Save and continue
</button>

2.

GET from /examples-output/$$COMPONENT_NAME$$ where $$COMPONENT_NAME$$ is the name of the component from govuk-frontend e.g. govukSelect, govukButton, govukHeader

The response will contain the HTML output of each available example for that component along with an MD5 hash of the HTML.

The response structure is as follows:

[ { html: '<div>some markup</div>', md5: '<an_md5_hash>', name: '<component_id>/<example_id>', nunjucks: '{% some Nunjucks %}' } ]

This is currently hosted at https://template-service-spike.herokuapp.com

Limitations for the current phase:

  • We don't currently support caller blocks being fed in
0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago