Refactor Truncgil Finance documentation and endpoints

- Updated the introduction in `intro.md` to provide a clearer overview of the application and its features.
- Added new API endpoints in `00.yaml` for retrieving today's currency rates and specific currency rates by name, enhancing the API's functionality.
- Removed outdated documentation files including `collection.json`, `index.html`, `openapi.yaml`, and associated CSS and JS files to streamline the project structure.
- Updated the `.filehashes` to reflect changes in the documentation files.

This commit improves the clarity and usability of the Truncgil Finance API documentation and expands its capabilities.
This commit is contained in:
Ümit Tunç
2025-01-17 21:46:08 +03:00
parent de00f293c9
commit 48da9891dc
12 changed files with 187 additions and 4051 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE. # GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
# Scribe uses this file to know when you change something manually in your docs. # Scribe uses this file to know when you change something manually in your docs.
.scribe/intro.md=36e08690cc623bbddd8746db5fae918f .scribe/intro.md=5ba4520f0a0f744a7aceda778b683bb0
.scribe/auth.md=9bee2b1ef8a238b2e58613fa636d5f39 .scribe/auth.md=9bee2b1ef8a238b2e58613fa636d5f39
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+8 -2
View File
@@ -1,6 +1,6 @@
# Truncgil Finance # Introduction
Daily Financial Data: Provides access to real-time financial data updated through the Truncgil API, allowing users to track the daily performance of currency exchange rates and cryptocurrencies.
<aside> <aside>
<strong>Base URL</strong>: <code>http://localhost:8000</code> <strong>Base URL</strong>: <code>http://localhost:8000</code>
@@ -11,3 +11,9 @@ This documentation aims to provide all the information you need to work with our
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile). <aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside> You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Easy to Use: With a clean and organized user interface, users can quickly access financial data and easily select their desired asset class.
Developability: The application has a modular and extensible structure, providing developers with a flexible ground to add new features.
"Truncgil Finance" is an ideal solution for developers and finance professionals who want to quickly adapt to dynamic changes in the financial world.
File diff suppressed because one or more lines are too long
-393
View File
@@ -1,393 +0,0 @@
/* Copied from https://github.com/slatedocs/slate/blob/c4b4c0b8f83e891ca9fab6bbe9a1a88d5fe41292/stylesheets/print.css and unminified */
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%
}
body {
margin: 0
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block
}
audio,
canvas,
progress,
video {
display: inline-block;
vertical-align: baseline
}
audio:not([controls]) {
display: none;
height: 0
}
[hidden],
template {
display: none
}
a {
background-color: transparent
}
a:active,
a:hover {
outline: 0
}
abbr[title] {
border-bottom: 1px dotted
}
b,
strong {
font-weight: bold
}
dfn {
font-style: italic
}
h1 {
font-size: 2em;
margin: 0.67em 0
}
mark {
background: #ff0;
color: #000
}
small {
font-size: 80%
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline
}
sup {
top: -0.5em
}
sub {
bottom: -0.25em
}
img {
border: 0
}
svg:not(:root) {
overflow: hidden
}
figure {
margin: 1em 40px
}
hr {
box-sizing: content-box;
height: 0
}
pre {
overflow: auto
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em
}
button,
input,
optgroup,
select,
textarea {
color: inherit;
font: inherit;
margin: 0
}
button {
overflow: visible
}
button,
select {
text-transform: none
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer
}
button[disabled],
html input[disabled] {
cursor: default
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0
}
input {
line-height: normal
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto
}
input[type="search"] {
-webkit-appearance: textfield;
box-sizing: content-box
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em
}
legend {
border: 0;
padding: 0
}
textarea {
overflow: auto
}
optgroup {
font-weight: bold
}
table {
border-collapse: collapse;
border-spacing: 0
}
td,
th {
padding: 0
}
.content h1,
.content h2,
.content h3,
.content h4,
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 14px
}
.content h1,
.content h2,
.content h3,
.content h4 {
font-weight: bold
}
.content pre,
.content code {
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;
font-size: 12px;
line-height: 1.5
}
.content pre,
.content code {
word-break: break-all;
-webkit-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto
}
@font-face {
font-family: 'slate';
src: url(../fonts/slate.eot?-syv14m);
src: url(../fonts/slate.eot?#iefix-syv14m) format("embedded-opentype"), url(../fonts/slate.woff2?-syv14m) format("woff2"), url(../fonts/slate.woff?-syv14m) format("woff"), url(../fonts/slate.ttf?-syv14m) format("truetype"), url(../fonts/slate.svg?-syv14m#slate) format("svg");
font-weight: normal;
font-style: normal
}
.content aside.warning:before,
.content aside.notice:before,
.content aside.success:before {
font-family: 'slate';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1
}
.content aside.warning:before {
content: "\e600"
}
.content aside.notice:before {
content: "\e602"
}
.content aside.success:before {
content: "\e606"
}
.tocify,
.toc-footer,
.lang-selector,
.search,
#nav-button {
display: none
}
.tocify-wrapper>img {
margin: 0 auto;
display: block
}
.content {
font-size: 12px
}
.content pre,
.content code {
border: 1px solid #999;
border-radius: 5px;
font-size: 0.8em
}
.content pre code {
border: 0
}
.content pre {
padding: 1.3em
}
.content code {
padding: 0.2em
}
.content table {
border: 1px solid #999
}
.content table tr {
border-bottom: 1px solid #999
}
.content table td,
.content table th {
padding: 0.7em
}
.content p {
line-height: 1.5
}
.content a {
text-decoration: none;
color: #000
}
.content h1 {
font-size: 2.5em;
padding-top: 0.5em;
padding-bottom: 0.5em;
margin-top: 1em;
margin-bottom: 21px;
border: 2px solid #ccc;
border-width: 2px 0;
text-align: center
}
.content h2 {
font-size: 1.8em;
margin-top: 2em;
border-top: 2px solid #ccc;
padding-top: 0.8em
}
.content h1+h2,
.content h1+div+h2 {
border-top: none;
padding-top: 0;
margin-top: 0
}
.content h3,
.content h4 {
font-size: 0.8em;
margin-top: 1.5em;
margin-bottom: 0.8em;
text-transform: uppercase
}
.content h5,
.content h6 {
text-transform: uppercase
}
.content aside {
padding: 1em;
border: 1px solid #ccc;
border-radius: 5px;
margin-top: 1.5em;
margin-bottom: 1.5em;
line-height: 1.6
}
.content aside:before {
vertical-align: middle;
padding-right: 0.5em;
font-size: 14px
}
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

