<html>
<head>
    <title>Firefly III API test</title>
    <base href="{{ route('index', null, true) }}/">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="csrf-token" content="{{ csrf_token() }}">
</head>
<body>
<p>
    Hi there,
</p>
<p>
    This page is created to do some basic API testing. It's not very exciting, is it?
</p>
<script src="v1/js/app.js?v={{ FF_BUILD_TIME }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" nonce="{{ JS_NONCE }}">
    $(function () {
        "use strict";
        console.log('Hello from the API test page!');
        $.ajax({
                   url: 'api/v1/accounts?size=50&date=2025-08-06',
                   type: 'GET',
                   headers: {
                       'Content-Type': 'application/json',
                       'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
                   },
               });
        $.ajax({
                   url: 'api/v1/available-budgets?size=50&date=2025-08-06',
                   type: 'GET',
                   headers: {
                       'Content-Type': 'application/json',
                       'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
                   },
               });
        $.ajax({
                   url: 'api/v1/budgets?size=50&date=2025-08-06&start=2025-08-01&end=2025-08-31',
                   type: 'GET',
                   headers: {
                       'Content-Type': 'application/json',
                       'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
                   },
               });
        $.ajax({
                   url: 'api/v1/budgets/1/limits?size=50&date=2025-08-06&start=2025-08-01&end=2025-08-31',
                   type: 'GET',
                   headers: {
                       'Content-Type': 'application/json',
                       'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
                   },
               });
        $.ajax({
                   url: 'api/v1/categories?size=50&date=2025-08-06&start=2025-08-01&end=2025-08-31',
                   type: 'GET',
                   headers: {
                       'Content-Type': 'application/json',
                       'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
                   },
               });
        $.ajax({
                   url: 'api/v1/bills?size=50&date=2025-08-06&start=2025-08-01&end=2025-08-31',
                   type: 'GET',
                   headers: {
                       'Content-Type': 'application/json',
                       'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
                   },
               });
    });

</script>
</body>
</html>
