feat: finalize provider parity and SEO/frontend route coverage
This commit is contained in:
@@ -1,49 +1,42 @@
|
||||
@extends('site.layout')
|
||||
|
||||
@section('title', 'API Docs - Dewemoji')
|
||||
@section('meta_description', 'Dewemoji API docs for emoji search, categories, license verification, activation, and system endpoints.')
|
||||
|
||||
@push('jsonld')
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@@context": "https://schema.org",
|
||||
"@@type": "TechArticle",
|
||||
"headline": "Dewemoji API Documentation",
|
||||
"about": "Emoji search API",
|
||||
"url": "{{ url('/api-docs') }}"
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@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>
|
||||
<div class="max-w-5xl mx-auto px-4 sm:px-6 py-10">
|
||||
<h1 class="font-display text-4xl font-bold">API Docs</h1>
|
||||
<p class="text-gray-400 mt-2">Base URL: <code>{{ url('/v1') }}</code></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>
|
||||
<div class="glass-card rounded-2xl p-5 mt-6">
|
||||
<h2 class="text-lg font-semibold">Core endpoints</h2>
|
||||
<ul class="mt-3 space-y-1 text-sm text-gray-300">
|
||||
<li><code>GET /v1/categories</code></li>
|
||||
<li><code>GET /v1/emojis?q=<term>&category=<label>&subcategory=<slug></code></li>
|
||||
<li><code>GET /v1/emoji/{slug}</code> or <code>/v1/emoji?slug=</code></li>
|
||||
<li><code>POST /v1/license/verify</code></li>
|
||||
<li><code>POST /v1/license/activate</code></li>
|
||||
<li><code>POST /v1/license/deactivate</code></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
·
|
||||
<a href="{{ url('/v1/emojis?q=love&limit=5&page=1') }}" target="_blank" style="color:var(--brand);">Open emojis JSON</a>
|
||||
</p>
|
||||
</section>
|
||||
<div class="glass-card rounded-2xl p-5 mt-4">
|
||||
<h2 class="text-lg font-semibold">Auth</h2>
|
||||
<p class="text-sm text-gray-300 mt-2">Use <code>Authorization: Bearer YOUR_LICENSE_KEY</code> (preferred) or <code>X-License-Key</code>.</p>
|
||||
<pre class="mt-3 text-xs overflow-x-auto bg-black/30 rounded-lg p-3"><code>curl -H "Authorization: Bearer YOUR_LICENSE_KEY" \
|
||||
"{{ url('/v1/emojis') }}?q=love&limit=50&page=1"</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
Reference in New Issue
Block a user