Skip to content

Recommendation for developers: Use ChatGPT for generating types & readme docs #72

Description

@gregegan

To generate types
Drop in the entire api response from garmin connect, and ask chat gpt to generate you types for it! so fast.

To generate readme docs

Drop this example in, along with your function code and ask chat gpt to create developer readme docs in the same format as this for your function.

### `getDailyWeight(date?: Date): Promise<number>`

Retrieves the daily weight and converts it from grams to pounds.

#### Parameters:

-   `date` (Date, optional): Date of information requested. Defaults to the current date.

#### Returns:

-   `Promise<number>`: A Promise that resolves to the daily weight converted from grams to pounds.

#### Throws:

-   `Error`: If valid daily weight data cannot be found for the specified date.

#### Example:

```js
const weightInPounds = await instance.getDailyWeight(new Date('2023-12-25'));
console.log(`Daily weight on 2023-12-25: ${weightInPounds.toFixed(1)} lbs`);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions