Skip to content

eh_GJUsersFetch

Daniel Queiroz Porto edited this page Sep 17, 2020 · 1 revision

Inherits: Node > Object

Description

Node to manage requests to the users endpoint. It wil instantiate and remove eh_GJUsersAuthRequest nodes as needed.

It can make requests for data on a single user or on multiple users at a time.

Methods

return type method signature
null request_user(String p_username, bool is_user_id)
null request_users(Array p_user_ids)

Signals

  • gj_fetch_user_completed(eh_gj_users_fetch_data)

Signal emitted when a single user request is completed successfully. Sends a eh_GJUsersFetchData as parameter.


  • gj_fetch_users_completed(array_of_eh_gj_users_fetch_data)

Signal emitted when a multi user request is completed successfully. Sends an array of eh_GJUsersFetchData as parameter.


  • gj_fetch_failed(error_dict)

Signal emitted when a fetch request fails. The dictionary format can vary according to the type of error


Method Descriptions

request_user

  • void request_user(String p_username, bool is_user_id)

Creates a single user request. If you're passing a user_id number instead of username the optional parameter must be sent as true. Emits [gj_fetch_user_completed] signal if completed successfully or [gj_fetch_failed] if not.


request_users

  • void request_users(Array p_user_ids)

Creates a multi user request. It only accepts user_ids. Emits [gj_fetch_users_completed] signal if completed successfully or [gj_fetch_failed] if not.