đŸ‘ĨGet Users

Use this method to get information of multiple users at same time such as Name, Bio, social etc. etc. On success, the data is returned as JSON.

Usage in your script

GetUsers
  .Initialize(destroyAtEnd: true)
  .SetParameters(
    perPage: "20",
    page: "1",
    sortBy: "name",
    sortDir: "asc"
  )
  .filter(//optional
  name: "Altura",
  )
  .OnError(error => Debug.Log(error))
  .OnComplete(result => Debug.Log(result))
  .Run();

Member Functions

.Initialize()

ParameterTypeRequiredDescription

destroyAtEnd

bool

Optional

defines if this component will be destroyed after .Run()

.SetParameters()

ParameterTypeRequiredDescription

perPage

String

Yes

Amount of users per page.

page

String

Yes

Amount of pages

sortBy

String

Yes

The field to sort the users by (any field in the user schema may be used)

sortDir

String

Yes

Choose to sort in ascending (asc) or descending (desc) order

.filter()

ParameterTypeRequiredDescription

address

String

Optional

filter by user address

name

String

Optional

filter by user Name

bio

String

Optional

filter by user Bio

.onError()

Action on Error: returns error information.

.onComplete()

Action on successful: returns User_model type.

.Run()

Runs the API call and fills the corresponding model in the component on success.

Last updated