gw2api-client icon indicating copy to clipboard operation
gw2api-client copied to clipboard

Generate the `endpoints.md` out of source comments

Open queicherius opened this issue 5 years ago • 0 comments

Something ala:

/**
 * Information about the available world bosses.
 *
 * Usage: `api().worldbosses()`
 */
class WorldbossesEndpoint extends AbstractEndpoint {
  constructor (client) {
    super(client)
    this.url = '/v2/worldbosses'
    this.isPaginated = true
    this.isBulk = true
    this.isLocalized = true
    this.cacheTime = 24 * 60 * 60
  }
}

// ... code ...

Should be easily transformed into something like this:

- [`api().worldbosses()`](#apiworldbosses) - Information about the available world bosses.

<!-- Further down -->

### `api().worldbosses()`

> Information about the available world bosses.

- **API-URL:** [/v2/worldbosses](https://api.guildwars2.com/v2/worldbosses)
- **Paginated:** Yes
- **Bulk expanding:** Yes
- **Authenticated:** No
- **Localized:** Yes
- **Cache time:** 24 hours

<sup>[↑ Back to the overview](#available-endpoints)</sup>

---

queicherius avatar Apr 10 '19 23:04 queicherius