design/api/metacategory.html
author ymh <ymh.work@gmail.com>
Thu, 03 Aug 2017 19:12:25 +0200
changeset 136 1a3be12af395
parent 133 6f3078f7fd47
permissions -rw-r--r--
we keep it in english waiting for i18n
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<!DOCTYPE html><html><head><meta charset="utf-8"><title>API</title><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"><style>@import url('https://fonts.googleapis.com/css?family=Roboto:400,700|Inconsolata|Raleway:200');.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}.right .hljs-comment{color:#969896}.right .css .hljs-class,.right .css .hljs-id,.right .css .hljs-pseudo,.right .hljs-attribute,.right .hljs-regexp,.right .hljs-tag,.right .hljs-variable,.right .html .hljs-doctype,.right .ruby .hljs-constant,.right .xml .hljs-doctype,.right .xml .hljs-pi,.right .xml .hljs-tag .hljs-title{color:#c66}.right .hljs-built_in,.right .hljs-constant,.right .hljs-literal,.right .hljs-number,.right .hljs-params,.right .hljs-pragma,.right .hljs-preprocessor{color:#de935f}.right .css .hljs-rule .hljs-attribute,.right .ruby .hljs-class .hljs-title{color:#f0c674}.right .hljs-header,.right .hljs-inheritance,.right .hljs-name,.right .hljs-string,.right .hljs-value,.right .ruby .hljs-symbol,.right .xml .hljs-cdata{color:#b5bd68}.right .css .hljs-hexcolor,.right .hljs-title{color:#8abeb7}.right .coffeescript .hljs-title,.right .hljs-function,.right .javascript .hljs-title,.right .perl .hljs-sub,.right .python .hljs-decorator,.right .python .hljs-title,.right .ruby .hljs-function .hljs-title,.right .ruby .hljs-title .hljs-keyword{color:#81a2be}.right .hljs-keyword,.right .javascript .hljs-function{color:#b294bb}.right .hljs{display:block;overflow-x:auto;background:#1d1f21;color:#c5c8c6;padding:.5em;-webkit-text-size-adjust:none}.right .coffeescript .javascript,.right .javascript .xml,.right .tex .hljs-formula,.right .xml .css,.right .xml .hljs-cdata,.right .xml .javascript,.right .xml .vbscript{opacity:.5}body{color:black;background:white;font:400 14px / 1.42 'Roboto',Helvetica,sans-serif}header{border-bottom:1px solid #f2f2f2;margin-bottom:12px}h1,h2,h3,h4,h5{color:black;margin:12px 0}h1 .permalink,h2 .permalink,h3 .permalink,h4 .permalink,h5 .permalink{margin-left:0;opacity:0;transition:opacity .25s ease}h1:hover .permalink,h2:hover .permalink,h3:hover .permalink,h4:hover .permalink,h5:hover .permalink{opacity:1}.triple h1 .permalink,.triple h2 .permalink,.triple h3 .permalink,.triple h4 .permalink,.triple h5 .permalink{opacity:.15}.triple h1:hover .permalink,.triple h2:hover .permalink,.triple h3:hover .permalink,.triple h4:hover .permalink,.triple h5:hover .permalink{opacity:.15}h1{font:200 36px 'Raleway',Helvetica,sans-serif;font-size:36px}h2{font:200 36px 'Raleway',Helvetica,sans-serif;font-size:30px}h3{font-size:100%;text-transform:uppercase}h5{font-size:100%;font-weight:normal}p{margin:0 0 10px}p.choices{line-height:1.6}a{color:#428bca;text-decoration:none}li p{margin:0}hr.split{border:0;height:1px;width:100%;padding-left:6px;margin:12px auto;background-image:linear-gradient(to right, rgba(0,0,0,0) 20%, rgba(0,0,0,0.2) 51.4%, rgba(255,255,255,0.2) 51.4%, rgba(255,255,255,0) 80%)}dl dt{float:left;width:130px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}dl dd{margin-left:150px}blockquote{color:rgba(0,0,0,0.5);font-size:15.5px;padding:10px 20px;margin:12px 0;border-left:5px solid #e8e8e8}blockquote p:last-child{margin-bottom:0}pre{background-color:#f5f5f5;padding:12px;border:1px solid #cfcfcf;border-radius:6px;overflow:auto}pre code{color:black;background-color:transparent;padding:0;border:none}code{color:#444;background-color:#f5f5f5;font:'Inconsolata',monospace;padding:1px 4px;border:1px solid #cfcfcf;border-radius:3px}ul,ol{padding-left:2em}table{border-collapse:collapse;border-spacing:0;margin-bottom:12px}table tr:nth-child(2n){background-color:#fafafa}table th,table td{padding:6px 12px;border:1px solid #e6e6e6}.text-muted{opacity:.5}.note,.warning{padding:.3em 1em;margin:1em 0;border-radius:2px;font-size:90%}.note h1,.warning h1,.note h2,.warning h2,.note h3,.warning h3,.note h4,.warning h4,.note h5,.warning h5,.note h6,.warning h6{font-family:200 36px 'Raleway',Helvetica,sans-serif;font-size:135%;font-weight:500}.note p,.warning p{margin:.5em 0}.note{color:black;background-color:#f0f6fb;border-left:4px solid #428bca}.note h1,.note h2,.note h3,.note h4,.note h5,.note h6{color:#428bca}.warning{color:black;background-color:#fbf1f0;border-left:4px solid #c9302c}.warning h1,.warning h2,.warning h3,.warning h4,.warning h5,.warning h6{color:#c9302c}header{margin-top:24px}nav{position:fixed;top:24px;bottom:0;overflow-y:auto}nav .resource-group{padding:0}nav .resource-group .heading{position:relative}nav .resource-group .heading .chevron{position:absolute;top:12px;right:12px;opacity:.5}nav .resource-group .heading a{display:block;color:black;opacity:.7;border-left:2px solid transparent;margin:0}nav .resource-group .heading a:hover{text-decoration:none;background-color:bad-color;border-left:2px solid black}nav ul{list-style-type:none;padding-left:0}nav ul a{display:block;font-size:13px;color:rgba(0,0,0,0.7);padding:8px 12px;border-top:1px solid #d9d9d9;border-left:2px solid transparent;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nav ul a:hover{text-decoration:none;background-color:bad-color;border-left:2px solid black}nav ul>li{margin:0}nav ul>li:first-child{margin-top:-12px}nav ul>li:last-child{margin-bottom:-12px}nav ul ul a{padding-left:24px}nav ul ul li{margin:0}nav ul ul li:first-child{margin-top:0}nav ul ul li:last-child{margin-bottom:0}nav>div>div>ul>li:first-child>a{border-top:none}.preload *{transition:none !important}.pull-left{float:left}.pull-right{float:right}.badge{display:inline-block;float:right;min-width:10px;min-height:14px;padding:3px 7px;font-size:12px;color:#000;background-color:#f2f2f2;border-radius:10px;margin:-2px 0}.badge.get{color:#70bbe1;background-color:#d9edf7}.badge.head{color:#70bbe1;background-color:#d9edf7}.badge.options{color:#70bbe1;background-color:#d9edf7}.badge.put{color:#f0db70;background-color:#fcf8e3}.badge.patch{color:#f0db70;background-color:#fcf8e3}.badge.post{color:#93cd7c;background-color:#dff0d8}.badge.delete{color:#ce8383;background-color:#f2dede}.collapse-button{float:right}.collapse-button .close{display:none;color:#428bca;cursor:pointer}.collapse-button .open{color:#428bca;cursor:pointer}.collapse-button.show .close{display:inline}.collapse-button.show .open{display:none}.collapse-content{max-height:0;overflow:hidden;transition:max-height .3s ease-in-out}nav{width:220px}.container{max-width:940px;margin-left:auto;margin-right:auto}.container .row .content{margin-left:244px;width:696px}.container .row:after{content:'';display:block;clear:both}.container-fluid nav{width:22%}.container-fluid .row .content{margin-left:24%}.container-fluid.triple nav{width:16.5%;padding-right:1px}.container-fluid.triple .row .content{position:relative;margin-left:16.5%;padding-left:24px}.middle:before,.middle:after{content:'';display:table}.middle:after{clear:both}.middle{box-sizing:border-box;width:51.5%;padding-right:12px}.right{box-sizing:border-box;float:right;width:48.5%;padding-left:12px}.right a{color:#428bca}.right h1,.right h2,.right h3,.right h4,.right h5,.right p,.right div{color:white}.right pre{background-color:#1d1f21;border:1px solid #1d1f21}.right pre code{color:#c5c8c6}.right .description{margin-top:12px}.triple .resource-heading{font-size:125%}.definition{margin-top:12px;margin-bottom:12px}.definition .method{font-weight:bold}.definition .method.get{color:#2e8ab8}.definition .method.head{color:#2e8ab8}.definition .method.options{color:#2e8ab8}.definition .method.post{color:#56b82e}.definition .method.put{color:#b8a22e}.definition .method.patch{color:#b8a22e}.definition .method.delete{color:#b82e2e}.definition .uri{word-break:break-all;word-wrap:break-word}.definition .hostname{opacity:.5}.example-names{background-color:#eee;padding:12px;border-radius:6px}.example-names .tab-button{cursor:pointer;color:black;border:1px solid #ddd;padding:6px;margin-left:12px}.example-names .tab-button.active{background-color:#d5d5d5}.right .example-names{background-color:#444}.right .example-names .tab-button{color:white;border:1px solid #666;border-radius:6px}.right .example-names .tab-button.active{background-color:#5e5e5e}#nav-background{position:fixed;left:0;top:0;bottom:0;width:16.5%;padding-right:14.4px;background-color:#fbfbfb;border-right:1px solid #f0f0f0;z-index:-1}#right-panel-background{position:absolute;right:-12px;top:-12px;bottom:-12px;width:48.6%;background-color:#333;z-index:-1}@media (max-width:1200px){nav{width:198px}.container{max-width:840px}.container .row .content{margin-left:224px;width:606px}}@media (max-width:992px){nav{width:169.4px}.container{max-width:720px}.container .row .content{margin-left:194px;width:526px}}@media (max-width:768px){nav{display:none}.container{width:95%;max-width:none}.container .row .content,.container-fluid .row .content,.container-fluid.triple .row .content{margin-left:auto;margin-right:auto;width:95%}#nav-background{display:none}#right-panel-background{width:48.6%}}.back-to-top{position:fixed;z-index:1;bottom:0;right:24px;padding:4px 8px;color:rgba(0,0,0,0.5);background-color:#f2f2f2;text-decoration:none !important;border-top:1px solid #d9d9d9;border-left:1px solid #d9d9d9;border-right:1px solid #d9d9d9;border-top-left-radius:3px;border-top-right-radius:3px}.resource-group{padding:12px;margin-bottom:12px;background-color:white;border:1px solid #d9d9d9;border-radius:6px}.resource-group h2.group-heading,.resource-group .heading a{padding:12px;margin:-12px -12px 12px -12px;background-color:#f2f2f2;border-bottom:1px solid #d9d9d9;border-top-left-radius:6px;border-top-right-radius:6px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.triple .content .resource-group{padding:0;border:none}.triple .content .resource-group h2.group-heading,.triple .content .resource-group .heading a{margin:0 0 12px 0;border:1px solid #d9d9d9}nav .resource-group .heading a{padding:12px;margin-bottom:0}nav .resource-group .collapse-content{padding:0}.action{margin-bottom:12px;padding:12px 12px 0 12px;overflow:hidden;border:1px solid transparent;border-radius:6px}.action h4.action-heading{padding:6px 12px;margin:-12px -12px 12px -12px;border-bottom:1px solid transparent;border-top-left-radius:6px;border-top-right-radius:6px;overflow:hidden}.action h4.action-heading .name{float:right;font-weight:normal;padding:6px 0}.action h4.action-heading .method{padding:6px 12px;margin-right:12px;border-radius:3px;display:inline-block}.action h4.action-heading .method.get{color:#fff;background-color:#337ab7}.action h4.action-heading .method.head{color:#fff;background-color:#337ab7}.action h4.action-heading .method.options{color:#fff;background-color:#337ab7}.action h4.action-heading .method.put{color:#fff;background-color:#ed9c28}.action h4.action-heading .method.patch{color:#fff;background-color:#ed9c28}.action h4.action-heading .method.post{color:#fff;background-color:#5cb85c}.action h4.action-heading .method.delete{color:#fff;background-color:#d9534f}.action h4.action-heading code{color:#444;background-color:#f5f5f5;border-color:#cfcfcf;font-weight:normal;word-break:break-all;display:inline-block;margin-top:2px}.action dl.inner{padding-bottom:2px}.action .title{border-bottom:1px solid white;margin:0 -12px -1px -12px;padding:12px}.action.get{border-color:#bce8f1}.action.get h4.action-heading{color:#337ab7;background:#d9edf7;border-bottom-color:#bce8f1}.action.head{border-color:#bce8f1}.action.head h4.action-heading{color:#337ab7;background:#d9edf7;border-bottom-color:#bce8f1}.action.options{border-color:#bce8f1}.action.options h4.action-heading{color:#337ab7;background:#d9edf7;border-bottom-color:#bce8f1}.action.post{border-color:#d6e9c6}.action.post h4.action-heading{color:#5cb85c;background:#dff0d8;border-bottom-color:#d6e9c6}.action.put{border-color:#faebcc}.action.put h4.action-heading{color:#ed9c28;background:#fcf8e3;border-bottom-color:#faebcc}.action.patch{border-color:#faebcc}.action.patch h4.action-heading{color:#ed9c28;background:#fcf8e3;border-bottom-color:#faebcc}.action.delete{border-color:#ebccd1}.action.delete h4.action-heading{color:#d9534f;background:#f2dede;border-bottom-color:#ebccd1}</style></head><body class="preload"><a href="#top" class="text-muted back-to-top"><i class="fa fa-toggle-up"></i>&nbsp;Back to top</a><div class="container"><div class="row"><nav><div class="resource-group"><div class="heading"><div class="chevron"><i class="open fa fa-angle-down"></i></div><a href="#">Resource Group</a></div><div class="collapse-content"><ul><li><a href="#collection-de-protocoles">Collection de protocoles</a><ul><li><a href="#collection-de-protocoles-get"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Voir la liste des protocoles</a></li><li><a href="#collection-de-protocoles-post"><span class="badge post"><i class="fa fa-plus"></i></span>Créer un nouveau protocole</a></li></ul></li><li><a href="#révisions-d-un-protocole.">Révisions d'un protocole.</a><ul><li><a href="#révisions-d-un-protocole.-get"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Voir la liste des revision pour un protocole</a></li><li><a href="#révisions-d-un-protocole.-post"><span class="badge post"><i class="fa fa-plus"></i></span>Créer une nouvelle révision du protocole</a></li></ul></li><li><a href="#détail-d-un-protocole-get"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Voir une revision d'un protocole</a></li><li><a href="#détail-méta-catégorie-get"><span class="badge get"><i class="fa fa-arrow-down"></i></span>Voir le détail d'une méta-catégorie</a></li></ul></div></div></nav><div class="content"><header><h1 id="top">API</h1></header><p>Documentation de l’API d’édition des protocoles d’annotation.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
<p>Tous les endpoint de cet API demande une authentification par token.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
Toutes les requêtes doievnt donc comporter l’en-tête suivant :</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
<pre><code class="language-http"><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b</span></code></pre>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
<section id="" class="resource-group"><h2 class="group-heading">Resource Group <a href="#" class="permalink">&para;</a></h2><div id="collection-de-protocoles" class="resource"><h3 class="resource-heading">Collection de protocoles <a href="#collection-de-protocoles" class="permalink">&nbsp;&para;</a></h3><div id="collection-de-protocoles-get" class="action get"><h4 class="action-heading"><div class="name">Voir la liste des protocoles</div><a href="#collection-de-protocoles-get" class="method get">GET</a><code class="uri">/protocol/{?page,page_size}</code></h4><p>Liste les protocoles pour une application. L’application est déterminée par le token passé comme authentification.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span>&nbsp;<span class="uri"><span class="hostname"></span>/protocol/?<span class="hljs-attribute">page=</span><span class="hljs-literal">3</span>&<span class="hljs-attribute">page_size=</span><span class="hljs-literal">15</span></span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>page</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>1</span></span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>3</span></span><p>Get the page.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
</dd><dt>page_size</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>10</span></span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>15</span></span><p>Set number of protocol per page</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
</dd></dl></div><div class="title"><strong>Request</strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b</span></code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
  "<span class="hljs-attribute">count</span>": <span class="hljs-value"><span class="hljs-number">15</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
  "<span class="hljs-attribute">next</span>": <span class="hljs-value"><span class="hljs-string">"http://scatedit.episteme.fr/api/protocol/?page=2"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
  "<span class="hljs-attribute">prev</span>": <span class="hljs-value"><span class="hljs-string">"null"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
  "<span class="hljs-attribute">results</span>": <span class="hljs-value">[
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
    {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
      "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"a4977c1f-4752-4aff-b724-eec4033af25c"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
      "<span class="hljs-attribute">owner</span>": <span class="hljs-value"><span class="hljs-string">"group1"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
      "<span class="hljs-attribute">revision_number</span>": <span class="hljs-value"><span class="hljs-number">5</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
      "<span class="hljs-attribute">last_description</span>": <span class="hljs-value"><span class="hljs-string">"Cras rutrum lacinia pretium. Suspendisse justo est, tincidunt sed tellus a, sodales suscipit risus. Curabitur odio tortor, tincidunt sed est nec, ullamcorper sodales velit."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
  ]
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    "<span class="hljs-attribute">count</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"number"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    "<span class="hljs-attribute">next</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    "<span class="hljs-attribute">prev</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
    "<span class="hljs-attribute">results</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"array"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
      "<span class="hljs-attribute">items</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
        "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
        "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
          "<span class="hljs-attribute">id</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
            "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
          </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
          "<span class="hljs-attribute">owner</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
            "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
          </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
          "<span class="hljs-attribute">revision_number</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
            "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"number"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
          </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
          "<span class="hljs-attribute">last_description</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
            "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
          </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
        </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
      </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
  </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
</span>}</code></pre><div style="height: 1px;"></div></div></div></div><div id="collection-de-protocoles-post" class="action post"><h4 class="action-heading"><div class="name">Créer un nouveau protocole</div><a href="#collection-de-protocoles-post" class="method post">POST</a><code class="uri">/protocol/</code></h4><p>Crée un nouveau protocole d’annotation dont la liste des méta-catégorie est la liste des méta-catégories par défaut pour l’application.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
<p>Le numéro de révision retourné sera toujours <code>1</code>.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
<h4>Example URI</h4><div class="definition"><span class="method post">POST</span>&nbsp;<span class="uri"><span class="hostname"></span>/protocol/</span></div><div class="title"><strong>Request</strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
  "<span class="hljs-attribute">owner</span>": <span class="hljs-value"><span class="hljs-string">"group1"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
  "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin massa nibh, hendrerit quis justo vitae, luctus tempor dolor. Nam quis fringilla diam."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
    "<span class="hljs-attribute">owner</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
    "<span class="hljs-attribute">description</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
  </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>201</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
    71
  "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"a4977c1f-4752-4aff-b724-eec4033af25c"</span></span>,
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
    72
  "<span class="hljs-attribute">owner</span>": <span class="hljs-value"><span class="hljs-string">"group1"</span></span>,
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
    73
  "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-string">"1"</span></span>,
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
    74
  "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Cras rutrum lacinia pretium. Suspendisse justo est, tincidunt sed tellus a, sodales suscipit risus. Curabitur odio tortor, tincidunt sed est nec, ullamcorper sodales velit."</span></span>,
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
  "<span class="hljs-attribute">metacategories</span>": <span class="hljs-value">[
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
    {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
      "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"e5712a76-857a-4769-b27e-a3ac3fb38b4d"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
      "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-number">2</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
      "<span class="hljs-attribute">base</span>": <span class="hljs-value"><span class="hljs-string">"ef14bcce-52ac-44ba-a7d1-f1441bab94de"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
      "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"référence"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
      "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin massa nibh, hendrerit quis justo vitae, luctus tempor dolor. Nam quis fringilla diam."</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
      "<span class="hljs-attribute">color</span>": <span class="hljs-value"><span class="hljs-string">"#2cbfff"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
      "<span class="hljs-attribute">has_comment</span>": <span class="hljs-value"><span class="hljs-literal">false</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
  ]
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
    "<span class="hljs-attribute">id</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
    </span>}</span>,
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
    93
    "<span class="hljs-attribute">owner</span>": <span class="hljs-value">{
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
    </span>}</span>,
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
    96
    "<span class="hljs-attribute">revision</span>": <span class="hljs-value">{
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
    "<span class="hljs-attribute">description</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
    "<span class="hljs-attribute">metacategories</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"array"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
  </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
</span>}</code></pre><div style="height: 1px;"></div></div></div></div></div><div id="révisions-d-un-protocole." class="resource"><h3 class="resource-heading">Révisions d'un protocole. <a href="#révisions-d-un-protocole." class="permalink">&nbsp;&para;</a></h3><div id="révisions-d-un-protocole.-get" class="action get"><h4 class="action-heading"><div class="name">Voir la liste des revision pour un protocole</div><a href="#révisions-d-un-protocole.-get" class="method get">GET</a><code class="uri">/protocol/{id}/{?page,page_size}</code></h4><p>Liste les revisions d’un protocole pour une application.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span>&nbsp;<span class="uri"><span class="hostname"></span>/protocol/<span class="hljs-attribute" title="id">a4977c1f-4752-4aff-b724-eec4033af25c</span>/?<span class="hljs-attribute">page=</span><span class="hljs-literal">3</span>&<span class="hljs-attribute">page_size=</span><span class="hljs-literal">15</span></span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>a4977c1f-4752-4aff-b724-eec4033af25c</span></span><p>Identifiant d’un protocole</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
</dd><dt>page</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>1</span></span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>3</span></span><p>Get the page.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
</dd><dt>page_size</dt><dd><code>number</code>&nbsp;<span>(optional)</span>&nbsp;<span class="text-info default"><strong>Default:&nbsp;</strong><span>10</span></span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>15</span></span><p>Set number of protocol per page</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
</dd></dl></div><div class="title"><strong>Request</strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b</span></code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
  "<span class="hljs-attribute">count</span>": <span class="hljs-value"><span class="hljs-string">"15"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
  "<span class="hljs-attribute">next</span>": <span class="hljs-value"><span class="hljs-string">"http://scatedit.episteme.fr/api/protocol/a4977c1f"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
  "<span class="hljs-attribute">prev</span>": <span class="hljs-value"><span class="hljs-string">"null"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
  "<span class="hljs-attribute">results</span>": <span class="hljs-value">[
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
    {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
      "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"a4977c1f-4752-4aff-b724-eec4033af25c"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
      "<span class="hljs-attribute">owner</span>": <span class="hljs-value"><span class="hljs-string">"group1"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
      "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-string">"1"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
      "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Cras rutrum lacinia pretium. Suspendisse justo est, tincidunt sed tellus a, sodales suscipit risus. Curabitur odio tortor, tincidunt sed est nec, ullamcorper sodales velit."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
  ]
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
    "<span class="hljs-attribute">count</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
    "<span class="hljs-attribute">next</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
      "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"4752-4aff-b724-eec4033af25c?page=2"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
    "<span class="hljs-attribute">prev</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
    "<span class="hljs-attribute">results</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"array"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
  </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>403</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><div class="description"><p>Retournée si l’utilisateur (application) n’est pas le propriétaire du protocole.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
</div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
  "<span class="hljs-attribute">error</span>": <span class="hljs-value"><span class="hljs-string">"Application is not protocol owner."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
    "<span class="hljs-attribute">error</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
  </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>404</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><div class="description"><p>Retournée si l’identifiant ne coreespond à aucun protocole.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
</div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
  "<span class="hljs-attribute">error</span>": <span class="hljs-value"><span class="hljs-string">"Object not found."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   155
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   157
    "<span class="hljs-attribute">error</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   159
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   160
  </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   161
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
</span>}</code></pre><div style="height: 1px;"></div></div></div></div><div id="révisions-d-un-protocole.-post" class="action post"><h4 class="action-heading"><div class="name">Créer une nouvelle révision du protocole</div><a href="#révisions-d-un-protocole.-post" class="method post">POST</a><code class="uri">/protocol/{id}/</code></h4><p>Permet de créer une nouvelle révision du protocole.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   163
<p>L’attribut <code>revision</code> doit être le dernier numéro de révision du protocole.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
<p>La liste des métacatégorie doit être complête et remplacera la liste existante sur la révision courante.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
Tous les attributs d’une metacategories doivent être fournis à part <code>id</code>, <code>revision</code> et <code>base</code>.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
Les rêgles pour ces derniers sont les suivantes</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
<ul>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
<li>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
<p>Si <code>id</code> est présent: l’attribut <code>revision</code> doit être fourni et correspondre à la dernière valeur pour cette méta-catégorie. Si un des attributs a été modifé, une nouvelle révision sera créee.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   170
</li>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
<li>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
<p>Si <code>id</code> n’est pas présent: 2 possibilités:</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
<ul>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
<li><code>base</code> est présent: Dans ce cas une nouvelle famille de méta-catégorie est créé prenant pour base la métacatégorie dont l’ID est passé comme base. Si les attributs ne sont pas les mêmes, une nouvelle révision sera automatiquement créée, sinon, les attributs de la méta-catégorie de base sont copié dans une révision de base.</li>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
<li><code>base</code> n’est pas présent: une nouvelle métacatégorie est créée ainsi qu’une nouvelle famille de méta-catégorie basée dessus.</li>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
</ul>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   177
</li>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
</ul>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
<p>Dans tous les cas, le retours est une sérialisation complête du protocole d’annotation, avec les nouveaux <code>id</code> et <code>revision</code> pour les méta-catégories créées ou mis à jour.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
<h4>Example URI</h4><div class="definition"><span class="method post">POST</span>&nbsp;<span class="uri"><span class="hostname"></span>/protocol/<span class="hljs-attribute" title="id">a4977c1f-4752-4aff-b724-eec4033af25c</span>/</span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>a4977c1f-4752-4aff-b724-eec4033af25c</span></span><p>Identifiant d’un protocole</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
</dd></dl></div><div class="title"><strong>Request</strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
  "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"a4977c1f-4752-4aff-b724-eec4033af25c"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
  "<span class="hljs-attribute">owner</span>": <span class="hljs-value"><span class="hljs-string">"group1"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
  "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-string">"1"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   185
  "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Cras rutrum lacinia pretium. Suspendisse justo est, tincidunt sed tellus a, sodales suscipit risus. Curabitur odio tortor, tincidunt sed est nec, ullamcorper sodales velit."</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   186
  "<span class="hljs-attribute">metacategories</span>": <span class="hljs-value">[
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   187
    {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   188
      "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"e5712a76-857a-4769-b27e-a3ac3fb38b4d"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
      "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-number">2</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   190
      "<span class="hljs-attribute">base</span>": <span class="hljs-value"><span class="hljs-string">"ef14bcce-52ac-44ba-a7d1-f1441bab94de"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   191
      "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"référence"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   192
      "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin massa nibh, hendrerit quis justo vitae, luctus tempor dolor. Nam quis fringilla diam."</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   193
      "<span class="hljs-attribute">color</span>": <span class="hljs-value"><span class="hljs-string">"#2cbfff"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   194
      "<span class="hljs-attribute">has_comment</span>": <span class="hljs-value"><span class="hljs-literal">false</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   195
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   196
  ]
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   197
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   198
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   199
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   200
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   201
    "<span class="hljs-attribute">id</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   202
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   203
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   204
    "<span class="hljs-attribute">owner</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   205
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   206
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   207
    "<span class="hljs-attribute">revision</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   208
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   209
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   210
    "<span class="hljs-attribute">description</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   211
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   212
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   213
    "<span class="hljs-attribute">metacategories</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   214
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"array"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   215
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   216
  </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   217
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>201</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   218
  "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"a4977c1f-4752-4aff-b724-eec4033af25c"</span></span>,
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   219
  "<span class="hljs-attribute">owner</span>": <span class="hljs-value"><span class="hljs-string">"group1"</span></span>,
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   220
  "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-string">"1"</span></span>,
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   221
  "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Cras rutrum lacinia pretium. Suspendisse justo est, tincidunt sed tellus a, sodales suscipit risus. Curabitur odio tortor, tincidunt sed est nec, ullamcorper sodales velit."</span></span>,
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   222
  "<span class="hljs-attribute">metacategories</span>": <span class="hljs-value">[
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   223
    {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   224
      "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"e5712a76-857a-4769-b27e-a3ac3fb38b4d"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   225
      "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-number">2</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   226
      "<span class="hljs-attribute">base</span>": <span class="hljs-value"><span class="hljs-string">"ef14bcce-52ac-44ba-a7d1-f1441bab94de"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   227
      "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"référence"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   228
      "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin massa nibh, hendrerit quis justo vitae, luctus tempor dolor. Nam quis fringilla diam."</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   229
      "<span class="hljs-attribute">color</span>": <span class="hljs-value"><span class="hljs-string">"#2cbfff"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   230
      "<span class="hljs-attribute">has_comment</span>": <span class="hljs-value"><span class="hljs-literal">false</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   231
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   232
  ]
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   233
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   234
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   235
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   236
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   237
    "<span class="hljs-attribute">id</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   238
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   239
    </span>}</span>,
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   240
    "<span class="hljs-attribute">owner</span>": <span class="hljs-value">{
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   241
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   242
    </span>}</span>,
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   243
    "<span class="hljs-attribute">revision</span>": <span class="hljs-value">{
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   244
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   245
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   246
    "<span class="hljs-attribute">description</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   247
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   248
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   249
    "<span class="hljs-attribute">metacategories</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   250
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"array"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   251
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   252
  </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   253
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>403</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><div class="description"><p>Retournée si l’utilisateur (application) n’est pas le propriétaire du protocole.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   254
</div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   255
  "<span class="hljs-attribute">error</span>": <span class="hljs-value"><span class="hljs-string">"Application is not protocol owner."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   256
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   257
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   258
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   259
    "<span class="hljs-attribute">error</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   260
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   261
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   262
  </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   263
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   264
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>409</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><div class="description"><p>Retournée si la valeur de l’attribut <code>revision</code> n’est pas le numéro de version courant du protocole, ou bien d’une des méta-catégories.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   265
</div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   266
  "<span class="hljs-attribute">error</span>": <span class="hljs-value"><span class="hljs-string">"Bad revision number."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   267
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   268
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   269
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   270
    "<span class="hljs-attribute">error</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   271
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   272
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   273
  </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   274
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   275
</span>}</code></pre><div style="height: 1px;"></div></div></div></div></div><div id="détail-d-un-protocole" class="resource"><h3 class="resource-heading">Détail d'un protocole <a href="#détail-d-un-protocole" class="permalink">&nbsp;&para;</a></h3><div id="détail-d-un-protocole-get" class="action get"><h4 class="action-heading"><div class="name">Voir une revision d'un protocole</div><a href="#détail-d-un-protocole-get" class="method get">GET</a><code class="uri">/protocol/{id}/{revision}/</code></h4><p>Permet d’obtenir la représentation complète d’une révision de protocole.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   276
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span>&nbsp;<span class="uri"><span class="hostname"></span>/protocol/<span class="hljs-attribute" title="id">a4977c1f-4752-4aff-b724-eec4033af25c</span>/<span class="hljs-attribute" title="revision">2</span>/</span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>a4977c1f-4752-4aff-b724-eec4033af25c</span></span><p>Identifiant d’un protocole</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   277
</dd><dt>revision</dt><dd><code>number</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>2</span></span><p>Numéro de la révision</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   278
</dd></dl></div><div class="title"><strong>Response&nbsp;&nbsp;<code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   279
  "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"a4977c1f-4752-4aff-b724-eec4033af25c"</span></span>,
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   280
  "<span class="hljs-attribute">owner</span>": <span class="hljs-value"><span class="hljs-string">"group1"</span></span>,
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   281
  "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-string">"1"</span></span>,
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   282
  "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Cras rutrum lacinia pretium. Suspendisse justo est, tincidunt sed tellus a, sodales suscipit risus. Curabitur odio tortor, tincidunt sed est nec, ullamcorper sodales velit."</span></span>,
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   283
  "<span class="hljs-attribute">metacategories</span>": <span class="hljs-value">[
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   284
    {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   285
      "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"e5712a76-857a-4769-b27e-a3ac3fb38b4d"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   286
      "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-number">2</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   287
      "<span class="hljs-attribute">base</span>": <span class="hljs-value"><span class="hljs-string">"ef14bcce-52ac-44ba-a7d1-f1441bab94de"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   288
      "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"référence"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   289
      "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin massa nibh, hendrerit quis justo vitae, luctus tempor dolor. Nam quis fringilla diam."</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   290
      "<span class="hljs-attribute">color</span>": <span class="hljs-value"><span class="hljs-string">"#2cbfff"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   291
      "<span class="hljs-attribute">has_comment</span>": <span class="hljs-value"><span class="hljs-literal">false</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   292
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   293
  ]
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   294
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   295
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   296
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   297
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   298
    "<span class="hljs-attribute">id</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   299
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   300
    </span>}</span>,
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   301
    "<span class="hljs-attribute">owner</span>": <span class="hljs-value">{
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   302
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   303
    </span>}</span>,
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   304
    "<span class="hljs-attribute">revision</span>": <span class="hljs-value">{
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   305
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   306
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   307
    "<span class="hljs-attribute">description</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   308
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   309
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   310
    "<span class="hljs-attribute">metacategories</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   311
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"array"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   312
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   313
  </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   314
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>403</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><div class="description"><p>Retournée si l’utilisateur (application) n’est pas le propriétaire du protocole.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   315
</div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   316
  "<span class="hljs-attribute">error</span>": <span class="hljs-value"><span class="hljs-string">"Application is not protocol owner."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   317
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   318
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   319
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   320
    "<span class="hljs-attribute">error</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   321
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   322
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   323
  </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   324
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   325
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>404</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><div class="description"><p>Retournée si l’un des paramêtre est érroné et qu’aucun objet ne correspond.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   326
</div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   327
  "<span class="hljs-attribute">error</span>": <span class="hljs-value"><span class="hljs-string">"Object not found."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   328
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   329
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   330
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   331
    "<span class="hljs-attribute">error</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   332
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   333
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   334
  </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   335
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   336
</span>}</code></pre><div style="height: 1px;"></div></div></div></div></div><div id="détail-méta-catégorie" class="resource"><h3 class="resource-heading">Détail méta-catégorie <a href="#détail-méta-catégorie" class="permalink">&nbsp;&para;</a></h3><div id="détail-méta-catégorie-get" class="action get"><h4 class="action-heading"><div class="name">Voir le détail d'une méta-catégorie</div><a href="#détail-méta-catégorie-get" class="method get">GET</a><code class="uri">/protocol/{protocol_id}/{revision}/metacategory/{metacategory_id}/</code></h4><p>Permet d’obtenir la représentation d’une révision de métacatégorie.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   337
<h4>Example URI</h4><div class="definition"><span class="method get">GET</span>&nbsp;<span class="uri"><span class="hostname"></span>/protocol/<span class="hljs-attribute" title="protocol_id">a4977c1f-4752-4aff-b724-eec4033af25c</span>/<span class="hljs-attribute" title="revision">2</span>/metacategory/<span class="hljs-attribute" title="metacategory_id">e5712a76-857a-4769-b27e-a3ac3fb38b4d</span>/</span></div><div class="title"><strong>URI Parameters</strong><div class="collapse-button show"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><dl class="inner"><dt>protocol_id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>a4977c1f-4752-4aff-b724-eec4033af25c</span></span><p>Identifiant d’un protocole</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   338
</dd><dt>revision</dt><dd><code>number</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>2</span></span><p>Numéro de la révision</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   339
</dd><dt>metacategory_id</dt><dd><code>string</code>&nbsp;<span class="required">(required)</span>&nbsp;<span class="text-muted example"><strong>Example:&nbsp;</strong><span>e5712a76-857a-4769-b27e-a3ac3fb38b4d</span></span><p>Identifiant d’une méta-categorie</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   340
</dd></dl></div><div class="title"><strong>Response&nbsp;&nbsp;<code>200</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span></code></pre><div style="height: 1px;"></div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   341
  "<span class="hljs-attribute">id</span>": <span class="hljs-value"><span class="hljs-string">"e5712a76-857a-4769-b27e-a3ac3fb38b4d"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   342
  "<span class="hljs-attribute">revision</span>": <span class="hljs-value"><span class="hljs-number">2</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   343
  "<span class="hljs-attribute">base</span>": <span class="hljs-value"><span class="hljs-string">"ef14bcce-52ac-44ba-a7d1-f1441bab94de"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   344
  "<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"référence"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   345
  "<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin massa nibh, hendrerit quis justo vitae, luctus tempor dolor. Nam quis fringilla diam."</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   346
  "<span class="hljs-attribute">color</span>": <span class="hljs-value"><span class="hljs-string">"#2cbfff"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   347
  "<span class="hljs-attribute">has_comment</span>": <span class="hljs-value"><span class="hljs-literal">false</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   348
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   349
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   350
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   351
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   352
    "<span class="hljs-attribute">id</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   353
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   354
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   355
    "<span class="hljs-attribute">revision</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   356
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"number"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   357
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   358
    "<span class="hljs-attribute">base</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   359
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   360
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   361
    "<span class="hljs-attribute">name</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   362
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   363
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   364
    "<span class="hljs-attribute">description</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   365
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   366
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   367
    "<span class="hljs-attribute">color</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   368
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   369
    </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   370
    "<span class="hljs-attribute">has_comment</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   371
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"boolean"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   372
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   373
  </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   374
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>403</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><div class="description"><p>Retournée si l’utilisateur (application) n’est pas le propriétaire du protocole.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   375
</div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   376
  "<span class="hljs-attribute">error</span>": <span class="hljs-value"><span class="hljs-string">"Application is not protocol owner."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   377
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   378
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   379
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   380
    "<span class="hljs-attribute">error</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   381
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   382
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   383
  </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   384
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   385
</span>}</code></pre><div style="height: 1px;"></div></div></div><div class="title"><strong>Response&nbsp;&nbsp;<code>404</code></strong><div class="collapse-button"><span class="close">Hide</span><span class="open">Show</span></div></div><div class="collapse-content"><div class="inner"><div class="description"><p>Retournée si l’un des paramêtre est érroné et qu’aucun objet ne correspond.</p>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   386
</div><h5>Body</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   387
  "<span class="hljs-attribute">error</span>": <span class="hljs-value"><span class="hljs-string">"Object not found."</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   388
