UNPKG

raml2html-werk-theme

Version:

a bulma and open-color based single-page theme that is easily searchable and offline-ready

1,983 lines (899 loc) 35.3 kB
<!doctype HTML> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>World Music API API documentation</title> <meta name="generator" content="https://github.com/raml2html/raml2html 7.0.0"> <link rel="stylesheet" href="./assets/docs.css"> </head> <body data-component="scroll-spy"> <header class="hero"> <div class="hero-body"> <h1 class="title is-1">World Music API</h1> <p class="subtitle has-priority-3">This is an example of a music API.</p> </div> </header> <div> <div class="columns"> <div class="column is-nav is-narrow-tablet is-12-mobile" data-component="menu"> <aside class="sidebar"> <nav class="menu section"> <p class="menu-label">Info</p> <ul class="menu-list"> <li> <a href="#__basic_information_docs"> Basic Information </a> </li> <li> <a href="#getting_started"> Getting Started </a> </li> <li> <a href="#legal"> Legal </a> </li> </ul> <p class="menu-label">Resources</p> <ul class="menu-list"> <li> <a href="#api"> /api </a> </li> <li> <a href="#entry"> /entry </a> </li> <li> <a href="#songs"> Songs </a> <ul> <li> <a href="#songs"> /songs </a> </li> <li> <a href="#songs__songid_"> /songs/{songId} </a> </li> </ul> </li> </ul> <p class="menu-label">Types</p> <ul class="menu-list"> <li> <a href="#type__AnotherEntry"> AnotherEntry </a> </li> <li> <a href="#type__ApiLib.Cat"> Cat </a> </li> <li> <a href="#type__ApiLib.CustomDate"> CustomDate </a> </li> <li> <a href="#type__ApiLib.Dog"> Dog </a> </li> <li> <a href="#type__ApiLib.RamlDataType"> RamlDataType </a> </li> <li> <a href="#type__Entry"> Entry </a> </li> <li> <a href="#type__SongsLib.Song"> Song </a> </li> <li> <a href="#type__User"> User </a> </li> </ul> </nav> </aside> </div> <div class="column"> <main class="main-content"> <section id="__all_docs" class="section" data-spy> <section id="__basic_information_docs" class="subsection" data-spy data-spy-parent="__all_docs"> <h2 class="title is-2">Basic Information</h2> <h3 class="title is-3">Endpoint</h3> <pre><code class="value" data-hljs="disabled">http://{environment}.musicapi.com/{version}</code></pre> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> environment <div class="typedef-type">string, one of [<code>stg</code>,&nbsp;<code>dev</code>,&nbsp;<code>test</code>,&nbsp;<code>prod</code>], <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> version <div class="typedef-type">string, one of [<code>v1</code>], <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> </section> <section id="getting_started" class="subsection" data-spy data-spy-parent="__all_docs"> <h2 class="title is-2">Getting Started</h2> <div class="content"> <p>This is a getting started guide for the World Music API.</p> </div> </section> <section id="legal" class="subsection" data-spy data-spy-parent="__all_docs"> <h2 class="title is-2">Legal</h2> <div class="content"> <p>See http://legal.musicapi.com</p> </div> </section> </section> <section id="__all_resources" class="section" data-spy> <h2 class="title is-2">Resources</h2> <div id="api" class="group" data-spy data-spy-parent="__all_resources"> <header class="group-header"> <div class="group-title"> <h3 class="title is-3">/api</h3> </div> </header> <!-- list of methods for /api --> <!-- begin of resource block for GET /api --> <div id="api_get" class="group-endpoint" data-spy data-spy-parent="api"> <header> <h4 class="title is-4 is-anchored"> /api <a class="anchor" href="#api_get"></a> <div class="subtitle is-6"> <strong class="method is-get">GET</strong> <span class="value">/api</span> </div> </h4> </header> <div> </div> </div> <!-- end of resource block for GET /api --> <!-- begin of resource block for POST /api --> <div id="api_post" class="group-endpoint" data-spy data-spy-parent="api"> <header> <h4 class="title is-4 is-anchored"> /api <a class="anchor" href="#api_post"></a> <div class="subtitle is-6"> <strong class="method is-post">POST</strong> <span class="value">/api</span> </div> </h4> </header> <div> <h5 class="title is-5">Request</h5> <div class="indent"> <div class="tabbable" data-component="tabbable" data-tabbable-id="undefined_body"> <header class="tabs is-boxed"> <strong class="title is-6">Body</strong> <ul class="tabbable-tabs" data-tabbable-tabs="undefined_body"> <li> <a id="api_post_body_0" href="#api_post_body_0" data-tab="0"> application/json </a> </li> </ul> </header> <div class="tabbable-contents" data-tabbable-contents="undefined_body"> <div data-tab-content="0"> <h6 class="title is-6">Properties (object)</h6> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> propString <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> propStringArray1 <div class="typedef-type">Array of string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> ideas <div class="typedef-type">Array of object, <strong class="typedef-required">required</strong></div> </th> <td> <details> <summary>object[] </summary> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> comment <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> </details> </td> </tr> <tr> <th scope="row"> extIdeas <div class="typedef-type">object, <strong class="typedef-required">required</strong></div> </th> <td> <details> <summary>extIdeas</summary> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> comment <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> createdBy <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> </details> </td> </tr> <tr> <th scope="row"> feedback <div class="typedef-type">string , default: <code>very nice</code>, minimum length: 1, maximum length: 255, pattern: <code class="value">[a-zA-Z\s]*</code>, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> propNumber <div class="typedef-type">number, minimum: 0, maximum: 32, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> propInteger <div class="typedef-type">integer, minimum: 3, maximum: 5, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> propBoolean <div class="typedef-type">boolean, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> propDate <div class="typedef-type">date-only, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> userPicture <div class="typedef-type">file, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> NilValue <div class="typedef-type">object, <strong class="typedef-required">required</strong></div> </th> <td> <details> <summary>NilValue</summary> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> name <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> comment <div class="typedef-type">Union of string or nil, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> </details> </td> </tr> <tr> <th scope="row"> CatOrDog <div class="typedef-type">Union of ApiLib.Cat or ApiLib.Dog, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> CatAndDog <div class="typedef-type">ApiLib.Cat, <strong class="typedef-required">required</strong></div> </th> <td> <details> <summary>CatAndDog</summary> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> name <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> fangs <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> color <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> </details> </td> </tr> <tr> <th scope="row"> PossibleMeetingDate <div class="typedef-type">ApiLib.CustomDate, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- end of resource block for POST /api --> <!-- end of list of methods for /api --> </div> <div id="entry" class="group" data-spy data-spy-parent="__all_resources"> <header class="group-header"> <div class="group-title"> <h3 class="title is-3">/entry</h3> </div> </header> <!-- list of methods for /entry --> <!-- begin of resource block for POST /entry --> <div id="entry_post" class="group-endpoint" data-spy data-spy-parent="entry"> <header> <h4 class="title is-4 is-anchored"> /entry <a class="anchor" href="#entry_post"></a> <div class="subtitle is-6"> <strong class="method is-post">POST</strong> <span class="value">/entry</span> </div> </h4> </header> <div> <h5 class="title is-5">Response</h5> <div class="tabbable is-vertical" data-component="tabbable" data-tabbable-id="entry_post_response"> <header class="tabs is-boxed"> <ul class="tabbable-tabs" data-tabbable-tabs="entry_post_response"> <li> <a id="entry_post_response_0" href="#entry_post_response_0" data-tab="0"> <span class="status" data-code="200"></span> </a> </li> </ul> </header> <div class="tabbable-contents" data-tabbable-contents="entry_post_response"> <div data-tab-content="0"> <div class="tabbable" data-component="tabbable" data-tabbable-id="undefined_body"> <header class="tabs is-boxed"> <strong class="title is-6">Body</strong> <ul class="tabbable-tabs" data-tabbable-tabs="undefined_body"> <li> <a id="entry_post_body_0" href="#entry_post_body_0" data-tab="0"> application/json </a> </li> </ul> </header> <div class="tabbable-contents" data-tabbable-contents="undefined_body"> <div data-tab-content="0"> </div> </div> </div> </div> </div> </div> </div> </div> <!-- end of resource block for POST /entry --> <!-- begin of resource block for GET /entry --> <div id="entry_get" class="group-endpoint" data-spy data-spy-parent="entry"> <header> <h4 class="title is-4 is-anchored"> /entry <a class="anchor" href="#entry_get"></a> <div class="subtitle is-6"> <strong class="method is-get">GET</strong> <span class="value">/entry</span> </div> </h4> <div class="content"> <p>returns a list of entry</p> </div> </header> <div> <h5 class="title is-5">Response</h5> <div class="tabbable is-vertical" data-component="tabbable" data-tabbable-id="entry_get_response"> <header class="tabs is-boxed"> <ul class="tabbable-tabs" data-tabbable-tabs="entry_get_response"> <li> <a id="entry_get_response_0" href="#entry_get_response_0" data-tab="0"> <span class="status" data-code="200"></span> </a> </li> </ul> </header> <div class="tabbable-contents" data-tabbable-contents="entry_get_response"> <div data-tab-content="0"> <div class="tabbable" data-component="tabbable" data-tabbable-id="undefined_body"> <header class="tabs is-boxed"> <strong class="title is-6">Body</strong> <ul class="tabbable-tabs" data-tabbable-tabs="undefined_body"> <li> <a id="entry_get_body_0" href="#entry_get_body_0" data-tab="0"> application/json </a> </li> </ul> </header> <div class="tabbable-contents" data-tabbable-contents="undefined_body"> <div data-tab-content="0"> </div> </div> </div> </div> </div> </div> </div> </div> <!-- end of resource block for GET /entry --> <!-- end of list of methods for /entry --> </div> <div id="songs" class="group" data-spy data-spy-parent="__all_resources"> <header class="group-header"> <div class="group-title"> <h3 class="title is-3">Songs</h3> </div> <div class="content"> <p>Access to all songs inside the music world library.</p> </div> </header> <!-- list of methods for /songs --> <!-- begin of resource block for GET /songs --> <div id="songs_get" class="group-endpoint" data-spy data-spy-parent="songs"> <header> <h4 class="title is-4 is-anchored"> /songs <a class="anchor" href="#songs_get"></a> <div class="subtitle is-6"> <strong class="method is-get">GET</strong> <span class="value">/songs</span> </div> </h4> </header> <div> <h5 class="title is-5">Request</h5> <div class="indent"> <h6 class="title is-6">Query Parameters</h6> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> genre <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> <div class="content"> <p>filter the songs by genre</p> </div> </td> </tr> <tr> <th scope="row"> access_token <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> </div> </div> </div> <!-- end of resource block for GET /songs --> <!-- begin of resource block for POST /songs --> <div id="songs_post" class="group-endpoint" data-spy data-spy-parent="songs"> <header> <h4 class="title is-4 is-anchored"> /songs <a class="anchor" href="#songs_post"></a> <div class="subtitle is-6"> <strong class="method is-post">POST</strong> <span class="value">/songs</span> </div> </h4> </header> <div> <h5 class="title is-5">Request</h5> <div class="indent"> <h6 class="title is-6">Query Parameters</h6> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> access_token <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> </div> </div> </div> <!-- end of resource block for POST /songs --> <!-- end of list of methods for /songs --> <!-- list of methods for /songs/{songId} --> <span id="songs__songid_" class="group-resource-group-marker" data-spy data-spy-parent="songs"></span> <!-- begin of resource block for GET /songs/{songId} --> <div id="songs__songid__get" class="group-endpoint" data-spy data-spy-parent="songs__songid_"> <header> <h4 class="title is-4 is-anchored"> /songs/{songId} <a class="anchor" href="#songs__songid__get"></a> <div class="subtitle is-6"> <strong class="method is-get">GET</strong> <span class="value">/songs/{songId}</span> </div> </h4> </header> <div> <h5 class="title is-5">Request</h5> <div class="indent"> <h6 class="title is-6">Path Variables</h6> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> songId <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> </div> <h5 class="title is-5">Response</h5> <div class="tabbable is-vertical" data-component="tabbable" data-tabbable-id="songs__songid__get_response"> <header class="tabs is-boxed"> <ul class="tabbable-tabs" data-tabbable-tabs="songs__songid__get_response"> <li> <a id="songs__songid__get_response_0" href="#songs__songid__get_response_0" data-tab="0"> <span class="status" data-code="200"></span> </a> </li> </ul> </header> <div class="tabbable-contents" data-tabbable-contents="songs__songid__get_response"> <div data-tab-content="0"> <div class="tabbable" data-component="tabbable" data-tabbable-id="undefined_body"> <header class="tabs is-boxed"> <strong class="title is-6">Body</strong> <ul class="tabbable-tabs" data-tabbable-tabs="undefined_body"> <li> <a id="songs__songid__get_body_0" href="#songs__songid__get_body_0" data-tab="0"> application/json </a> </li> <li> <a id="songs__songid__get_body_1" href="#songs__songid__get_body_1" data-tab="1"> application/xml </a> </li> </ul> </header> <div class="tabbable-contents" data-tabbable-contents="undefined_body"> <div data-tab-content="0"> <h6 class="title is-6">Properties (object)</h6> <table class="table is-property-list"> <tbody> <tr> <th scope="row"> title <div class="typedef-type">string, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> <tr> <th scope="row"> length <div class="typedef-type">number, <strong class="typedef-required">required</strong></div> </th> <td> </td> </tr> </tbody> </table> <h6 class="title is-6">Examples</h6> <ul> <li> <details> <summary>song1</summary> <pre><code>{ "title": "My Song", "length": 12 }</code></pre> </details> </li> <li> <details> <summary>song2</summary> <pre><code>{ "title": "Last", "length": 3 }</code></pre> </details> </li> </ul> </div> <div data-tab-content="1"> <h6 class="title is-6">Examples</h6> <ul> <li> <details> <summary>Example</summary> <pre><code><?xml version="1.0" encoding="utf-8"?> <song> <title>str1234</title> <artist>str1234</artist> </song> </code></pre> </details> </li> </ul> </div> </div> </div> <h6 class="title is-6"> deprecated </h6> </div> </div> </div> </div> </div> <!-- end of resource block for GET /songs/{songId} --> <!-- end of list of methods for /songs/{songId} --> </div> </section> <section id="__all_types" class="section" data-spy> <h2 class="title is-2">Type Reference</h2> <div class="subsection" id="type__AnotherEntry" data-spy data-spy-parent="__all_types"> <h3 class="title is-3 is-anchored" > AnotherEntry <a class="anchor" href="#type__AnotherEntry"></a> </h3> <div class="content"> <p>This is just another entry to simulate that you can add facets also on JSON schema defined types. Although you can only add documentation-based facets.</p> </div> <h4 class="title is-6">Type Information</h4> <div class="typedef-standalone"> <div class="typedef-type"><a href="#type__AnotherEntry" title="Jump to 'AnotherEntry' type docs" data-component="preview">AnotherEntry</a> (json)</div> </div> </div> <div class="subsection" id="type__ApiLib.Cat" data-spy data-spy-parent="__all_types"> <h3 class="title is-3 is-anchored" > Cat <a class="anchor" href="#type__ApiLib.Cat"></a> </h3> <h4 class="title is-6">Type Information</h4> <div class="typedef-standalone"> <div class="typedef-type">object</div> </div> </div> <div class="subsection" id="type__ApiLib.CustomDate" data-spy data-spy-parent="__all_types"> <h3 class="title is-3 is-anchored" > CustomDate <a class="anchor" href="#type__ApiLib.CustomDate"></a> </h3> <h4 class="title is-6">Type Information</h4> <div class="typedef-standalone"> <div class="typedef-type">date-only</div> </div> </div> <div class="subsection" id="type__ApiLib.Dog" data-spy data-spy-parent="__all_types"> <h3 class="title is-3 is-anchored" > Dog <a class="anchor" href="#type__ApiLib.Dog"></a> </h3> <h4 class="title is-6">Type Information</h4> <div class="typedef-standalone"> <div class="typedef-type">object</div> </div> </div> <div class="subsection" id="type__ApiLib.RamlDataType" data-spy data-spy-parent="__all_types"> <h3 class="title is-3 is-anchored" > RamlDataType <a class="anchor" href="#type__ApiLib.RamlDataType"></a> </h3> <h4 class="title is-6">Type Information</h4> <div class="typedef-standalone"> <div class="typedef-type">object</div> </div> </div> <div class="subsection" id="type__Entry" data-spy data-spy-parent="__all_types"> <h3 class="title is-3 is-anchored" > Entry <a class="anchor" href="#type__Entry"></a> </h3> <h4 class="title is-6">Type Information</h4> <div class="typedef-standalone"> <div class="typedef-type"><a href="#type__Entry" title="Jump to 'Entry' type docs" data-component="preview">Entry</a> (json)</div> </div> </div> <div class="subsection" id="type__SongsLib.Song" data-spy data-spy-parent="__all_types"> <h3 class="title is-3 is-anchored" > Song <a class="anchor" href="#type__SongsLib.Song"></a> </h3> <h4 class="title is-6">Type Information</h4> <div class="typedef-standalone"> <div class="typedef-type">object</div> </div> <h4 class="title is-6">Examples</h4> <ul> <li> <details> <summary>song1</summary> <pre><code>{ "title": "My Song", "length": 12 }</code></pre> </details> </li> <li> <details> <summary>song2</summary> <pre><code>{ "title": "Last", "length": 3 }</code></pre> </details> </li> </ul> </div> <div class="subsection" id="type__User" data-spy data-spy-parent="__all_types"> <h3 class="title is-3 is-anchored" > User <a class="anchor" href="#type__User"></a> </h3> <h4 class="title is-6">Examples</h4> <ul> <li> <details> <summary>Example</summary> <pre><code>{ "firstname": "John" }</code></pre> </details> </li> </ul> </div> </section> </main> </div> </div> </div> <script src="./assets/docs.js"></script> </body> </html>