@atatctech/athena-sdk

1.2.1 • Public • Published

AthenaSDK-JS

JavaScript SDK for Athena2.

Installation

npm i @atatctech/athena-sdk

Usage

const instance = useAthena();
test(instance,
    () => {
    console.log("online");
}, () => {
    console.log("unavailable");
}, undefined, () => {
    console.log("offline");
});

Create an Instance

const baseUrl = "http://localhost";
const port = 8080;

const instance = useAthena(baseUrl, port);

baseUrl refers to the backend server address. In this case, it is set to "http://localhost" instead of "https://athena2.atatctech.com" by default.

port specifies the port that the server listens.

The following example is equivalent to the one above.

const instance = useAthena("http://localhost:8080");

APIs

  • test()
  • userExists()
  • signUpRequest()
  • signUp()
  • signIn()
  • directSignIn()
  • athenaAuthToken()
  • getUserByName()
  • getUserByUID()
  • getUsers()
  • getUsersByUIDs()
  • getUsersWith()
  • getUserByAAT()
  • setUser()
  • setName()
  • setEmailRequest()
  • setEmail()
  • setPasswordRequest()
  • setPassword()
  • revokeTokens()

Readme

Keywords

Package Sidebar

Install

npm i @atatctech/athena-sdk

Weekly Downloads

20

Version

1.2.1

License

The Apache License, Version 2.0

Unpacked Size

67.8 kB

Total Files

27

Last publish

Collaborators

  • atatc