Interface MROptions

interface MROptions {
    authorization?: string;
    baseUrl?: string;
    cache?: null | NodeCache;
    userAgent?: string;
}

Properties

authorization?: string

Either a Personal Access Token or the Client secret when using the OAuth2 Authorization Flow

undefined
baseUrl?: string

The base URL of the Modrinth API

'https://api.modrinth.com/v2'
cache?: null | NodeCache

The cache instance to use for caching requests

userAgent?: string

The user agent to use (Recommended to change this to avoid rate limiting)

  • Bad: typerinth (default user agent)
  • Good: project_name
  • Better: github_username/project_name/1.56.0
  • Best: github_username/project_name/1.56.0 (launcher.com) or github_username/project_name/1.56.0 (contact@launcher.com)
'typerinth (default user agent)'