mirror of
https://github.com/Decicus/DecAPI-Docs.git
synced 2024-11-25 22:02:32 +01:00
Update styling to use Font Awesome 5 and Bootswatch 4
This commit is contained in:
parent
697f3faef6
commit
4e769aab1d
20
index.html
20
index.html
@ -5,10 +5,11 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>DecAPI Docs</title>
|
<title>DecAPI Docs</title>
|
||||||
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cosmo/bootstrap.min.css" rel="stylesheet" integrity="sha384-h21C2fcDk/eFsW9sC9h0dhokq5pDinLNklTKoxIZRUn3+hvmgQSffLLQ4G4l2eEr" crossorigin="anonymous">
|
<link href="https://stackpath.bootstrapcdn.com/bootswatch/4.1.1/cosmo/bootstrap.min.css" rel="stylesheet" integrity="sha384-e5ln1YQrCh2KTj0GVDWxOfDZ53Fd5Uss2u08OZUtzZNrxWfeYC4P7VBWHRDPvJUk" crossorigin="anonymous">
|
||||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
|
||||||
<style media="screen">
|
<style media="screen">
|
||||||
body {
|
body {
|
||||||
|
padding-top: 80px;
|
||||||
padding-bottom: 80px;
|
padding-bottom: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,14 +17,13 @@
|
|||||||
color: #be1931;
|
color: #be1931;
|
||||||
}
|
}
|
||||||
|
|
||||||
#back-to-top:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
#description .list-group-item a {
|
#description .list-group-item a {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.botSelection:hover, .endpointListItem:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
@ -38,10 +38,8 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
||||||
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
|
<nav class="navbar navbar-dark bg-dark fixed-bottom" role="navigation">
|
||||||
<div class="container-fluid">
|
<div class="navbar-text">Design & layout heavily inspired by <a href="https://xpaw.me/">xPaw</a> from their <a href="https://lab.xpaw.me/steam_api_documentation.html">Steam Web API Documentation</a>. Special thanks <i class="fa fa-1x fa-heart"></i></div>
|
||||||
<p class="navbar-text">Design & layout heavily inspired by <a href="https://xpaw.me/" class="navbar-link">xPaw</a> from their <a href="https://lab.xpaw.me/steam_api_documentation.html" class="navbar-link">Steam Web API Documentation</a>. Special thanks <i class="fa fa-1x fa-heart"></i></p>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
4930
package-lock.json
generated
4930
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
33
package.json
33
package.json
@ -11,41 +11,42 @@
|
|||||||
"lint": "eslint --ext .js,.vue src"
|
"lint": "eslint --ext .js,.vue src"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "^3.3.7",
|
"bootstrap": "^4.1.1",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
"js-yaml": "^3.11.0",
|
"js-yaml": "^3.12.0",
|
||||||
"vue": "^2.5.13",
|
"popper.js": "^1.14.3",
|
||||||
"vue-resource": "^1.5.0",
|
"vue": "^2.5.16",
|
||||||
|
"vue-resource": "^1.5.1",
|
||||||
"vue-router": "^2.8.1",
|
"vue-router": "^2.8.1",
|
||||||
"vuex": "^2.5.0"
|
"vuex": "^2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^6.7.2",
|
"autoprefixer": "^6.7.2",
|
||||||
"babel-core": "^6.22.1",
|
"babel-core": "^6.26.3",
|
||||||
"babel-eslint": "^7.1.1",
|
"babel-eslint": "^7.1.1",
|
||||||
"babel-loader": "^6.2.10",
|
"babel-loader": "^6.2.10",
|
||||||
"babel-plugin-transform-runtime": "^6.22.0",
|
"babel-plugin-transform-runtime": "^6.22.0",
|
||||||
"babel-preset-env": "^1.6.1",
|
"babel-preset-env": "^1.7.0",
|
||||||
"babel-preset-stage-2": "^6.22.0",
|
"babel-preset-stage-2": "^6.22.0",
|
||||||
"babel-register": "^6.22.0",
|
"babel-register": "^6.22.0",
|
||||||
"chalk": "^1.1.3",
|
"chalk": "^1.1.3",
|
||||||
"connect-history-api-fallback": "^1.5.0",
|
"connect-history-api-fallback": "^1.5.0",
|
||||||
"copy-webpack-plugin": "^4.5.0",
|
"copy-webpack-plugin": "^4.5.1",
|
||||||
"css-loader": "^0.28.10",
|
"css-loader": "^0.28.11",
|
||||||
"eslint": "^3.19.0",
|
"eslint": "^3.19.0",
|
||||||
"eslint-config-airbnb-base": "^11.3.2",
|
"eslint-config-airbnb-base": "^11.3.2",
|
||||||
"eslint-friendly-formatter": "^2.0.7",
|
"eslint-friendly-formatter": "^2.0.7",
|
||||||
"eslint-import-resolver-webpack": "^0.8.4",
|
"eslint-import-resolver-webpack": "^0.8.4",
|
||||||
"eslint-loader": "^1.7.1",
|
"eslint-loader": "^1.7.1",
|
||||||
"eslint-plugin-html": "^2.0.0",
|
"eslint-plugin-html": "^2.0.0",
|
||||||
"eslint-plugin-import": "^2.9.0",
|
"eslint-plugin-import": "^2.13.0",
|
||||||
"eventsource-polyfill": "^0.9.6",
|
"eventsource-polyfill": "^0.9.6",
|
||||||
"express": "^4.16.2",
|
"express": "^4.16.3",
|
||||||
"extract-text-webpack-plugin": "^2.0.0",
|
"extract-text-webpack-plugin": "^2.0.0",
|
||||||
"file-loader": "^0.11.1",
|
"file-loader": "^0.11.1",
|
||||||
"friendly-errors-webpack-plugin": "^1.1.3",
|
"friendly-errors-webpack-plugin": "^1.7.0",
|
||||||
"html-webpack-plugin": "^2.28.0",
|
"html-webpack-plugin": "^2.28.0",
|
||||||
"http-proxy-middleware": "^0.17.3",
|
"http-proxy-middleware": "^0.18.0",
|
||||||
"opn": "^4.0.2",
|
"opn": "^4.0.2",
|
||||||
"optimize-css-assets-webpack-plugin": "^1.3.0",
|
"optimize-css-assets-webpack-plugin": "^1.3.0",
|
||||||
"ora": "^1.4.0",
|
"ora": "^1.4.0",
|
||||||
@ -55,12 +56,12 @@
|
|||||||
"url-loader": "^0.5.8",
|
"url-loader": "^0.5.8",
|
||||||
"vue-loader": "^12.1.0",
|
"vue-loader": "^12.1.0",
|
||||||
"vue-style-loader": "^3.1.2",
|
"vue-style-loader": "^3.1.2",
|
||||||
"vue-template-compiler": "^2.5.13",
|
"vue-template-compiler": "^2.5.16",
|
||||||
"webpack": "^2.6.1",
|
"webpack": "^2.6.1",
|
||||||
"webpack-bundle-analyzer": "^2.11.1",
|
"webpack-bundle-analyzer": "^2.13.1",
|
||||||
"webpack-dev-middleware": "^1.12.2",
|
"webpack-dev-middleware": "^1.12.2",
|
||||||
"webpack-hot-middleware": "^2.21.2",
|
"webpack-hot-middleware": "^2.22.2",
|
||||||
"webpack-merge": "^4.1.2"
|
"webpack-merge": "^4.1.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 4.0.0",
|
"node": ">= 4.0.0",
|
||||||
|
39
src/App.vue
39
src/App.vue
@ -1,28 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<nav class="navbar navbar-default" role="navigation">
|
<nav class="navbar fixed-top navbar-dark navbar-expand-lg bg-dark" role="navigation">
|
||||||
<div class="container-fluid">
|
<a class="navbar-brand" href="/">DecAPI Docs</a>
|
||||||
<div class="navbar-header">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#topNavDropdown" aria-controls="topNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<a class="navbar-brand" href="/">DecAPI Docs</a>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</div>
|
</button>
|
||||||
|
|
||||||
<ul class="nav navbar-nav">
|
<div class="collapse navbar-collapse" id="topNavDropdown">
|
||||||
<li v-bind:class="{ active: this.$route.name === 'Home' }"><a href="/"><i class="fa fa-1x fa-home"></i> Home</a></li>
|
<ul class="nav navbar-nav mr-auto">
|
||||||
|
<li class="navbar-item" v-bind:class="{ active: this.$route.name === 'Home' }">
|
||||||
|
<a href="/" class="nav-link"><i class="fas fa-home fa-fw"></i> Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="navbar-item" v-bind:class="{ active: this.$route.name === 'Contact' }">
|
||||||
|
<a href="/contact" class="nav-link"><i class="far fa-envelope fa-fw"></i> Contact</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav justify-content-end">
|
||||||
<li><a href="https://github.com/Decicus/DecAPI-Docs"><i class="fa fa-1x fa-book"></i> DecAPI Docs on GitHub</a></li>
|
<li class="navbar-item">
|
||||||
<li><a href="https://github.com/Decicus/DecAPI"><i class="fa fa-1x fa-github"></i> DecAPI on GitHub</a></li>
|
<a href="https://links.decapi.me/discord" class="nav-link"><i class="fab fa-discord fa-fw"></i> Discord server</a>
|
||||||
|
</li>
|
||||||
|
<li class="navbar-item">
|
||||||
|
<a href="https://github.com/Decicus/DecAPI-Docs" class="nav-link"><i class="fas fa-book fa-fw"></i> DecAPI Docs on GitHub</a>
|
||||||
|
</li>
|
||||||
|
<li class="navbar-item">
|
||||||
|
<a href="https://github.com/Decicus/DecAPI" class="nav-link"><i class="fab fa-github fa-fw"></i> DecAPI on GitHub</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="page-header">
|
|
||||||
<h1>DecAPI Docs</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</div>
|
</div>
|
||||||
|
14
src/components/Contact.vue
Normal file
14
src/components/Contact.vue
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<div class="card">
|
||||||
|
<h5 class="card-header bg-primary text-white"><i class="fas fa-info"></i> Contact information</h5>
|
||||||
|
<div class="card-body">
|
||||||
|
General questions, issues or maybe you need some help? Please <a href="https://links.decapi.me/discord"><i class="fab fa-discord"></i> join the Discord server</a>!
|
||||||
|
<br>
|
||||||
|
General bug or feedback? Please use the <a href="https://github.com/Decicus/DecAPI/issues"><i class="fab fa-github"></i> GitHub issue tracker</a>.
|
||||||
|
<br>
|
||||||
|
Security issue? Please contact me privately via email: <a href="mailto:alex@thomassen.xyz"><i class="fas fa-envelope"></i> alex@thomassen.xyz</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
@ -4,14 +4,14 @@
|
|||||||
Endpoints:
|
Endpoints:
|
||||||
{{ this.$route.name }}
|
{{ this.$route.name }}
|
||||||
|
|
||||||
<div class="dropdown pull-right">
|
<div class="dropdown float-right">
|
||||||
<button class="dropdown-toggle btn btn-info" data-toggle="dropdown" type="button">
|
<button class="dropdown-toggle btn btn-info" data-toggle="dropdown" type="button">
|
||||||
<i class="fa fa-1x fa-cog"></i> Bot example settings <span class="caret"></span>
|
<i class="fa fa-1x fa-cog"></i> Bot example settings <span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li v-for="bot in Object.keys(bots)" :key="bot">
|
<li v-for="(bot) in Object.keys(bots)" :key="bot">
|
||||||
<a v-on:click="bots[bot] = !bots[bot]; updateBotStore()">
|
<a class="dropdown-item botSelection" v-on:click="bots[bot] = !bots[bot]; updateBotStore()">
|
||||||
<input type="checkbox" v-bind:checked="bots[bot]"> {{ botNames[bot] }}
|
<input type="checkbox" v-bind:checked="bots[bot]"> {{ botNames[bot] }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -19,62 +19,68 @@
|
|||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
<div class="modal fade" id="endpoint">
|
<div class="modal fade" id="endpoint">
|
||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<h4 class="modal-title"><a v-bind:href="'?endpoint=' + route">{{ route }}</a></h4>
|
||||||
<h4><a v-bind:href="'?endpoint=' + route">{{ route }}</a></h4>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" aria-label="Close">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<template v-if="e.notes && e.notes.length > 0">
|
<template v-if="e.notes && e.notes.length > 0">
|
||||||
<h4 class="text-muted">Notes:</h4>
|
<h4 class="text-muted">Notes:</h4>
|
||||||
<ul class="list-group text-primary" v-for="note in e.notes" id="notes" :key="note">
|
<ul class="list-group text-primary" v-for="(note, index) in e.notes" id="notes" :key="index">
|
||||||
<li class="list-group-item" v-html="note.replace(/{{baseUrl}}/g, config.baseUrl)"></li>
|
<li class="list-group-item" v-html="note.replace(/{{baseUrl}}/g, config.baseUrl)"></li>
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
<h4 class="text-muted">Standard request:</h4>
|
<h4 class="text-muted">Standard request:</h4>
|
||||||
<p>Please remember that the <code>:</code> in front of each parameter is just a placeholder and should not be included in the request.</p>
|
<p>Please remember that the <code>:</code> in front of each parameter is just a placeholder and should not be included in the request.</p>
|
||||||
<pre><strong class="text-primary">{{ e.method || 'GET' }}</strong> <code>{{ config.baseUrl + route }}</code></pre>
|
<pre><strong class="text-primary">{{ e.method || 'GET' }}</strong> <kbd>{{ config.baseUrl + route }}</kbd></pre>
|
||||||
|
|
||||||
<div id="bots" v-if="e.bots !== false">
|
<div id="bots" v-if="e.bots !== false">
|
||||||
<template v-if="bots.nightbot">
|
<template v-if="bots.nightbot">
|
||||||
<!-- Nightbot -->
|
<!-- Nightbot -->
|
||||||
<strong class="text-primary"><a href="https://beta.nightbot.tv/">Nightbot</a> command:</strong>
|
<strong class="text-primary"><a href="https://beta.nightbot.tv/">Nightbot</a> command:</strong>
|
||||||
<pre><code>$(urlfetch {{ e.url }})</code></pre>
|
<pre><kbd>$(urlfetch {{ e.url }})</kbd></pre>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="bots.ankhbot">
|
<template v-if="bots.ankhbot">
|
||||||
<!-- Ankhbot -->
|
<!-- Ankhbot -->
|
||||||
<strong class="text-primary"><a href="https://streamlabs.com/chatbot">Streamlabs Chatbot (formerly Ankhbot)</a> command:</strong>
|
<strong class="text-primary"><a href="https://streamlabs.com/chatbot">Streamlabs Chatbot</a> command:</strong>
|
||||||
<pre><code>$readapi({{ e.url }})</code></pre>
|
<pre><kbd>$readapi({{ e.url }})</kbd></pre>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="bots.deepbot">
|
<template v-if="bots.deepbot">
|
||||||
<!-- Deepbot -->
|
<!-- Deepbot -->
|
||||||
<strong class="text-primary"><a href="https://deepbot.deep.sg/">Deepbot</a> command:</strong>
|
<strong class="text-primary"><a href="https://deepbot.deep.sg/">Deepbot</a> command:</strong>
|
||||||
<pre><code>@customapi@[{{ e.url }}]</code></pre>
|
<pre><kbd>@customapi@[{{ e.url }}]</kbd></pre>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="bots.phantombot">
|
<template v-if="bots.phantombot">
|
||||||
<!-- PhantomBot -->
|
<!-- PhantomBot -->
|
||||||
<strong class="text-primary"><a href="https://phantombot.tv/">PhantomBot</a> command:</strong>
|
<strong class="text-primary"><a href="https://phantombot.tv/">PhantomBot</a> command:</strong>
|
||||||
<pre><code>(customapi {{ e.url }})</code></pre>
|
<pre><kbd>(customapi {{ e.url }})</kbd></pre>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="bots.ohbot">
|
<template v-if="bots.ohbot">
|
||||||
<!-- Ohbot -->
|
<!-- Ohbot -->
|
||||||
<strong class="text-primary"><a href="https://ohbot.3v.fi/">Ohbot</a> command:</strong>
|
<strong class="text-primary"><a href="https://ohbot.3v.fi/">Ohbot</a> command:</strong>
|
||||||
<pre><code>[customapi {{ e.url }}]</code></pre>
|
<pre><kbd>[customapi {{ e.url }}]</kbd></pre>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
<div id="routes" v-if="e.parameters && e.parameters.length > 0">
|
<div id="routes" v-if="e.parameters && e.parameters.length > 0">
|
||||||
<h4 class="text-muted">Route parameters:</h4>
|
<h4 class="text-muted">Route parameters:</h4>
|
||||||
|
|
||||||
<table class="table table-bordered" id="route-body">
|
<table class="table table-bordered table-striped table-hover" id="route-body">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Parameter name:</th>
|
<th>Parameter name:</th>
|
||||||
@ -84,7 +90,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="p in e.parameters" :key="p">
|
<tr v-for="(p, index) in e.parameters" :key="index">
|
||||||
<th>{{ p.name }}</th>
|
<th>{{ p.name }}</th>
|
||||||
|
|
||||||
<td v-if="Array.isArray(p.description)" v-html="p.description.join('<br>')"></td>
|
<td v-if="Array.isArray(p.description)" v-html="p.description.join('<br>')"></td>
|
||||||
@ -97,6 +103,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
<div id="qs" v-if="e.qs && e.qs.length > 0">
|
<div id="qs" v-if="e.qs && e.qs.length > 0">
|
||||||
<h4 class="text-muted">Query string parameters:</h4>
|
<h4 class="text-muted">Query string parameters:</h4>
|
||||||
|
|
||||||
@ -110,7 +118,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="p in e.qs" :key="p">
|
<tr v-for="(p, index) in e.qs" :key="index">
|
||||||
<th>{{ p.name }}</th>
|
<th>{{ p.name }}</th>
|
||||||
|
|
||||||
<td v-if="Array.isArray(p.description)" v-html="p.description.join('<br>')"></td>
|
<td v-if="Array.isArray(p.description)" v-html="p.description.join('<br>')"></td>
|
||||||
@ -132,7 +140,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="list-group" v-if="endpoints.length > 0">
|
<div class="list-group" v-if="endpoints.length > 0">
|
||||||
<a class="list-group-item" v-for="endpoint in endpoints" v-on:click="openModal(endpoint.route)" :key="endpoint">
|
<a class="list-group-item endpointListItem" v-for="(endpoint, index) in endpoints" v-on:click="openModal(endpoint.route)" :key="index">
|
||||||
{{ basePath }}/{{ endpoint.route }}
|
{{ basePath }}/{{ endpoint.route }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -167,7 +175,7 @@
|
|||||||
basePath: '',
|
basePath: '',
|
||||||
bots,
|
bots,
|
||||||
botNames: {
|
botNames: {
|
||||||
ankhbot: 'Streamlabs Chatbot (formerly Ankhbot)',
|
ankhbot: 'Streamlabs Chatbot',
|
||||||
deepbot: 'Deepbot',
|
deepbot: 'Deepbot',
|
||||||
nightbot: 'Nightbot',
|
nightbot: 'Nightbot',
|
||||||
ohbot: 'Ohbot',
|
ohbot: 'Ohbot',
|
||||||
|
@ -1,25 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<div class="panel panel-primary">
|
<div class="card">
|
||||||
<div class="panel-heading">
|
<h5 class="card-header bg-primary text-white">
|
||||||
<h3 class="panel-title"><i class="fa fa-1x fa-info"></i> General information</h3>
|
<i class="fas fa-info"></i> General information
|
||||||
</div>
|
</h5>
|
||||||
<div class="panel-body">
|
<div class="card-body">
|
||||||
These pages will house the documentation of endpoints under DecAPI.
|
These pages will house the documentation of endpoints under DecAPI.
|
||||||
<br>
|
<br>
|
||||||
This is currently <strong>work in progress</strong> and <strong>incomplete</strong>, which means that some endpoints lack documentation or may not be fully documented.
|
This is currently <strong>work in progress</strong> and <strong>incomplete</strong>, which means that some endpoints lack documentation or may not be fully documented.
|
||||||
<br>
|
<br>
|
||||||
If you would like to contribute, take a look at the <a href="https://github.com/Decicus/DecAPI-Docs"><i class="fa fa-github fa-1x"></i> GitHub repository</a> for this documentation.
|
If you would like to contribute, take a look at the <a href="https://github.com/Decicus/DecAPI-Docs"><i class="fab fa-github"></i> GitHub repository</a> for this documentation.
|
||||||
<br>
|
|
||||||
DecAPI also has a <a href="https://links.decapi.me/discord">Discord server</a> if you're interested in joining.
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel panel-primary" id="default-options">
|
<br>
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title"><a href="#default-options"><i class="fa fa-1x fa-cog"></i> Default options & results</a></h3>
|
<div class="card" id="general-questions">
|
||||||
|
<a href="#general-questions">
|
||||||
|
<h5 class="card-header bg-primary text-white"><i class="fas fa-question"></i> General questions/support</h5>
|
||||||
|
</a>
|
||||||
|
<div class="card-body">
|
||||||
|
If you have any general questions or need some help, DecAPI now has a <a href="https://links.decapi.me/discord">Discord server</a> that you could join.
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
For other ways of contact, please take a look at <a href="/contact">the contact page</a>.
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="card" id="default-options">
|
||||||
|
<a href="#default-options">
|
||||||
|
<h5 class="card-header bg-primary text-white"><i class="fa fa-1x fa-cog"></i> Default options & results</h5>
|
||||||
|
</a>
|
||||||
|
<div class="card-body">
|
||||||
<p>These are options or results that will be the default, <strong>unless the notes about the endpoint mention otherwise</strong>.</p>
|
<p>These are options or results that will be the default, <strong>unless the notes about the endpoint mention otherwise</strong>.</p>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<li class="list-group-item">The base URL for all endpoints is <code>{{ baseUrl }}</code>.</li>
|
<li class="list-group-item">The base URL for all endpoints is <code>{{ baseUrl }}</code>.</li>
|
||||||
@ -34,22 +48,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel panel-primary" id="rate-limits">
|
<br>
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title"><a href="#rate-limits"><i class="fa fa-1x fa-cog"></i> Rate limits</a></h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="card" id="rate-limits">
|
||||||
|
<a href="#rate-limits">
|
||||||
|
<h5 class="card-header bg-primary text-white"><i class="fa fa-1x fa-cog"></i> Rate limits</h5>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
For the <strong>most part</strong> requests to DecAPI are not rate limited. However, there are a few exceptions to prevent abuse of the service.
|
For the <strong>most part</strong> requests to DecAPI are not rate limited. However, there are a few exceptions to prevent abuse of the service.
|
||||||
<br>
|
<br>
|
||||||
If your application requires more requests than what is listed below, I suggest you look into using the API of the service directly instead.
|
If your application requires more requests than what is listed below, I suggest you look into using the API of the service directly instead.
|
||||||
<br>
|
<br>
|
||||||
Rate limits are applied based on the IP address the request originates from.
|
Rate limits are applied based on the IP address the request originates from.
|
||||||
|
|
||||||
<h3>Currently rate limited routes:</h3>
|
<h5>Currently rate limited routes:</h5>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<h4 class="list-group-item-heading"><a href="/twitch"><code>/twitch/*</code> routes:</a></h4>
|
<h5 class="list-group-item-heading"><a href="/twitch"><code>/twitch/*</code> routes:</a></h5>
|
||||||
<p class="list-group-item-text">
|
<p class="list-group-item-text">
|
||||||
Currently rate limited to <strong>100 requests per 60 seconds</strong>.
|
Currently rate limited to <strong>100 requests per 60 seconds</strong>.
|
||||||
<br>
|
<br>
|
||||||
@ -60,19 +76,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel panel-primary" id="nondev">
|
<br>
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title"><a href="#nondev"><i class="fa fa-1x fa-question"></i> Information for non-developers:</a></h3>
|
<div class="card" id="nondev">
|
||||||
</div>
|
<a href="#nondev">
|
||||||
<div class="panel-body">
|
<h5 class="card-header bg-primary text-white"><i class="fa fa-1x fa-question"></i> Information for non-developers:</h5>
|
||||||
|
</a>
|
||||||
|
<div class="card-body">
|
||||||
This page is primarily meant for developers, but some of you might be looking at this to use it with bots or similar (in this case they're often called "custom APIs").
|
This page is primarily meant for developers, but some of you might be looking at this to use it with bots or similar (in this case they're often called "custom APIs").
|
||||||
<br>
|
<br>
|
||||||
In that case you're probably really confused as to how to use this, so this is an attempt to explain a few things for some of you.
|
In that case you're probably really confused as to how to use this, so this is an attempt to explain a few things for some of you.
|
||||||
<br>
|
<br>
|
||||||
If you have any further questions after reading this, then feel free to contact me via the information on my <a href="https://blog.decicus.com/contact/">contact page</a>, and I will attempt to reply to the best of my ability.
|
If you have any further questions after reading this, then feel free to contact me via the information on my <a href="/contact">contact page</a>, and I will attempt to reply to the best of my ability.
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h4 id="nondev-qs"><strong>Query string (aka "QS") parameters:</strong></h4>
|
<h5 id="nondev-qs"><strong>Query string (aka "QS") parameters:</strong></h5>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
QS parameters are <i>normally</i> key/value pairs.
|
QS parameters are <i>normally</i> key/value pairs.
|
||||||
@ -103,7 +121,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4 id="nondev-routes"><strong>Route parameters:</strong></h4>
|
<br>
|
||||||
|
|
||||||
|
<h5 id="nondev-routes"><strong>Route parameters:</strong></h5>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
Route parameters are ordered values.
|
Route parameters are ordered values.
|
||||||
@ -130,7 +150,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4 id="nondev-bots"><strong>Bot usage:</strong></h4>
|
<br>
|
||||||
|
|
||||||
|
<h5 id="nondev-bots"><strong>Bot usage:</strong></h5>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
If you have already looked at some of the API endpoints, you might have noticed that they mention a few bots and how to add the specific endpoint to these bots.
|
If you have already looked at some of the API endpoints, you might have noticed that they mention a few bots and how to add the specific endpoint to these bots.
|
||||||
@ -151,11 +173,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel panel-primary" id="toc" v-if="baseEndpoints.length > 0">
|
<br>
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title"><a href="#toc"><i class="fa fa-1x fa-table"></i> Table of contents:</a></h3>
|
<div class="card" id="toc" v-if="baseEndpoints.length > 0">
|
||||||
</div>
|
<a href="#toc">
|
||||||
<div class="panel-body">
|
<h5 class="card-header bg-primary text-white"><i class="fas fa-table"></i> Table of contents:</h5>
|
||||||
|
</a>
|
||||||
|
<div class="card-body">
|
||||||
<p>
|
<p>
|
||||||
The table of contents will only link you to the specific "categories", and not to any specific endpoints.
|
The table of contents will only link you to the specific "categories", and not to any specific endpoints.
|
||||||
<br>
|
<br>
|
||||||
@ -163,7 +187,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<router-link v-for="base in baseEndpoints" v-bind:to="base.name" v-bind:key="base.name" class="list-group-item">
|
<router-link v-for="base in baseEndpoints" v-bind:to="base.name" v-bind:key="base.name" class="list-group-item">
|
||||||
<i class="fa fa-1x fa-fw" v-bind:class="'fa-' + (base.icon ? base.icon : 'info')"></i> {{ base.title }}
|
<i class="fa-fw" v-bind:class="'fa-' + (base.icon ? base.icon : 'info fas')"></i> {{ base.title }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,6 +3,7 @@ import VueResource from 'vue-resource';
|
|||||||
import Router from 'vue-router';
|
import Router from 'vue-router';
|
||||||
import EndpointList from '@/components/EndpointList';
|
import EndpointList from '@/components/EndpointList';
|
||||||
import Home from '@/components/Home';
|
import Home from '@/components/Home';
|
||||||
|
import Contact from '@/components/Contact';
|
||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
|
|
||||||
Vue.use(Router);
|
Vue.use(Router);
|
||||||
@ -16,6 +17,11 @@ const router = new Router({
|
|||||||
name: 'Home',
|
name: 'Home',
|
||||||
component: Home,
|
component: Home,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/contact',
|
||||||
|
name: 'Contact',
|
||||||
|
component: Contact,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
const yamlPath = '/static/yaml';
|
const yamlPath = '/static/yaml';
|
||||||
|
@ -1,37 +1,37 @@
|
|||||||
- name: askfm
|
- name: askfm
|
||||||
title: "ASKfm"
|
title: "ASKfm"
|
||||||
icon: "question"
|
icon: "question fas"
|
||||||
- name: br
|
- name: br
|
||||||
title: "Battle Royale (Arma 3 Mod)"
|
title: "Battle Royale (Arma 3 Mod)"
|
||||||
icon: "gamepad"
|
icon: "gamepad fas"
|
||||||
- name: bttv
|
- name: bttv
|
||||||
title: "BetterTTV"
|
title: "BetterTTV"
|
||||||
icon: "smile-o"
|
icon: "smile far"
|
||||||
- name: dayz
|
- name: dayz
|
||||||
title: "DayZ"
|
title: "DayZ"
|
||||||
icon: "gamepad"
|
icon: "gamepad fas"
|
||||||
- name: ffz
|
- name: ffz
|
||||||
title: "FrankerFaceZ"
|
title: "FrankerFaceZ"
|
||||||
icon: "smile-o"
|
icon: "smile far"
|
||||||
- name: lever
|
- name: lever
|
||||||
title: "Lever"
|
title: "Lever"
|
||||||
- name: math
|
- name: math
|
||||||
title: "Math"
|
title: "Math"
|
||||||
icon: "calculator"
|
icon: "calculator fas"
|
||||||
- name: misc
|
- name: misc
|
||||||
title: "Miscellaneous"
|
title: "Miscellaneous"
|
||||||
- name: random
|
- name: random
|
||||||
title: "Random"
|
title: "Random"
|
||||||
icon: "random"
|
icon: "random fas"
|
||||||
- name: steam
|
- name: steam
|
||||||
title: "Steam"
|
title: "Steam"
|
||||||
icon: "steam"
|
icon: "steam fab"
|
||||||
- name: twitch
|
- name: twitch
|
||||||
title: "Twitch"
|
title: "Twitch"
|
||||||
icon: "twitch"
|
icon: "twitch fab"
|
||||||
- name: twitter
|
- name: twitter
|
||||||
title: "Twitter"
|
title: "Twitter"
|
||||||
icon: "twitter"
|
icon: "twitter fab"
|
||||||
- name: youtube
|
- name: youtube
|
||||||
title: "YouTube"
|
title: "YouTube"
|
||||||
icon: "youtube"
|
icon: "youtube fab"
|
||||||
|
@ -26,6 +26,7 @@ endpoints:
|
|||||||
notes:
|
notes:
|
||||||
- 'Queries the specified DayZ server and returns a player count in format of: <code>{PLAYERCOUNT}/{MAXPLAYERS}</code>'
|
- 'Queries the specified DayZ server and returns a player count in format of: <code>{PLAYERCOUNT}/{MAXPLAYERS}</code>'
|
||||||
- 'Note: This should also work with other games that use the Source query protocol (such as Miscreated or Counter-Strike: Global Offensive).'
|
- 'Note: This should also work with other games that use the Source query protocol (such as Miscreated or Counter-Strike: Global Offensive).'
|
||||||
|
- 'You may notice that even if the IP and ports are correct, you are still getting an error. This might be because the provider that runs the production environment does not allow me to whitelist big ranges of outgoing ports (thus not being able to query the server). Please <a href="/contact">contact me</a> for any questions.'
|
||||||
- route: "status-report"
|
- route: "status-report"
|
||||||
parameters:
|
parameters:
|
||||||
qs:
|
qs:
|
||||||
|
@ -3,6 +3,7 @@ endpoints:
|
|||||||
- route: ""
|
- route: ""
|
||||||
notes:
|
notes:
|
||||||
- 'Lists the currently available endpoints - <strong>Returns a JSON object</strong>'
|
- 'Lists the currently available endpoints - <strong>Returns a JSON object</strong>'
|
||||||
|
bots: false
|
||||||
- route: "accountage/:user"
|
- route: "accountage/:user"
|
||||||
parameters:
|
parameters:
|
||||||
- name: ":user"
|
- name: ":user"
|
||||||
@ -168,7 +169,7 @@ endpoints:
|
|||||||
description: 'What character(s) should separate each subscriber value from each other. Default: <code>, </code>.'
|
description: 'What character(s) should separate each subscriber value from each other. Default: <code>, </code>.'
|
||||||
notes:
|
notes:
|
||||||
- 'Retrieves the latest subscriber(s) from the channel, based on their OAuth (authentication) token, or by logging in (similar to subcount).'
|
- 'Retrieves the latest subscriber(s) from the channel, based on their OAuth (authentication) token, or by logging in (similar to subcount).'
|
||||||
- 'If you wish to retrieve an OAuth token, you can use <a href="https://decicus.github.io/twitch-oauth-token/#channel_subscriptions">another project of mine</a>.'
|
- 'If you wish to retrieve an OAuth token, you can use <a href="https://token.decicus.com/#channel_subscriptions">another project of mine</a>.'
|
||||||
- 'The <code>:channel</code> parameter is optional if a <code>token</code> is specified.'
|
- 'The <code>:channel</code> parameter is optional if a <code>token</code> is specified.'
|
||||||
- route: "multi/:streams"
|
- route: "multi/:streams"
|
||||||
parameters:
|
parameters:
|
||||||
@ -195,7 +196,7 @@ endpoints:
|
|||||||
description: 'What character(s) should separate each subscriber value from each other. Default: <code>, </code>.'
|
description: 'What character(s) should separate each subscriber value from each other. Default: <code>, </code>.'
|
||||||
notes:
|
notes:
|
||||||
- 'Retrieves a random subscriber from the channel, based on their OAuth (authentication) token, or by logging in (similar to subcount).'
|
- 'Retrieves a random subscriber from the channel, based on their OAuth (authentication) token, or by logging in (similar to subcount).'
|
||||||
- 'If you wish to retrieve an OAuth token, you can use <a href="https://decicus.github.io/twitch-oauth-token/#channel_subscriptions">another project of mine</a>.'
|
- 'If you wish to retrieve an OAuth token, you can use <a href="https://token.decicus.com/#channel_subscriptions">another project of mine</a>.'
|
||||||
- 'The <code>:channel</code> parameter is optional if a <code>token</code> is specified.'
|
- 'The <code>:channel</code> parameter is optional if a <code>token</code> is specified.'
|
||||||
- route: "random_user/:channel"
|
- route: "random_user/:channel"
|
||||||
parameters:
|
parameters:
|
||||||
@ -298,7 +299,6 @@ endpoints:
|
|||||||
description: 'How precise the timestamp should be in terms of days, hours, minutes & seconds - Default: 4.'
|
description: 'How precise the timestamp should be in terms of days, hours, minutes & seconds - Default: 4.'
|
||||||
notes:
|
notes:
|
||||||
- 'Returns how long the specified channel has been live for the current broadcast.'
|
- 'Returns how long the specified channel has been live for the current broadcast.'
|
||||||
- '<strong>Rate-limited:</strong> This is rate-limited to 100 requests per minute.'
|
|
||||||
- route: "viewercount/:channel"
|
- route: "viewercount/:channel"
|
||||||
parameters:
|
parameters:
|
||||||
- name: ":channel"
|
- name: ":channel"
|
||||||
|
Loading…
Reference in New Issue
Block a user