@dlwiest/ts-tonal-client 0.2.0 → 0.2.1

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.
package/README.md CHANGED
@@ -67,6 +67,9 @@ Then try the examples:
67
67
  # See all your workouts
68
68
  npm run example:user-workouts
69
69
 
70
+ # Search for workouts by name
71
+ npm run example:workout:name "Upper Body"
72
+
70
73
  # Get your user info
71
74
  npm run example:user
72
75
 
@@ -150,9 +153,16 @@ console.log(`You have ${dailyLifts.length} daily lifts`)
150
153
  // Get daily lifts with specific timezone
151
154
  const dailyLiftsEST = await client.getDailyLifts('America/New_York')
152
155
 
153
- // Get specific workout details
156
+ // Get specific workout details
154
157
  const workout = await client.getWorkoutById('workout-uuid')
155
158
 
159
+ // Search for workouts by name (case-insensitive partial match)
160
+ const workouts = await client.getUserWorkouts(0, 50)
161
+ const matches = workouts.filter(w =>
162
+ w.title.toLowerCase().includes('upper body')
163
+ )
164
+ console.log(`Found ${matches.length} matching workouts`)
165
+
156
166
  // Get shared workout
157
167
  const sharedWorkout = await client.getWorkoutByShareUrl('https://share.tonal.com/workout/...')
158
168
 
@@ -425,6 +435,7 @@ const chestMovements = movements.filter(m =>
425
435
  - `npm run example:goals` - Show available goals
426
436
  - `npm run example:user-workouts` - List your workouts
427
437
  - `npm run example:workout:id <id>` - Get specific workout
438
+ - `npm run example:workout:name <name>` - Search for workouts by name
428
439
  - `npm run example:workout:share <url>` - Get shared workout
429
440
  - `npm run example:estimate` - Estimate workout duration
430
441
  - `npm run example:create-workout` - Create a new workout
@@ -0,0 +1 @@
1
+ import 'dotenv/config';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dlwiest/ts-tonal-client",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "TypeScript client for Tonal API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -27,6 +27,7 @@
27
27
  "example:movements": "tsx examples/get-movements.ts",
28
28
  "example:movements:save": "tsx examples/get-movements.ts --save",
29
29
  "example:workout:id": "tsx examples/get-workout-by-id.ts",
30
+ "example:workout:name": "tsx examples/get-workout-by-name.ts",
30
31
  "example:workout:share": "tsx examples/get-workout-by-share-url.ts",
31
32
  "example:user": "tsx examples/get-user-info.ts",
32
33
  "example:goals": "tsx examples/get-goals.ts",