</span>}</code></pre><div style="height: 1px;"></div><h5>Schema</h5><pre><code>{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   389
  "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"object"</span></span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   390
  "<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   391
    "<span class="hljs-attribute">error</span>": <span class="hljs-value">{
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   392
      "<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"string"</span>
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   393
    </span>}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   394
  </span>}</span>,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   395
  "<span class="hljs-attribute">$schema</span>": <span class="hljs-value"><span class="hljs-string">"http://json-schema.org/draft-04/schema#"</span>
133
6f3078f7fd47 Work on correct protocol propagation
ymh <ymh.work@gmail.com>
parents: 116
diff changeset
   396
</span>}</code></pre><div style="height: 1px;"></div></div></div></div></div></section></div></div></div><p style="text-align: center;" class="text-muted">Generated by&nbsp;<a href="https://github.com/danielgtaylor/aglio" class="aglio">aglio</a>&nbsp;on 01 Aug 2017</p><script>/* eslint-env browser */
116
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   397
/* eslint quotes: [2, "single"] */
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   398
'use strict';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   399
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   400
/*
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   401
  Determine if a string ends with another string.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   402
*/
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   403
function endsWith(str, suffix) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   404
    return str.indexOf(suffix, str.length - suffix.length) !== -1;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   405
}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   406
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   407
/*
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   408
  Get a list of direct child elements by class name.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   409
*/
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   410
function childrenByClass(element, name) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   411
  var filtered = [];
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   412
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   413
  for (var i = 0; i < element.children.length; i++) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   414
    var child = element.children[i];
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   415
    var classNames = child.className.split(' ');
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   416
    if (classNames.indexOf(name) !== -1) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   417
      filtered.push(child);
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   418
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   419
  }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   420
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   421
  return filtered;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   422
}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   423
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   424
/*
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   425
  Get an array [width, height] of the window.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   426
*/
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   427
function getWindowDimensions() {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   428
  var w = window,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   429
      d = document,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   430
      e = d.documentElement,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   431
      g = d.body,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   432
      x = w.innerWidth || e.clientWidth || g.clientWidth,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   433
      y = w.innerHeight || e.clientHeight || g.clientHeight;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   434
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   435
  return [x, y];
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   436
}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   437
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   438
/*
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   439
  Collapse or show a request/response example.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   440
*/
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   441
function toggleCollapseButton(event) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   442
    var button = event.target.parentNode;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   443
    var content = button.parentNode.nextSibling;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   444
    var inner = content.children[0];
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   445
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   446
    if (button.className.indexOf('collapse-button') === -1) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   447
      // Clicked without hitting the right element?
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   448
      return;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   449
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   450
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   451
    if (content.style.maxHeight && content.style.maxHeight !== '0px') {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   452
        // Currently showing, so let's hide it
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   453
        button.className = 'collapse-button';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   454
        content.style.maxHeight = '0px';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   455
    } else {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   456
        // Currently hidden, so let's show it
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   457
        button.className = 'collapse-button show';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   458
        content.style.maxHeight = inner.offsetHeight + 12 + 'px';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   459
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   460
}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   461
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   462
function toggleTabButton(event) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   463
    var i, index;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   464
    var button = event.target;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   465
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   466
    // Get index of the current button.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   467
    var buttons = childrenByClass(button.parentNode, 'tab-button');
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   468
    for (i = 0; i < buttons.length; i++) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   469
        if (buttons[i] === button) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   470
            index = i;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   471
            button.className = 'tab-button active';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   472
        } else {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   473
            buttons[i].className = 'tab-button';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   474
        }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   475
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   476
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   477
    // Hide other tabs and show this one.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   478
    var tabs = childrenByClass(button.parentNode.parentNode, 'tab');
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   479
    for (i = 0; i < tabs.length; i++) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   480
        if (i === index) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   481
            tabs[i].style.display = 'block';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   482
        } else {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   483
            tabs[i].style.display = 'none';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   484
        }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   485
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   486
}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   487
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   488
/*
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   489
  Collapse or show a navigation menu. It will not be hidden unless it
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   490
  is currently selected or `force` has been passed.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   491
*/
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   492
function toggleCollapseNav(event, force) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   493
    var heading = event.target.parentNode;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   494
    var content = heading.nextSibling;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   495
    var inner = content.children[0];
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   496
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   497
    if (heading.className.indexOf('heading') === -1) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   498
      // Clicked without hitting the right element?
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   499
      return;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   500
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   501
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   502
    if (content.style.maxHeight && content.style.maxHeight !== '0px') {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   503
      // Currently showing, so let's hide it, but only if this nav item
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   504
      // is already selected. This prevents newly selected items from
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   505
      // collapsing in an annoying fashion.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   506
      if (force || window.location.hash && endsWith(event.target.href, window.location.hash)) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   507
        content.style.maxHeight = '0px';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   508
      }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   509
    } else {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   510
      // Currently hidden, so let's show it
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   511
      content.style.maxHeight = inner.offsetHeight + 12 + 'px';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   512
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   513
}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   514
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   515
/*
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   516
  Refresh the page after a live update from the server. This only
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   517
  works in live preview mode (using the `--server` parameter).
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   518
*/
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   519
function refresh(body) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   520
    document.querySelector('body').className = 'preload';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   521
    document.body.innerHTML = body;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   522
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   523
    // Re-initialize the page
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   524
    init();
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   525
    autoCollapse();
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   526
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   527
    document.querySelector('body').className = '';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   528
}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   529
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   530
/*
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   531
  Determine which navigation items should be auto-collapsed to show as many
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   532
  as possible on the screen, based on the current window height. This also
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   533
  collapses them.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   534
*/
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   535
function autoCollapse() {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   536
  var windowHeight = getWindowDimensions()[1];
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   537
  var itemsHeight = 64; /* Account for some padding */
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   538
  var itemsArray = Array.prototype.slice.call(
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   539
    document.querySelectorAll('nav .resource-group .heading'));
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   540
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   541
  // Get the total height of the navigation items
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   542
  itemsArray.forEach(function (item) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   543
    itemsHeight += item.parentNode.offsetHeight;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   544
  });
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   545
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   546
  // Should we auto-collapse any nav items? Try to find the smallest item
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   547
  // that can be collapsed to show all items on the screen. If not possible,
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   548
  // then collapse the largest item and do it again. First, sort the items
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   549
  // by height from smallest to largest.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   550
  var sortedItems = itemsArray.sort(function (a, b) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   551
    return a.parentNode.offsetHeight - b.parentNode.offsetHeight;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   552
  });
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   553
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   554
  while (sortedItems.length && itemsHeight > windowHeight) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   555
    for (var i = 0; i < sortedItems.length; i++) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   556
      // Will collapsing this item help?
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   557
      var itemHeight = sortedItems[i].nextSibling.offsetHeight;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   558
      if ((itemsHeight - itemHeight <= windowHeight) || i === sortedItems.length - 1) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   559
        // It will, so let's collapse it, remove its content height from
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   560
        // our total and then remove it from our list of candidates
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   561
        // that can be collapsed.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   562
        itemsHeight -= itemHeight;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   563
        toggleCollapseNav({target: sortedItems[i].children[0]}, true);
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   564
        sortedItems.splice(i, 1);
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   565
        break;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   566
      }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   567
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   568
  }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   569
}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   570
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   571
/*
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   572
  Initialize the interactive functionality of the page.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   573
*/
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   574
function init() {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   575
    var i, j;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   576
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   577
    // Make collapse buttons clickable
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   578
    var buttons = document.querySelectorAll('.collapse-button');
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   579
    for (i = 0; i < buttons.length; i++) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   580
        buttons[i].onclick = toggleCollapseButton;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   581
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   582
        // Show by default? Then toggle now.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   583
        if (buttons[i].className.indexOf('show') !== -1) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   584
            toggleCollapseButton({target: buttons[i].children[0]});
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   585
        }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   586
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   587
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   588
    var responseCodes = document.querySelectorAll('.example-names');
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   589
    for (i = 0; i < responseCodes.length; i++) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   590
        var tabButtons = childrenByClass(responseCodes[i], 'tab-button');
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   591
        for (j = 0; j < tabButtons.length; j++) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   592
            tabButtons[j].onclick = toggleTabButton;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   593
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   594
            // Show by default?
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   595
            if (j === 0) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   596
                toggleTabButton({target: tabButtons[j]});
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   597
            }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   598
        }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   599
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   600
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   601
    // Make nav items clickable to collapse/expand their content.
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   602
    var navItems = document.querySelectorAll('nav .resource-group .heading');
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   603
    for (i = 0; i < navItems.length; i++) {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   604
        navItems[i].onclick = toggleCollapseNav;
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   605
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   606
        // Show all by default
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   607
        toggleCollapseNav({target: navItems[i].children[0]});
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   608
    }
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   609
}
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   610
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   611
// Initial call to set up buttons
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   612
init();
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   613
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   614
window.onload = function () {
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   615
    autoCollapse();
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   616
    // Remove the `preload` class to enable animations
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   617
    document.querySelector('body').className = '';
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   618
};
672e3c4bbd0c add documentation for metacategory editor
ymh <ymh.work@gmail.com>
parents:
diff changeset
   619
</script></body></html>