Skip to content

Latest commit

 

History

History
executable file
·
99 lines (68 loc) · 3.2 KB

README.md

File metadata and controls

executable file
·
99 lines (68 loc) · 3.2 KB

user

Overview

User

Available Operations

  • login - Login user
  • me - Show current user

login

Login user

Example Usage

package hello.world;

import structure.Structure.SDK;
import structure.Structure.models.operations.LoginApplicationJSON;
import structure.Structure.models.operations.LoginResponse;
import structure.Structure.models.shared.Security;

public class Application {
    public static void main(String[] args) {
        try {
            SDK sdk = SDK.builder()
                .setSecurity(new Security("nisi") {{
                    bearerAuth = "";
                }})
                .build();

            LoginApplicationJSON req = new LoginApplicationJSON("recusandae", "temporibus");            

            LoginResponse res = sdk.user.login(req);

            if (res.body != null) {
                // handle response
            }
        } catch (Exception e) {
            // handle exception
        }
    }
}

Parameters

Parameter Type Required Description
request structure.Structure.models.operations.LoginApplicationJSON ✔️ The request object to use for the request.

Response

structure.Structure.models.operations.LoginResponse

me

Show current user

Example Usage

package hello.world;

import structure.Structure.SDK;
import structure.Structure.models.operations.MeResponse;
import structure.Structure.models.shared.Security;

public class Application {
    public static void main(String[] args) {
        try {
            SDK sdk = SDK.builder()
                .setSecurity(new Security("ab") {{
                    bearerAuth = "";
                }})
                .build();

            MeResponse res = sdk.user.me();

            if (res.body != null) {
                // handle response
            }
        } catch (Exception e) {
            // handle exception
        }
    }
}

Response

structure.Structure.models.operations.MeResponse