-
{{ t('documentation.overview.title') }}
-
+
+
+
{{ t('documentation.overview.title') }}
+
{{ t('documentation.overview.subtitle') }}
-
+
-
{{ t('documentation.overview.apiStatus') }}
+
{{ t('documentation.overview.apiStatus') }}
-
-
-
{{ t('documentation.overview.gettingStarted') }}
-
{{ t('documentation.overview.gettingStartedSub') }}
+
+
+
{{ t('documentation.overview.gettingStarted') }}
+
{{ t('documentation.overview.gettingStartedSub') }}
-
-
+
+
-
{{ t('documentation.overview.baseUrl') }}
-
-
https://pico-api.banuacoder.com/api/v1
+
{{ t('documentation.overview.baseUrl') }}
+
+ https://pico-api.banuacoder.com/api/v1
-
{{ t('documentation.overview.contentType') }}
-
+
{{ t('documentation.overview.contentType') }}
+
application/json
-
{{ t('documentation.overview.quickExample') }}
-
-
- $ curl -X GET \\
-
-
- "https://pico-api.banuacoder.com/api/v1/national/latest"
-
-
+
{{ t('documentation.overview.quickExample') }}
+
-
-
-
@@ -62,6 +59,7 @@
diff --git a/src/components/documentation/ProvinceCasesSection.vue b/src/components/documentation/ProvinceCasesSection.vue
index d03efc8..5534a51 100644
--- a/src/components/documentation/ProvinceCasesSection.vue
+++ b/src/components/documentation/ProvinceCasesSection.vue
@@ -16,14 +16,16 @@
{{ t('documentation.provinceCases.endpoints') }}
-
- GET
- /provinces/cases
-
-
- GET
- /provinces/{provinceId}/cases
-
+
+
@@ -222,6 +224,16 @@
+
+
+
Response Example
+
+
+
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
+import CodeBlock from '@/components/CodeBlock.vue'
interface Props {
isActive: boolean
@@ -252,4 +265,115 @@ defineProps()
const { t, tm } = useI18n()
const featuresList = computed(() => tm('documentation.provinceCases.featuresList') as string[])
+
+const provinceCasesEndpoint = `curl -X GET \\
+ "https://pico-api.banuacoder.com/api/v1/provinces/cases?limit=10"`
+
+const specificProvinceEndpoint = `curl -X GET \\
+ "https://pico-api.banuacoder.com/api/v1/provinces/72/cases?limit=5&start_date=2024-01-01"`
+
+const provinceCasesResponse = `[
+ {
+ "date": "2024-09-07T00:00:00Z",
+ "day": 1247,
+ "province": {
+ "id": "72",
+ "name": "Sulawesi Tengah"
+ },
+ "daily": {
+ "positive": 12,
+ "recovered": 15,
+ "deceased": 0,
+ "active": -3,
+ "odp": {
+ "active": 5,
+ "finished": 8
+ },
+ "pdp": {
+ "active": 2,
+ "finished": 3
+ }
+ },
+ "cumulative": {
+ "positive": 89543,
+ "recovered": 87234,
+ "deceased": 1876,
+ "active": 433,
+ "odp": {
+ "active": 25,
+ "finished": 1250,
+ "total": 1275
+ },
+ "pdp": {
+ "active": 8,
+ "finished": 567,
+ "total": 575
+ }
+ },
+ "statistics": {
+ "percentages": {
+ "positive": 100.0,
+ "recovered": 97.42,
+ "deceased": 2.09,
+ "active": 0.48
+ },
+ "reproduction_rate": {
+ "value": 0.78,
+ "lower_bound": 0.68,
+ "upper_bound": 0.88
+ }
+ }
+ },
+ {
+ "date": "2024-09-06T00:00:00Z",
+ "day": 1246,
+ "province": {
+ "id": "72",
+ "name": "Sulawesi Tengah"
+ },
+ "daily": {
+ "positive": 8,
+ "recovered": 12,
+ "deceased": 1,
+ "active": -5,
+ "odp": {
+ "active": 3,
+ "finished": 7
+ },
+ "pdp": {
+ "active": 1,
+ "finished": 4
+ }
+ },
+ "cumulative": {
+ "positive": 89531,
+ "recovered": 87219,
+ "deceased": 1876,
+ "active": 436,
+ "odp": {
+ "active": 20,
+ "finished": 1242,
+ "total": 1262
+ },
+ "pdp": {
+ "active": 6,
+ "finished": 564,
+ "total": 570
+ }
+ },
+ "statistics": {
+ "percentages": {
+ "positive": 100.0,
+ "recovered": 97.41,
+ "deceased": 2.09,
+ "active": 0.49
+ },
+ "reproduction_rate": {
+ "value": 0.76,
+ "lower_bound": 0.66,
+ "upper_bound": 0.86
+ }
+ }
+ }
+]`
diff --git a/src/components/documentation/ProvincesSection.vue b/src/components/documentation/ProvincesSection.vue
index 9b89554..8db1ec0 100644
--- a/src/components/documentation/ProvincesSection.vue
+++ b/src/components/documentation/ProvincesSection.vue
@@ -58,6 +58,27 @@
+
+
+
import { useI18n } from 'vue-i18n'
+import CodeBlock from '@/components/CodeBlock.vue'
interface Props {
isActive: boolean
@@ -85,4 +107,120 @@ interface Props {
defineProps()
const { t } = useI18n()
+
+const curlExample = `curl -X GET \\
+ "https://pico-api.banuacoder.com/api/v1/provinces"`
+
+const responseExample = `[
+ {
+ "id": "72",
+ "name": "Sulawesi Tengah",
+ "latest_case": {
+ "date": "2024-09-07T00:00:00Z",
+ "day": 1247,
+ "province": {
+ "id": "72",
+ "name": "Sulawesi Tengah"
+ },
+ "daily": {
+ "positive": 12,
+ "recovered": 8,
+ "deceased": 0,
+ "active": 0,
+ "odp": {
+ "active": 5,
+ "finished": 45
+ },
+ "pdp": {
+ "active": 2,
+ "finished": 23
+ }
+ },
+ "cumulative": {
+ "positive": 89543,
+ "recovered": 87234,
+ "deceased": 1876,
+ "active": 433,
+ "odp": {
+ "active": 25,
+ "finished": 1250,
+ "total": 1275
+ },
+ "pdp": {
+ "active": 8,
+ "finished": 567,
+ "total": 575
+ }
+ },
+ "statistics": {
+ "percentages": {
+ "positive": 100.0,
+ "recovered": 97.42,
+ "deceased": 2.09,
+ "active": 0.48
+ },
+ "reproduction_rate": {
+ "value": 0.78,
+ "lower_bound": 0.68,
+ "upper_bound": 0.88
+ }
+ }
+ }
+ },
+ {
+ "id": "73",
+ "name": "Sulawesi Selatan",
+ "latest_case": {
+ "date": "2024-09-07T00:00:00Z",
+ "day": 1247,
+ "province": {
+ "id": "73",
+ "name": "Sulawesi Selatan"
+ },
+ "daily": {
+ "positive": 45,
+ "recovered": 52,
+ "deceased": 1,
+ "active": 0,
+ "odp": {
+ "active": 12,
+ "finished": 89
+ },
+ "pdp": {
+ "active": 7,
+ "finished": 34
+ }
+ },
+ "cumulative": {
+ "positive": 198765,
+ "recovered": 195123,
+ "deceased": 3098,
+ "active": 544,
+ "odp": {
+ "active": 67,
+ "finished": 2890,
+ "total": 2957
+ },
+ "pdp": {
+ "active": 23,
+ "finished": 1234,
+ "total": 1257
+ }
+ },
+ "statistics": {
+ "percentages": {
+ "positive": 100.0,
+ "recovered": 98.17,
+ "deceased": 1.56,
+ "active": 0.27
+ },
+ "reproduction_rate": {
+ "value": 0.82,
+ "lower_bound": 0.72,
+ "upper_bound": 0.92
+ }
+ }
+ }
+ }
+]`
diff --git a/src/components/documentation/RootEndpointSection.vue b/src/components/documentation/RootEndpointSection.vue
index 7e28da6..9efc254 100644
--- a/src/components/documentation/RootEndpointSection.vue
+++ b/src/components/documentation/RootEndpointSection.vue
@@ -62,6 +62,27 @@
+
+
+
import { useI18n } from 'vue-i18n'
+import CodeBlock from '@/components/CodeBlock.vue'
interface Props {
isActive: boolean
@@ -89,4 +111,26 @@ interface Props {
defineProps()
const { t } = useI18n()
+
+const curlExample = `curl -X GET \\
+ "https://pico-api.banuacoder.com/api/v1/"`
+
+const responseExample = `{
+ "status": "success",
+ "message": "Welcome to PICO SulTeng API",
+ "version": "1.0.0",
+ "documentation": "https://pico-api.banuacoder.com/docs",
+ "endpoints": {
+ "health": "/health",
+ "national": {
+ "latest": "/national/latest",
+ "historical": "/national/historical"
+ },
+ "provinces": {
+ "list": "/provinces",
+ "cases": "/provinces/cases",
+ "specific": "/provinces/{id}/cases"
+ }
+ }
+}`
diff --git a/src/views/Documentation.vue b/src/views/Documentation.vue
index 292eed8..957d2bd 100644
--- a/src/views/Documentation.vue
+++ b/src/views/Documentation.vue
@@ -5,12 +5,12 @@