eh_GJUsersFetchRequest

Extends: eh_GJBaseRequest < HTTPRequest

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 [eh_GJBaseRequest.gj_request_failed] will be emitted with an error dict as its parameter.

Method Descriptions

fetch_user

func fetch_user(p_username: String, is_user_id: bool = false) -> int

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

fetch_users

func fetch_users(p_array_of_ids: Array) -> int

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

Signals

  • signal gj_users_fetch_data_received(array_of_eh_gj_users_fetch_data): Multi User Request Response. Sends an array of [eh_GJUsersFetchData] as parameter
  • signal gj_user_fetch_data_received(eh_gj_users_fetch_data): Single User Request Response. Send an [eh_GJUsersFetchData] Resource as parameter