@rivi-software/radiotools-sdk-vue 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +33 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @rivi-software/radiotools-sdk-vue
2
+
3
+ Vue composables for the RadioTools listener API, wrapping [`@rivi-software/radiotools-sdk`](../sdk-typescript). Generated from `@rivi-software/radiotools-contract`; do not edit `src/composables.generated.ts` by hand.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @rivi-software/radiotools-sdk-vue @rivi-software/radiotools-sdk
9
+ ```
10
+
11
+ Requires Vue 3.4 or newer.
12
+
13
+ ## Usage
14
+
15
+ ```vue
16
+ <script setup lang="ts">
17
+ import { createStationClient } from "@rivi-software/radiotools-sdk";
18
+ import { useGetNowPlaying } from "@rivi-software/radiotools-sdk-vue";
19
+
20
+ const client = createStationClient({ baseUrl, stationSlug, apiToken });
21
+ const { data, error, loading, refresh } = useGetNowPlaying(client);
22
+ </script>
23
+
24
+ <template>
25
+ <p v-if="loading">Loading…</p>
26
+ <p v-else-if="error">{{ error.message }}</p>
27
+ <p v-else>{{ data?.track?.title }}</p>
28
+ </template>
29
+ ```
30
+
31
+ ## Composables
32
+
33
+ `useGetStation`, `useGetCurrentBroadcast`, `useGetNowPlaying`, `useGetWeather`, `useGetTraffic`, `useRecommendedPollInterval`. Each returns refs `{ data, error, loading }` and a `refresh()` function.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivi-software/radiotools-sdk-vue",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Vue composables for @rivi-software/radiotools-sdk (generated from @rivi-software/radiotools-contract)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,14 +22,14 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "typescript": "5.9.3",
25
- "vue": "3.5.22"
25
+ "vue": "3.5.43"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/RIVI-Software/radiotools-sdk.git",
32
+ "url": "https://github.com/rivi-software/radiotools-sdk.git",
33
33
  "directory": "packages/sdk-vue"
34
34
  }
35
35
  }