update readme and api docs
This commit is contained in:
@@ -16,16 +16,14 @@
|
||||
<body>
|
||||
<a href="/">Return to enstrayed.com</a>
|
||||
<h1>API Documentation</h1>
|
||||
<p>This page was last updated 2025-12-12.</p>
|
||||
|
||||
<!-- <p>Source Code & Issue Tracker: <a href="https://github.com/enstrayed/enstrayedapi">github.com/enstrayed/enstrayedapi</a></p> -->
|
||||
<p>This page was last updated 2025-12-15.</p>
|
||||
|
||||
<hr>
|
||||
<h2>Attention: This page is overdue for a rewrite and the information currently presented may not be accurate.</h2>
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2>/api/nowplaying</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/main/routes/nowplaying.js">nowplaying.js</a>
|
||||
<a href="https://git.enstrayed.com/enstrayed/enstrayedapi/src/branch/main/routes/nowplaying.js">nowplaying.js</a>
|
||||
<div>
|
||||
<span>GET</span>
|
||||
</div>
|
||||
@@ -35,7 +33,7 @@
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2>/api/nowplayingbeta</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/main/routes/nowplaying.js">nowplaying.js</a>
|
||||
<a href="https://git.enstrayed.com/enstrayed/enstrayedapi/src/branch/main/routes/nowplaying.js">nowplaying.js</a>
|
||||
<div>
|
||||
<span>GET</span>
|
||||
</div>
|
||||
@@ -45,7 +43,7 @@
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2>/api/etyd/*</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/main/routes/etyd.js">etyd.js</a>
|
||||
<a href="https://git.enstrayed.com/enstrayed/enstrayedapi/src/branch/main/routes/etyd.js">etyd.js</a>
|
||||
<div>
|
||||
<span>GET</span>
|
||||
<span>POST</span>
|
||||
@@ -66,7 +64,7 @@
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2>/api/sendemail</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/main/routes/mailjet.js#L3">mailjet.js</a>
|
||||
<a href="https://git.enstrayed.com/enstrayed/enstrayedapi/src/branch/main/routes/email.js">email.js</a>
|
||||
<div>
|
||||
<span>POST</span>
|
||||
</div>
|
||||
@@ -87,7 +85,7 @@
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2>/ip</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/main/routes/ip.js">ip.js</a>
|
||||
<a href="https://git.enstrayed.com/enstrayed/enstrayedapi/src/branch/main/routes/ip.js">ip.js</a>
|
||||
<div><span>GET</span></div>
|
||||
</div>
|
||||
|
||||
@@ -95,7 +93,7 @@
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2>/api/headers</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/main/routes/ip.js">ip.js</a>
|
||||
<a href="https://git.enstrayed.com/enstrayed/enstrayedapi/src/branch/main/routes/ip.js">ip.js</a>
|
||||
<div><span>GET</span></div>
|
||||
</div>
|
||||
|
||||
@@ -103,52 +101,17 @@
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2>/api/auth/whoami</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/new-db/routes/auth.js">auth.js:6</a>
|
||||
<a href="https://git.enstrayed.com/enstrayed/enstrayedapi/src/branch/main/routes/auth.js">auth.js</a>
|
||||
<div><span>GET</span></div>
|
||||
</div>
|
||||
<p>Returns JSON with the username of the token owner as well as what scopes the token has access to.</p>
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2 id="jumplink_authlogin">/api/auth/login</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/new-db/routes/auth.js">auth.js:23</a>
|
||||
<div><span>GET</span></div>
|
||||
</div>
|
||||
<p>Redirects the user to ECLS to login. The <code>state</code> parameter can be used to specify how the login flow will behave. The accepted "states" are:</p>
|
||||
<ul>
|
||||
<li><code>redirect</code> - Redirects the user to a page after logging in. This paramter requires the <code>destination</code> paramter to also be set with the URL the user will be redirected to.</li>
|
||||
<li><code>display</code> - Displays the generated token to the user after login. Currently, this still writes the new token to the <code>APIToken</code> cookie, though this is planned to change.</li>
|
||||
<li><code>close</code> - This will close the page after logging in. This requires the page to be opened with JavaScript otherwise it will not automatically close.</li>
|
||||
</ul>
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2>/api/auth/logout</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/new-db/routes/auth.js">auth.js:40</a>
|
||||
<a href="https://git.enstrayed.com/enstrayed/enstrayedapi/src/branch/main/routes/auth.js">auth.js</a>
|
||||
<div><span>GET</span></div>
|
||||
</div>
|
||||
<p>Invalidates the token used to access the endpoint.</p>
|
||||
|
||||
<!-- <div class="inlineheader">
|
||||
<h2>/api/auth/callback</h2>
|
||||
<a href="https://github.com/Enstrayed/enstrayedapi/blob/new-db/routes/auth.js">auth.js:57</a>
|
||||
<div><span>GET</span></div>
|
||||
</div>
|
||||
<p><b>Internal Use Only. </b>This is the endpoint used by ECLS to finish the login flow. It will write the newly created token to the <code>APIToken</code> cookie as well as performing the action set by <code>state</code>, see <a href="#jumplink_authlogin">login endpoint</a>.</p>
|
||||
|
||||
<div class="inlineheader">
|
||||
<h2>/api/helpdesk/forms/*</h2>
|
||||
<a>helpdesk.js:15</a>
|
||||
<div><span>GET</span></div>
|
||||
</div>
|
||||
|
||||
<p><b>Internal Use Only. </b>Serves all files in the <code>website/helpdesk/forms</code> directory for use in the Helpdesk frontend.</p> -->
|
||||
|
||||
<!-- <div class="inlineheader">
|
||||
<h2>/dynamic/icon/*</h2>
|
||||
<a>dynamic.js:3</a>
|
||||
<div><span>GET</span></div>
|
||||
</div>
|
||||
|
||||
<p><b>Internal Use Only. </b>Returns the requested icon (stored in <code>website/dynamic/icons</code>) in any color (hex) specified in the URL. Example: <code>/dynamic/icon/github/00ff00</code> will return the GitHub logo in neon green.</p> -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user