Overview
Composables
nuxt-api-party
offers two distinct composable types to return data from your APIs. All composables are auto-imported and globally available inside your components:
useMyApiData
– Returns multiple values similar touseFetch
$myApi
– Returns the response data, similar to$fetch
INFO
$myApi
and useMyApiData
are placeholders. They are used as examples in the documentation. The actual composables are generated based on your API endpoint ID.
Dynamic Composables
The composables are generated based on your API endpoint ID. For example, if you were to call your API jsonPlaceholder
, the generated composables are:
$jsonPlaceholder
useJsonPlaceholderData