queicherius / gw2api-client

Javascript wrapper for the official Guild Wars 2 API.
MIT License
47 stars 18 forks source link

Generate the `endpoints.md` out of source comments #62

Open queicherius opened 5 years ago

queicherius commented 5 years ago

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>

---