mineos-market-client
    Preparing search index...

    Class MarketClient

    Main class for interacting with MineOS Market services.

    Index

    Constructors

    • Initializes a new instance of the class with the specified configuration.

      Parameters

      • Optionalconfig: Partial<Config>

        The configuration object, partially overriding default settings.

      Returns MarketClient

    Methods

    • Authenticate the current instance and store the token, allowing to access the protected endpoints. Requires either username or email along with a password.

      Parameters

      Returns Promise<UserCredentials>

      User's credentials.

      Auth.login if you want to get credentials without setting the instance's token.

      await client.login({ email: 'user@example.com', password: 'prettynewpassword' })
      
    • Log out the current user by removing their authentication token.

      Returns void

    • Set or change the token value for the current instance.

      Parameters

      • token: string

        The token string to be set.

      Returns void

    • Retrieve the current token value.

      Returns string | undefined

      The token if available, otherwise undefined.

    • Update the existing configuration by merging the provided partial configuration object.

      Parameters

      • params: Partial<Config>

        A partial configuration object containing the configuration properties to be updated.

      Returns void

    Properties

    auth: Auth

    Provides methods for creating and managing accounts

    messages: Messages

    Provides methods for receiving and sending user's messages

    publications: Publications

    Provides methods for getting and manipulating market publications

    reviews: Reviews

    Provides methods for receiving and publishing publication reviews

    statistics: Statistics

    Provides methods for receiving market statistics and marking publications as downloaded