Refactoring: make needed URLs explicit

This commit is contained in:
Pieter Vander Vennet 2023-09-27 22:21:35 +02:00
parent 7852829f1b
commit 4852888b41
51 changed files with 978 additions and 871 deletions

View file

@ -32,11 +32,12 @@ export default class Maproulette {
private readonly apiKey: string
public static singleton = new Maproulette()
public static readonly defaultEndpoint = "https://maproulette.org/api/v2"
/**
* Creates a new Maproulette instance
* @param endpoint The API endpoint to use
*/
constructor(endpoint: string = "https://maproulette.org/api/v2") {
constructor(endpoint: string = Maproulette.defaultEndpoint) {
this.endpoint = endpoint
this.apiKey = Constants.MaprouletteApiKey
}