-656
View File
@@ -1,656 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Truncgil Finance Documentation</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../docs/css/theme-default.style.css" media="screen">
<link rel="stylesheet" href="../docs/css/theme-default.print.css" media="print">
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script>
<link rel="stylesheet"
href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css">
<script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script>
<style id="language-style">
/* starts out as display none and is replaced with js later */
body .content .bash-example code { display: none; }
body .content .javascript-example code { display: none; }
</style>
<script>
var tryItOutBaseUrl = "http://localhost:8000";
var useCsrf = Boolean();
var csrfUrl = "/sanctum/csrf-cookie";
</script>
<script src="../docs/js/tryitout-4.39.0.js"></script>
<script src="../docs/js/theme-default-4.39.0.js"></script>
</head>
<body data-languages="[&quot;bash&quot;,&quot;javascript&quot;]">
<a href="#" id="nav-button">
<span>
MENU
<img src="../docs/images/navbar.png" alt="navbar-image"/>
</span>
</a>
<div class="tocify-wrapper">
<div class="lang-selector">
<button type="button" class="lang-button" data-language-name="bash">bash</button>
<button type="button" class="lang-button" data-language-name="javascript">javascript</button>
</div>
<div class="search">
<input type="text" class="search" id="input-search" placeholder="Search">
</div>
<div id="toc">
<ul id="tocify-header-truncgil-finance" class="tocify-header">
<li class="tocify-item level-1" data-unique="truncgil-finance">
<a href="#truncgil-finance">Truncgil Finance</a>
</li>
</ul>
<ul id="tocify-header-authenticating-requests" class="tocify-header">
<li class="tocify-item level-1" data-unique="authenticating-requests">
<a href="#authenticating-requests">Authenticating requests</a>
</li>
</ul>
<ul id="tocify-header-endpoints" class="tocify-header">
<li class="tocify-item level-1" data-unique="endpoints">
<a href="#endpoints">Endpoints</a>
</li>
<ul id="tocify-subheader-endpoints" class="tocify-subheader">
<li class="tocify-item level-2" data-unique="endpoints-GETapi-currency-rates">
<a href="#endpoints-GETapi-currency-rates">GET api/currency-rates</a>
</li>
</ul>
</ul>
</div>
<ul class="toc-footer" id="toc-footer">
<li style="padding-bottom: 5px;"><a href="../docs/collection.json">View Postman collection</a></li>
<li style="padding-bottom: 5px;"><a href="../docs/openapi.yaml">View OpenAPI spec</a></li>
<li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li>
</ul>
<ul class="toc-footer" id="last-updated">
<li>Last updated: January 17, 2025</li>
</ul>
</div>
<div class="page-wrapper">
<div class="dark-box"></div>
<div class="content">
<h1 id="truncgil-finance">Truncgil Finance</h1>
<aside>
<strong>Base URL</strong>: <code>http://localhost:8000</code>
</aside>
<p>This documentation aims to provide all the information you need to work with our API.</p>
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
<h1 id="authenticating-requests">Authenticating requests</h1>
<p>This API is not authenticated.</p>
<h1 id="endpoints">Endpoints</h1>
<h2 id="endpoints-GETapi-currency-rates">GET api/currency-rates</h2>
<p>
</p>
<span id="example-requests-GETapi-currency-rates">
<blockquote>Example request:</blockquote>
<div class="bash-example">
<pre><code class="language-bash">curl --request GET \
--get "http://localhost:8000/api/currency-rates" \
--header "Content-Type: application/json" \
--header "Accept: application/json"</code></pre></div>
<div class="javascript-example">
<pre><code class="language-javascript">const url = new URL(
"http://localhost:8000/api/currency-rates"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response =&gt; response.json());</code></pre></div>
</span>
<span id="example-responses-GETapi-currency-rates">
<blockquote>
<p>Example response (200):</p>
</blockquote>
<details class="annotation">
<summary style="cursor: pointer;">
<small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small>
</summary>
<pre><code class="language-http">cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
</code></pre></details> <pre>
<code class="language-json" style="max-height: 300px;">{
&quot;Update_Date&quot;: &quot;2025-01-17 18:33:23&quot;,
&quot;gram-altin&quot;: {
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Change&quot;: &quot;0.24&quot;
},
&quot;USD&quot;: {
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Change&quot;: &quot;0.39&quot;,
&quot;Buying&quot;: &quot;35.5568&quot;,
&quot;Selling&quot;: &quot;35.5729&quot;
},
&quot;EUR&quot;: {
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Change&quot;: &quot;-0.10&quot;,
&quot;Buying&quot;: &quot;36.5659&quot;,
&quot;Selling&quot;: &quot;36.5827&quot;
},
&quot;GBP&quot;: {
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Change&quot;: &quot;-0.26&quot;,
&quot;Buying&quot;: &quot;43.2899&quot;,
&quot;Selling&quot;: &quot;43.3139&quot;
},
&quot;XU100&quot;: {
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Change&quot;: &quot;1.13&quot;
},
&quot;bitcoin&quot;: {
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Change&quot;: &quot;5.18&quot;
},
&quot;gumus&quot;: {
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Change&quot;: &quot;-1.15&quot;
},
&quot;BRENT&quot;: {
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Change&quot;: &quot;-0.40&quot;
},
&quot;CHF&quot;: {
&quot;Buying&quot;: &quot;38.8684&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;38.8987&quot;,
&quot;Change&quot;: &quot;0.00&quot;
},
&quot;CAD&quot;: {
&quot;Buying&quot;: &quot;24.6017&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;24.6179&quot;,
&quot;Change&quot;: &quot;0.01&quot;
},
&quot;RUB&quot;: {
&quot;Buying&quot;: &quot;0.3469&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.3471&quot;,
&quot;Change&quot;: &quot;1.49&quot;
},
&quot;AED&quot;: {
&quot;Buying&quot;: &quot;9.6803&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;9.6855&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;AUD&quot;: {
&quot;Buying&quot;: &quot;22.0523&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;22.0694&quot;,
&quot;Change&quot;: &quot;0.29&quot;
},
&quot;DKK&quot;: {
&quot;Buying&quot;: &quot;4.9006&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;4.9039&quot;,
&quot;Change&quot;: &quot;0.23&quot;
},
&quot;SEK&quot;: {
&quot;Buying&quot;: &quot;3.1793&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;3.1830&quot;,
&quot;Change&quot;: &quot;0.13&quot;
},
&quot;NOK&quot;: {
&quot;Buying&quot;: &quot;3.1085&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;3.1113&quot;,
&quot;Change&quot;: &quot;-0.25&quot;
},
&quot;JPY&quot;: {
&quot;Buying&quot;: 0.2275,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: 0.2279,
&quot;Change&quot;: -0.005699999999999999
},
&quot;KWD&quot;: {
&quot;Buying&quot;: &quot;115.0539&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;115.4686&quot;,
&quot;Change&quot;: &quot;0.30&quot;
},
&quot;ZAR&quot;: {
&quot;Buying&quot;: &quot;1.8980&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;1.8998&quot;,
&quot;Change&quot;: &quot;0.94&quot;
},
&quot;BHD&quot;: {
&quot;Buying&quot;: &quot;94.3401&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;94.3829&quot;,
&quot;Change&quot;: &quot;0.40&quot;
},
&quot;LYD&quot;: {
&quot;Buying&quot;: &quot;7.1896&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;7.1928&quot;,
&quot;Change&quot;: &quot;-1.15&quot;
},
&quot;SAR&quot;: {
&quot;Buying&quot;: &quot;9.4641&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;9.4934&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;IQD&quot;: {
&quot;Buying&quot;: &quot;0.0271&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0272&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;ILS&quot;: {
&quot;Buying&quot;: &quot;9.9769&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;9.9815&quot;,
&quot;Change&quot;: &quot;1.93&quot;
},
&quot;IRR&quot;: {
&quot;Buying&quot;: &quot;0.0008&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0008&quot;,
&quot;Change&quot;: &quot;0.00&quot;
},
&quot;INR&quot;: {
&quot;Buying&quot;: &quot;0.4106&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.4108&quot;,
&quot;Change&quot;: &quot;0.41&quot;
},
&quot;MXN&quot;: {
&quot;Buying&quot;: &quot;1.7147&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;1.7154&quot;,
&quot;Change&quot;: &quot;0.90&quot;
},
&quot;HUF&quot;: {
&quot;Buying&quot;: &quot;0.0886&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0886&quot;,
&quot;Change&quot;: &quot;0.21&quot;
},
&quot;NZD&quot;: {
&quot;Buying&quot;: &quot;19.8808&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;19.8898&quot;,
&quot;Change&quot;: &quot;0.13&quot;
},
&quot;BRL&quot;: {
&quot;Buying&quot;: &quot;5.8608&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;5.8634&quot;,
&quot;Change&quot;: &quot;0.19&quot;
},
&quot;IDR&quot;: {
&quot;Buying&quot;: &quot;0.0022&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0022&quot;,
&quot;Change&quot;: &quot;0.42&quot;
},
&quot;CZK&quot;: {
&quot;Buying&quot;: &quot;1.4472&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;1.4479&quot;,
&quot;Change&quot;: &quot;0.33&quot;
},
&quot;PLN&quot;: {
&quot;Buying&quot;: &quot;8.5816&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;8.5854&quot;,
&quot;Change&quot;: &quot;0.35&quot;
},
&quot;RON&quot;: {
&quot;Buying&quot;: &quot;7.3452&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;7.3548&quot;,
&quot;Change&quot;: &quot;0.22&quot;
},
&quot;CNY&quot;: {
&quot;Buying&quot;: &quot;4.8533&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;4.8568&quot;,
&quot;Change&quot;: &quot;0.49&quot;
},
&quot;ARS&quot;: {
&quot;Buying&quot;: &quot;0.0341&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0341&quot;,
&quot;Change&quot;: &quot;0.34&quot;
},
&quot;ALL&quot;: {
&quot;Buying&quot;: &quot;0.3728&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.3730&quot;,
&quot;Change&quot;: &quot;0.47&quot;
},
&quot;AZN&quot;: {
&quot;Buying&quot;: &quot;20.9158&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;20.9252&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;BAM&quot;: {
&quot;Buying&quot;: &quot;18.7299&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;18.7384&quot;,
&quot;Change&quot;: &quot;-6.31&quot;
},
&quot;CLP&quot;: {
&quot;Buying&quot;: &quot;0.0353&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0353&quot;,
&quot;Change&quot;: &quot;0.95&quot;
},
&quot;COP&quot;: {
&quot;Buying&quot;: &quot;0.0082&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0082&quot;,
&quot;Change&quot;: &quot;0.47&quot;
},
&quot;CRC&quot;: {
&quot;Buying&quot;: &quot;0.0709&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0709&quot;,
&quot;Change&quot;: &quot;0.55&quot;
},
&quot;DZD&quot;: {
&quot;Buying&quot;: &quot;0.2616&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.2617&quot;,
&quot;Change&quot;: &quot;0.60&quot;
},
&quot;EGP&quot;: {
&quot;Buying&quot;: &quot;0.7054&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.7058&quot;,
&quot;Change&quot;: &quot;0.38&quot;
},
&quot;HKD&quot;: {
&quot;Buying&quot;: &quot;4.5675&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;4.5695&quot;,
&quot;Change&quot;: &quot;0.42&quot;
},
&quot;ISK&quot;: {
&quot;Buying&quot;: &quot;0.2513&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.2515&quot;,
&quot;Change&quot;: &quot;-0.04&quot;
},
&quot;JOD&quot;: {
&quot;Buying&quot;: &quot;50.1436&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;50.1663&quot;,
&quot;Change&quot;: &quot;0.42&quot;
},
&quot;KRW&quot;: {
&quot;Buying&quot;: &quot;0.0244&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0244&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;KZT&quot;: {
&quot;Buying&quot;: &quot;0.0670&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0670&quot;,
&quot;Change&quot;: &quot;0.35&quot;
},
&quot;LBP&quot;: {
&quot;Buying&quot;: &quot;0.0004&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0004&quot;,
&quot;Change&quot;: &quot;0.44&quot;
},
&quot;LKR&quot;: {
&quot;Buying&quot;: &quot;0.1199&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.1200&quot;,
&quot;Change&quot;: &quot;0.38&quot;
},
&quot;MAD&quot;: {
&quot;Buying&quot;: &quot;3.5377&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;3.5393&quot;,
&quot;Change&quot;: &quot;0.37&quot;
},
&quot;MDL&quot;: {
&quot;Buying&quot;: &quot;1.8828&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;1.8837&quot;,
&quot;Change&quot;: &quot;-0.21&quot;
},
&quot;MKD&quot;: {
&quot;Buying&quot;: &quot;0.5944&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.5947&quot;,
&quot;Change&quot;: &quot;0.27&quot;
},
&quot;MYR&quot;: {
&quot;Buying&quot;: &quot;7.8910&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;7.8946&quot;,
&quot;Change&quot;: &quot;0.31&quot;
},
&quot;OMR&quot;: {
&quot;Buying&quot;: &quot;92.3577&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;92.3995&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;PEN&quot;: {
&quot;Buying&quot;: &quot;9.4641&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;9.4684&quot;,
&quot;Change&quot;: &quot;0.41&quot;
},
&quot;PHP&quot;: {
&quot;Buying&quot;: &quot;0.6083&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.6086&quot;,
&quot;Change&quot;: &quot;0.63&quot;
},
&quot;PKR&quot;: {
&quot;Buying&quot;: &quot;0.1274&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.1277&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;QAR&quot;: {
&quot;Buying&quot;: &quot;9.7614&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;9.7771&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;RSD&quot;: {
&quot;Buying&quot;: &quot;0.3119&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.3128&quot;,
&quot;Change&quot;: &quot;-0.06&quot;
},
&quot;SGD&quot;: {
&quot;Buying&quot;: &quot;25.9937&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;26.0055&quot;,
&quot;Change&quot;: &quot;0.31&quot;
},
&quot;SYP&quot;: {
&quot;Buying&quot;: &quot;0.0027&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.0027&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;THB&quot;: {
&quot;Buying&quot;: &quot;1.0319&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;1.0323&quot;,
&quot;Change&quot;: &quot;0.72&quot;
},
&quot;TWD&quot;: {
&quot;Buying&quot;: &quot;1.0808&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;1.0812&quot;,
&quot;Change&quot;: &quot;0.51&quot;
},
&quot;UAH&quot;: {
&quot;Buying&quot;: &quot;0.8428&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.8432&quot;,
&quot;Change&quot;: &quot;0.23&quot;
},
&quot;UYU&quot;: {
&quot;Buying&quot;: &quot;0.8068&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;0.8072&quot;,
&quot;Change&quot;: &quot;0.23&quot;
},
&quot;GEL&quot;: {
&quot;Buying&quot;: &quot;12.5200&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;12.5257&quot;,
&quot;Change&quot;: &quot;-3.50&quot;
},
&quot;TND&quot;: {
&quot;Buying&quot;: &quot;11.0700&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;11.0750&quot;,
&quot;Change&quot;: &quot;0.39&quot;
},
&quot;BGN&quot;: {
&quot;Buying&quot;: &quot;18.6226&quot;,
&quot;Type&quot;: &quot;Currency&quot;,
&quot;Selling&quot;: &quot;18.7779&quot;,
&quot;Change&quot;: &quot;-0.10&quot;
}
}</code>
</pre>
</span>
<span id="execution-results-GETapi-currency-rates" hidden>
<blockquote>Received response<span
id="execution-response-status-GETapi-currency-rates"></span>:
</blockquote>
<pre class="json"><code id="execution-response-content-GETapi-currency-rates"
data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre>
</span>
<span id="execution-error-GETapi-currency-rates" hidden>
<blockquote>Request failed with error:</blockquote>
<pre><code id="execution-error-message-GETapi-currency-rates">
Tip: Check that you&#039;re properly connected to the network.
If you&#039;re a maintainer of ths API, verify that your API is running and you&#039;ve enabled CORS.
You can check the Dev Tools console for debugging information.</code></pre>
</span>
<form id="form-GETapi-currency-rates" data-method="GET"
data-path="api/currency-rates"
data-authed="0"
data-hasfiles="0"
data-isarraybody="0"
autocomplete="off"
onsubmit="event.preventDefault(); executeTryOut('GETapi-currency-rates', this);">
<h3>
Request&nbsp;&nbsp;&nbsp;
<button type="button"
style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-tryout-GETapi-currency-rates"
onclick="tryItOut('GETapi-currency-rates');">Try it out ⚡
</button>
<button type="button"
style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-canceltryout-GETapi-currency-rates"
onclick="cancelTryOut('GETapi-currency-rates');" hidden>Cancel 🛑
</button>&nbsp;&nbsp;
<button type="submit"
style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;"
id="btn-executetryout-GETapi-currency-rates"
data-initial-text="Send Request 💥"
data-loading-text="⏱ Sending..."
hidden>Send Request 💥
</button>
</h3>
<p>
<small class="badge badge-green">GET</small>
<b><code>api/currency-rates</code></b>
</p>
<h4 class="fancy-heading-panel"><b>Headers</b></h4>
<div style="padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>Content-Type</code></b>&nbsp;&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Content-Type" data-endpoint="GETapi-currency-rates"
value="application/json"
data-component="header">
<br>
<p>Example: <code>application/json</code></p>
</div>
<div style="padding-left: 28px; clear: unset;">
<b style="line-height: 2;"><code>Accept</code></b>&nbsp;&nbsp;
&nbsp;
&nbsp;
<input type="text" style="display: none"
name="Accept" data-endpoint="GETapi-currency-rates"
value="application/json"
data-component="header">
<br>
<p>Example: <code>application/json</code></p>
</div>
</form>
</div>
<div class="dark-box">
<div class="lang-selector">
<button type="button" class="lang-button" data-language-name="bash">bash</button>
<button type="button" class="lang-button" data-language-name="javascript">javascript</button>
</div>
</div>
</div>
</body>
</html>
-149
View File
@@ -1,149 +0,0 @@
document.addEventListener('DOMContentLoaded', function() {
const updateHash = function (id) {
window.location.hash = `#${id}`;
};
const navButton = document.getElementById('nav-button');
const menuWrapper = document.querySelector('.tocify-wrapper');
function toggleSidebar(event) {
event.preventDefault();
if (menuWrapper) {
menuWrapper.classList.toggle('open');
navButton.classList.toggle('open');
}
}
function closeSidebar() {
if (menuWrapper) {
menuWrapper.classList.remove('open');
navButton.classList.remove('open');
}
}
navButton.addEventListener('click', toggleSidebar);
window.hljs.highlightAll();
const wrapper = document.getElementById('toc');
// https://jets.js.org/
window.jets = new window.Jets({
// *OR - Selects elements whose values contains at least one part of search substring
searchSelector: '*OR',
searchTag: '#input-search',
contentTag: '#toc li',
didSearch: function(term) {
wrapper.classList.toggle('jets-searching', String(term).length > 0)
},
// map these accent keys to plain values
diacriticsMap: {
a: 'ÀÁÂÃÄÅàáâãäåĀāąĄ',
c: 'ÇçćĆčČ',
d: 'đĐďĎ',
e: 'ÈÉÊËèéêëěĚĒēęĘ',
i: 'ÌÍÎÏìíîïĪī',
l: 'łŁ',
n: 'ÑñňŇńŃ',
o: 'ÒÓÔÕÕÖØòóôõöøŌō',
r: 'řŘ',
s: 'ŠšśŚ',
t: 'ťŤ',
u: 'ÙÚÛÜùúûüůŮŪū',
y: 'ŸÿýÝ',
z: 'ŽžżŻźŹ'
}
});
function hashChange() {
const currentItems = document.querySelectorAll('.tocify-subheader.visible, .tocify-item.tocify-focus');
Array.from(currentItems).forEach((elem) => {
elem.classList.remove('visible', 'tocify-focus');
});
const currentTag = document.querySelector(`a[href="${window.location.hash}"]`);
if (currentTag) {
const parent = currentTag.closest('.tocify-subheader');
if (parent) {
parent.classList.add('visible');
}
const siblings = currentTag.closest('.tocify-header');
if (siblings) {
Array.from(siblings.querySelectorAll('.tocify-subheader')).forEach((elem) => {
elem.classList.add('visible');
});
}
currentTag.parentElement.classList.add('tocify-focus');
// wait for dom changes to be done
setTimeout(() => {
currentTag.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
// only close the sidebar on level-2 events
if (currentTag.parentElement.classList.contains('level-2')) {
closeSidebar();
}
}, 1500);
}
}
let languages = JSON.parse(document.body.getAttribute('data-languages'));
// Support a key => value object where the key is the name, or an array of strings where the value is the name
if (!Array.isArray(languages)) {
languages = Object.values(languages);
}
// if there is no language use the first one
const currentLanguage = window.localStorage.getItem('language') || languages[0];
const languageStyle = document.getElementById('language-style');
const langSelector = document.querySelectorAll('.lang-selector button.lang-button');
function setActiveLanguage(newLanguage) {
window.localStorage.setItem('language', newLanguage);
if (!languageStyle) {
return;
}
const newStyle = languages.map((language) => {
return language === newLanguage
// the current one should be visible
? `body .content .${language}-example pre { display: block; }`
// the inactive one should be hidden
: `body .content .${language}-example pre { display: none; }`;
}).join(`\n`);
Array.from(langSelector).forEach((elem) => {
elem.classList.toggle('active', elem.getAttribute('data-language-name') === newLanguage);
});
const activeHash = window.location.hash.slice(1);
languageStyle.innerHTML = newStyle;
setTimeout(() => {
updateHash(activeHash);
}, 200);
}
setActiveLanguage(currentLanguage);
Array.from(langSelector).forEach((elem) => {
elem.addEventListener('click', () => {
const newLanguage = elem.getAttribute('data-language-name');
setActiveLanguage(newLanguage);
});
});
window.addEventListener('hashchange', hashChange, false);
const divs = document.querySelectorAll('.content h1[id], .content h2[id]');
document.addEventListener('scroll', () => {
divs.forEach(item => {
const rect = item.getBoundingClientRect();
if (rect.top > 0 && rect.top < 150) {
const location = window.location.toString().split('#')[0];
history.replaceState(null, null, location + '#' + item.id);
hashChange();
}
});
});
hashChange();
});
-289
View File
@@ -1,289 +0,0 @@
window.abortControllers = {};
function cacheAuthValue() {
// Whenever the auth header is set for one endpoint, cache it for the others
window.lastAuthValue = '';
let authInputs = document.querySelectorAll(`.auth-value`)
authInputs.forEach(el => {
el.addEventListener('input', (event) => {
window.lastAuthValue = event.target.value;
authInputs.forEach(otherInput => {
if (otherInput === el) return;
// Don't block the main thread
setTimeout(() => {
otherInput.value = window.lastAuthValue;
}, 0);
});
});
});
}
window.addEventListener('DOMContentLoaded', cacheAuthValue);
function getCookie(name) {
if (!document.cookie) {
return null;
}
const cookies = document.cookie.split(';')
.map(c => c.trim())
.filter(c => c.startsWith(name + '='));
if (cookies.length === 0) {
return null;
}
return decodeURIComponent(cookies[0].split('=')[1]);
}
function tryItOut(endpointId) {
document.querySelector(`#btn-tryout-${endpointId}`).hidden = true;
document.querySelector(`#btn-canceltryout-${endpointId}`).hidden = false;
const executeBtn = document.querySelector(`#btn-executetryout-${endpointId}`).hidden = false;
executeBtn.disabled = false;
// Show all input fields
document.querySelectorAll(`input[data-endpoint=${endpointId}],label[data-endpoint=${endpointId}]`)
.forEach(el => el.style.display = 'block');
if (document.querySelector(`#form-${endpointId}`).dataset.authed === "1") {
const authElement = document.querySelector(`#auth-${endpointId}`);
authElement && (authElement.hidden = false);
}
// Expand all nested fields
document.querySelectorAll(`#form-${endpointId} details`)
.forEach(el => el.open = true);
}
function cancelTryOut(endpointId) {
if (window.abortControllers[endpointId]) {
window.abortControllers[endpointId].abort();
delete window.abortControllers[endpointId];
}
document.querySelector(`#btn-tryout-${endpointId}`).hidden = false;
const executeBtn = document.querySelector(`#btn-executetryout-${endpointId}`);
executeBtn.hidden = true;
executeBtn.textContent = executeBtn.dataset.initialText;
document.querySelector(`#btn-canceltryout-${endpointId}`).hidden = true;
// Hide inputs
document.querySelectorAll(`input[data-endpoint=${endpointId}],label[data-endpoint=${endpointId}]`)
.forEach(el => el.style.display = 'none');
document.querySelectorAll(`#form-${endpointId} details`)
.forEach(el => el.open = false);
const authElement = document.querySelector(`#auth-${endpointId}`);
authElement && (authElement.hidden = true);
document.querySelector('#execution-results-' + endpointId).hidden = true;
document.querySelector('#execution-error-' + endpointId).hidden = true;
// Revert to sample code blocks
document.querySelector('#example-requests-' + endpointId).hidden = false;
document.querySelector('#example-responses-' + endpointId).hidden = false;
}
function makeAPICall(method, path, body = {}, query = {}, headers = {}, endpointId = null) {
console.log({endpointId, path, body, query, headers});
if (!(body instanceof FormData) && typeof body !== "string") {
body = JSON.stringify(body)
}
const url = new URL(window.tryItOutBaseUrl + '/' + path.replace(/^\//, ''));
// We need this function because if you try to set an array or object directly to a URLSearchParams object,
// you'll get [object Object] or the array.toString()
function addItemToSearchParamsObject(key, value, searchParams) {
if (Array.isArray(value)) {
value.forEach((v, i) => {
// Append {filters: [first, second]} as filters[0]=first&filters[1]second
addItemToSearchParamsObject(key + '[' + i + ']', v, searchParams);
})
} else if (typeof value === 'object' && value !== null) {
Object.keys(value).forEach((i) => {
// Append {filters: {name: first}} as filters[name]=first
addItemToSearchParamsObject(key + '[' + i + ']', value[i], searchParams);
});
} else {
searchParams.append(key, value);
}
}
Object.keys(query)
.forEach(key => addItemToSearchParamsObject(key, query[key], url.searchParams));
window.abortControllers[endpointId] = new AbortController();
return fetch(url, {
method,
headers,
body: method === 'GET' ? undefined : body,
signal: window.abortControllers[endpointId].signal,
referrer: window.tryItOutBaseUrl,
mode: 'cors',
credentials: 'same-origin',
})
.then(response => Promise.all([response.status, response.statusText, response.text(), response.headers]));
}
function hideCodeSamples(endpointId) {
document.querySelector('#example-requests-' + endpointId).hidden = true;
document.querySelector('#example-responses-' + endpointId).hidden = true;
}
function handleResponse(endpointId, response, status, headers) {
hideCodeSamples(endpointId);
// Hide error views
document.querySelector('#execution-error-' + endpointId).hidden = true;
const responseContentEl = document.querySelector('#execution-response-content-' + endpointId);
// Check if the response contains Laravel's dd() default dump output
const isLaravelDump = response.includes('Sfdump');
// If it's a Laravel dd() dump, use innerHTML to render it safely
if (isLaravelDump) {
responseContentEl.innerHTML = response === '' ? responseContentEl.dataset.emptyResponseText : response;
} else {
// Otherwise, stick to textContent for regular responses
responseContentEl.textContent = response === '' ? responseContentEl.dataset.emptyResponseText : response;
}
// Prettify it if it's JSON
let isJson = false;
try {
const jsonParsed = JSON.parse(response);
if (jsonParsed !== null) {
isJson = true;
response = JSON.stringify(jsonParsed, null, 4);
responseContentEl.textContent = response;
}
} catch (e) {
}
isJson && window.hljs.highlightElement(responseContentEl);
const statusEl = document.querySelector('#execution-response-status-' + endpointId);
statusEl.textContent = ` (${status})`;
document.querySelector('#execution-results-' + endpointId).hidden = false;
statusEl.scrollIntoView({behavior: "smooth", block: "center"});
}
function handleError(endpointId, err) {
hideCodeSamples(endpointId);
// Hide response views
document.querySelector('#execution-results-' + endpointId).hidden = true;
// Show error views
let errorMessage = err.message || err;
const $errorMessageEl = document.querySelector('#execution-error-message-' + endpointId);
$errorMessageEl.textContent = errorMessage + $errorMessageEl.textContent;
const errorEl = document.querySelector('#execution-error-' + endpointId);
errorEl.hidden = false;
errorEl.scrollIntoView({behavior: "smooth", block: "center"});
}
async function executeTryOut(endpointId, form) {
const executeBtn = document.querySelector(`#btn-executetryout-${endpointId}`);
executeBtn.textContent = executeBtn.dataset.loadingText;
executeBtn.disabled = true;
executeBtn.scrollIntoView({behavior: "smooth", block: "center"});
let body;
let setter;
if (form.dataset.hasfiles === "1") {
body = new FormData();
setter = (name, value) => body.append(name, value);
} else if (form.dataset.isarraybody === "1") {
body = [];
setter = (name, value) => _.set(body, name, value);
} else {
body = {};
setter = (name, value) => _.set(body, name, value);
}
const bodyParameters = form.querySelectorAll('input[data-component=body]');
bodyParameters.forEach(el => {
let value = el.value;
if (el.type === 'number' && typeof value === 'string') {
value = parseFloat(value);
}
if (el.type === 'file' && el.files[0]) {
setter(el.name, el.files[0]);
return;
}
if (el.type !== 'radio') {
if (value === "" && el.required === false) {
// Don't include empty optional values in the request
return;
}
setter(el.name, value);
return;
}
if (el.checked) {
value = (value === 'false') ? false : true;
setter(el.name, value);
}
});
const query = {};
const queryParameters = form.querySelectorAll('input[data-component=query]');
queryParameters.forEach(el => {
if (el.type !== 'radio' || (el.type === 'radio' && el.checked)) {
if (el.value === '') {
// Don't include empty values in the request
return;
}
_.set(query, el.name, el.value);
}
});
let path = form.dataset.path;
const urlParameters = form.querySelectorAll('input[data-component=url]');
urlParameters.forEach(el => (path = path.replace(new RegExp(`\\{${el.name}\\??}`), el.value)));
const headers = Object.fromEntries(Array.from(form.querySelectorAll('input[data-component=header]'))
.map(el => [el.name, el.value]));
// When using FormData, the browser sets the correct content-type + boundary
let method = form.dataset.method;
if (body instanceof FormData) {
delete headers['Content-Type'];
// When using FormData with PUT or PATCH, use method spoofing so PHP can access the post body
if (['PUT', 'PATCH'].includes(form.dataset.method)) {
method = 'POST';
setter('_method', form.dataset.method);
}
}
let preflightPromise = Promise.resolve();
if (window.useCsrf && window.csrfUrl) {
preflightPromise = makeAPICall('GET', window.csrfUrl).then(() => {
headers['X-XSRF-TOKEN'] = getCookie('XSRF-TOKEN');
});
}
return preflightPromise.then(() => makeAPICall(method, path, body, query, headers, endpointId))
.then(([responseStatus, statusText, responseContent, responseHeaders]) => {
handleResponse(endpointId, responseContent, responseStatus, responseHeaders)
})
.catch(err => {
if (err.name === "AbortError") {
console.log("Request cancelled");
return;
}
console.log("Error while making request: ", err);
handleError(endpointId, err);
})
.finally(() => {
executeBtn.disabled = false;
executeBtn.textContent = executeBtn.dataset.initialText;
});
}
File diff suppressed because it is too large Load Diff