Skip to content

Commit

Permalink
doc: Add an example which instantiates the client with app info
Browse files Browse the repository at this point in the history
  • Loading branch information
kellnerd committed Mar 30, 2024
1 parent 454af7e commit d1f14a2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ export class MusicBrainzClient {
*
* You should identify your application to avoid being blocked:
* https://wiki.musicbrainz.org/MusicBrainz_API/Rate_Limiting
*
* @example
* ```ts
* const client = new MusicBrainzClient({
* app: {
* name: "ExampleApp",
* version: "1.2.3",
* contact: "http://example.com/app",
* },
* });
* ```
*/
constructor(options: ClientOptions = {}) {
this.apiBaseUrl = options.apiUrl ?? "https://musicbrainz.org/ws/2/";
Expand Down

0 comments on commit d1f14a2

Please sign in to comment.