Skip to content

eh_GJUsersFetchRequest

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

Inherits: eh_GJBaseRequest > HTTPRequest > Node > Object

Description

This class decribes the Fetch api endpoint It's response is modeled in the custom resource of eh_GJUsersFetchData

It is possible to request data for a single user with fetch_user or for multiple users with fetch_users. These methods return the request Error Code, so that you can check if for connection errors.

Each has it's own signal with the response data, so be sure to listen for the corresponding signal.

If the request fails, the signal gj_request_failed will be emitted with an error dict as its parameter.

Methods

return type method signature
int fetch_user(String p_username, bool is_user_id)
int fetch_users(Array p_array_of_ids)

Signals

  • gj_users_fetch_data_received(array_of_eh_gj_users_fetch_data)

Multi User Request Response. Sends an array of eh_GJUsersFetchData as parameter


  • gj_user_fetch_data_received(eh_gj_users_fetch_data)

Single User Request Response. Send an eh_GJUsersFetchData Resource as parameter


Constants

  • URL_ENDPOINT = /users/ --- Address for this endpoint.

Method Descriptions

fetch_user

Request for a single user. Returns request error code. The user data will be sent either by the signal [gj_user_fetch_data_received] or [eh_GJBaseRequest.gj_request_failed] will be emitted.


fetch_users

Request for multiple users. Returns request error code. The user data will be sent either by the signal [gj_users_fetch_data_received] or [eh_GJBaseRequest.gj_request_failed] will be emitted.