1
0
mirror of https://github.com/danog/schema.tl.git synced 2024-12-12 09:29:40 +01:00
schema.tl/views/constructors/show.html
2017-08-21 22:08:01 -07:00

54 lines
1.6 KiB
HTML

<div class="content-inner">
<h1 class="title title-constructor">{{ constructor.predicate }}#{{ constructor.id | toHex }}</h1>
<a class="ic-docs" href="https://github.com/tjhorner/schema.tl/edit/master/docs/constructors/{{ constructor.predicate }}.md">Help document this constructor</a>
<div btf-markdown ng-include="'/docs/constructors/' + constructor.predicate + '.md'"></div>
<h2>Fields</h2>
<table ng-show="constructor.params.length">
<tr>
<th>
Name
</th>
<th>
Type
</th>
<th>
Value
</th>
</tr>
<tr ng-repeat="param in constructor.params">
<td>
{{ param.name }}
</td>
<td>
<a href="#!/type/{{ param.type | actualType }}">{{ param.type }}</a>
</td>
<td>
<input type="{{ param.type | htmlType }}" ng-model="playgroundVals[param.name]" ng-change="updatePlayground()" id="param-{{ param.name }}">
</td>
</tr>
</table>
<div ng-hide="constructor.params.length">
This constructor has no fields.
</div>
<h3>Constructs <a href="#!/type/{{ constructor.type | actualType }}">{{ constructor.type }}</a></h3>
<h2>Example (beta)</h2>
<p ng-show="constructor.params.length">
Type values in the table above to update the example below.
</p>
<p>
You can use this example in the API Playground at <a target="_blank" href="https://tjhorner.com/webogram">Telegram for Devs</a>.
<strong>Please note</strong> that only primitive types (such as int and string) are supported. You will need to go to
other constructors' pages to build them.
</p>
<pre>{{ playgroundOutput }}</pre>
</div>