Anonymous
×
Create a new article
Write your page title here:
We currently have 2,416 articles on Monstropedia. Type your article name above or click on one of the titles below and start writing!



Monstropedia
2,416Articles

Template:API request/doc

Documentation This is a documentation subpage for Template:API request (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

This template is specifically for use on Scratch API (2.0).

Usage

{{API request|<description>|<URL>|<response>|<method=METHOD>}}

Parameters

  1. The first parameter is a description of the request, e.g. its purpose.
  2. The second parameter is the URL of the request, e.g. https://api.scratch.mit.edu/ for the API root request. Note that the URL MUST end with a slash (/).
  3. The third parameter is an example response to such a request. If there isn't really any response data available, simply put "(no response available)".
  • method: This named parameter specifies the HTTP method to use for the request. By default, this is GET; however, some Scratch API requests use PUT, so that is what this parameter is for.

See Scratch API (2.0) for example usage.