feat: phase 3 website pages on v1 api

This commit is contained in:
Dwindi Ramadhana
2026-02-03 22:37:52 +07:00
parent 8816522ddd
commit b1aefa6b3d
13 changed files with 563 additions and 4 deletions

View File

@@ -0,0 +1,49 @@
@extends('site.layout')
@section('title', 'API Docs - Dewemoji')
@section('content')
<section class="card" style="padding: 20px;">
<h1 style="margin-top:0;">API Docs</h1>
<p style="color:var(--muted);">Current extension-compatible endpoints exposed by the rebuild app.</p>
<h2>Base URL</h2>
<p><code>{{ url('/') }}/v1</code></p>
<h2>Endpoints</h2>
<ul>
<li><code>GET /v1/categories</code> - category + subcategory map</li>
<li><code>GET /v1/emojis</code> - paginated emoji list/search</li>
<li><code>POST /v1/license/verify</code> - license validation contract</li>
</ul>
<h2>Example: emojis</h2>
<pre class="card" style="padding:12px;overflow:auto;">GET /v1/emojis?q=love&category=Smileys%20%26%20Emotion&page=1&limit=20</pre>
<h2>Example response</h2>
<pre class="card" style="padding:12px;overflow:auto;">{
"items": [
{
"emoji": "😀",
"name": "grinning face",
"slug": "grinning-face",
"category": "Smileys & Emotion",
"subcategory": "face-smiling",
"supports_skin_tone": false,
"summary": "A happy smiling face."
}
],
"total": 1,
"page": 1,
"limit": 20
}</pre>
<h2>Try it quickly</h2>
<p>
<a href="{{ url('/v1/categories') }}" target="_blank" style="color:var(--brand);">Open categories JSON</a>
&middot;
<a href="{{ url('/v1/emojis?q=love&limit=5&page=1') }}" target="_blank" style="color:var(--brand);">Open emojis JSON</a>
</p>
</section>
@endsection