Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/components/documentation/AuthenticationSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,33 @@
</ul>
</div>
</div>

<!-- Rate Limit Headers -->
<div class="mt-8">
<h3 class="text-xl font-semibold text-gray-900 mb-4">Rate Limit Response Headers</h3>
<div class="bg-gray-50 rounded-lg p-6">
<div class="grid md:grid-cols-1 gap-4">
<div class="space-y-3">
<div class="flex justify-between items-center py-2 border-b border-gray-200">
<code class="text-sm font-mono text-gray-800">X-RateLimit-Limit</code>
<span class="text-sm text-gray-600">Request limit per window</span>
</div>
<div class="flex justify-between items-center py-2 border-b border-gray-200">
<code class="text-sm font-mono text-gray-800">X-RateLimit-Remaining</code>
<span class="text-sm text-gray-600">Requests remaining in current window</span>
</div>
<div class="flex justify-between items-center py-2 border-b border-gray-200">
<code class="text-sm font-mono text-gray-800">X-RateLimit-Reset</code>
<span class="text-sm text-gray-600">Unix timestamp when rate limit resets</span>
</div>
<div class="flex justify-between items-center py-2">
<code class="text-sm font-mono text-gray-800">Retry-After</code>
<span class="text-sm text-gray-600">Seconds to wait before retrying (on 429 errors)</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
Expand Down
56 changes: 55 additions & 1 deletion src/components/documentation/NationalHistoricalSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,30 @@
</tr>
</thead>
<tbody class="text-sm">
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">limit</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Records per page (default: 50, max: 1000)</td>
<td class="py-3 px-4 text-gray-500">Optional</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">offset</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Records to skip (default: 0)</td>
<td class="py-3 px-4 text-gray-500">Optional</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">page</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Page number (1-based, alternative to offset)</td>
<td class="py-3 px-4 text-gray-500">Optional</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">all</td>
<td class="py-3 px-4 text-gray-600">boolean</td>
<td class="py-3 px-4 text-gray-600">Return all data without pagination</td>
<td class="py-3 px-4 text-gray-500">Optional</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">start_date</td>
<td class="py-3 px-4 text-gray-600">string</td>
Expand Down Expand Up @@ -145,11 +169,41 @@
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Daily new death cases</td>
</tr>
<tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">daily.active</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Daily change in active cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">statistics.percentages.active</td>
<td class="py-3 px-4 text-gray-600">float</td>
<td class="py-3 px-4 text-gray-600">Percentage of active cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">statistics.percentages.recovered</td>
<td class="py-3 px-4 text-gray-600">float</td>
<td class="py-3 px-4 text-gray-600">Percentage of recovered cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">statistics.percentages.deceased</td>
<td class="py-3 px-4 text-gray-600">float</td>
<td class="py-3 px-4 text-gray-600">Percentage of deceased cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">statistics.reproduction_rate.value</td>
<td class="py-3 px-4 text-gray-600">float</td>
<td class="py-3 px-4 text-gray-600">Reproduction rate (Rt) estimate</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">statistics.reproduction_rate.upper_bound</td>
<td class="py-3 px-4 text-gray-600">float</td>
<td class="py-3 px-4 text-gray-600">Upper confidence bound for reproduction rate</td>
</tr>
<tr>
<td class="py-3 px-4 font-mono text-pico-deep">statistics.reproduction_rate.lower_bound</td>
<td class="py-3 px-4 text-gray-600">float</td>
<td class="py-3 px-4 text-gray-600">Lower confidence bound for reproduction rate</td>
</tr>
</tbody>
</table>
</div>
Expand Down
123 changes: 121 additions & 2 deletions src/components/documentation/ProvinceCasesSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,127 @@
<!-- Response Fields Table -->
<div class="mb-8">
<h3 class="text-xl font-semibold text-gray-900 mb-4">Response Fields</h3>
<div class="bg-gray-50 rounded-lg p-4 text-gray-600">
<p>Returns paginated province case data. Each province object contains the same COVID-19 case structure as national data with province-specific information.</p>

<!-- Province Structure Note -->
<div class="bg-blue-50 rounded-lg p-4 mb-4 border-l-4 border-blue-400">
<div class="flex">
<svg class="w-5 h-5 text-blue-400 mt-0.5 mr-3 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<div class="text-blue-800">
<p class="font-medium">Provincial Data Structure</p>
<p class="text-sm">Returns array of province COVID-19 data with enhanced ODP/PDP tracking. Each object includes:</p>
</div>
</div>
</div>

<div class="overflow-x-auto">
<table class="min-w-full bg-white border border-gray-200 rounded-lg">
<thead class="bg-gray-50">
<tr>
<th class="text-left py-3 px-4 font-semibold text-gray-900 border-b">Field</th>
<th class="text-left py-3 px-4 font-semibold text-gray-900 border-b">Type</th>
<th class="text-left py-3 px-4 font-semibold text-gray-900 border-b">Description</th>
</tr>
</thead>
<tbody class="text-sm">
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">date</td>
<td class="py-3 px-4 text-gray-600">string</td>
<td class="py-3 px-4 text-gray-600">Date of the case report (YYYY-MM-DD format)</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">day</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Day number since first case reported</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">province.id</td>
<td class="py-3 px-4 text-gray-600">string</td>
<td class="py-3 px-4 text-gray-600">Province ID (e.g., '72' for Sulawesi Tengah)</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">province.name</td>
<td class="py-3 px-4 text-gray-600">string</td>
<td class="py-3 px-4 text-gray-600">Province name</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">daily.positive</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Daily new confirmed cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">daily.recovered</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Daily new recovered cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">daily.deceased</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Daily new death cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">daily.odp.active</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Daily active ODP (Orang Dalam Pengawasan)</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">daily.odp.finished</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Daily finished ODP observations</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">daily.pdp.active</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Daily active PDP (Pasien Dalam Pengawasan)</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">daily.pdp.finished</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Daily finished PDP supervisions</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">cumulative.positive</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Total confirmed cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">cumulative.recovered</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Total recovered cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">cumulative.deceased</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Total death cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">cumulative.active</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Current active cases</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">cumulative.odp.total</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Total ODP cases (active + finished)</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">cumulative.pdp.total</td>
<td class="py-3 px-4 text-gray-600">integer</td>
<td class="py-3 px-4 text-gray-600">Total PDP cases (active + finished)</td>
</tr>
<tr class="border-b">
<td class="py-3 px-4 font-mono text-pico-deep">statistics.percentages.*</td>
<td class="py-3 px-4 text-gray-600">float</td>
<td class="py-3 px-4 text-gray-600">Percentage breakdown (active, recovered, deceased)</td>
</tr>
<tr>
<td class="py-3 px-4 font-mono text-pico-deep">statistics.reproduction_rate.*</td>
<td class="py-3 px-4 text-gray-600">object</td>
<td class="py-3 px-4 text-gray-600">Reproduction rate with confidence bounds</td>
</tr>
</tbody>
</table>
</div>
</div>

Expand Down