pub struct EpicGames { /* private fields */ }Expand description
Client for the Epic Games Store API.
This is the main entry point for the library. Create an instance with
EpicGames::new, authenticate with EpicGames::auth_code or
EpicGames::login, then call API methods.
Most methods return Option<T> or Vec<T>, returning None / empty on
errors. Fab methods return Result<T, EpicAPIError> for richer error
handling (e.g., distinguishing timeouts from other failures).
Session state is stored in UserData, which implements
Serialize / Deserialize for persistence across runs.
Implementations§
Source§impl EpicGames
impl EpicGames
Sourcepub fn is_logged_in(&self) -> bool
pub fn is_logged_in(&self) -> bool
Check whether the user is logged in.
Returns true if the access token exists and has more than 600 seconds
remaining before expiry.
Sourcepub fn user_details(&self) -> UserData
pub fn user_details(&self) -> UserData
Returns a clone of the current session state.
The returned UserData implements Serialize / Deserialize,
so you can persist it to disk and restore it later with
set_user_details.
Sourcepub fn set_user_details(&mut self, user_details: UserData)
pub fn set_user_details(&mut self, user_details: UserData)
Sourcepub async fn try_auth_code(
&mut self,
exchange_token: Option<String>,
authorization_code: Option<String>,
) -> Result<bool, EpicAPIError>
pub async fn try_auth_code( &mut self, exchange_token: Option<String>, authorization_code: Option<String>, ) -> Result<bool, EpicAPIError>
Like auth_code, but returns a Result instead of swallowing errors.
Sourcepub async fn auth_code(
&mut self,
exchange_token: Option<String>,
authorization_code: Option<String>,
) -> bool
pub async fn auth_code( &mut self, exchange_token: Option<String>, authorization_code: Option<String>, ) -> bool
Authenticate with an authorization code or exchange token.
Returns true on success, false on failure. Returns None on API errors.
Sourcepub async fn try_login(&mut self) -> Result<bool, EpicAPIError>
pub async fn try_login(&mut self) -> Result<bool, EpicAPIError>
Like login, but returns a Result instead of swallowing errors.
Sourcepub async fn login(&mut self) -> bool
pub async fn login(&mut self) -> bool
Resume session using the saved refresh token.
Returns true on success, false if the refresh token has expired or is invalid.
Unlike try_login, this method falls through to
refresh-token login if session resume fails.
Sourcepub async fn try_list_assets(
&mut self,
platform: Option<String>,
label: Option<String>,
) -> Result<Vec<EpicAsset>, EpicAPIError>
pub async fn try_list_assets( &mut self, platform: Option<String>, label: Option<String>, ) -> Result<Vec<EpicAsset>, EpicAPIError>
Like list_assets, but returns a Result instead of swallowing errors.
Sourcepub async fn list_assets(
&mut self,
platform: Option<String>,
label: Option<String>,
) -> Vec<EpicAsset>
pub async fn list_assets( &mut self, platform: Option<String>, label: Option<String>, ) -> Vec<EpicAsset>
List all owned assets.
Defaults to platform=“Windows” and label=“Live” if not specified.
Returns empty Vec on API errors.
Sourcepub async fn try_asset_manifest(
&mut self,
platform: Option<String>,
label: Option<String>,
namespace: Option<String>,
item_id: Option<String>,
app: Option<String>,
) -> Result<AssetManifest, EpicAPIError>
pub async fn try_asset_manifest( &mut self, platform: Option<String>, label: Option<String>, namespace: Option<String>, item_id: Option<String>, app: Option<String>, ) -> Result<AssetManifest, EpicAPIError>
Like asset_manifest, but returns a Result instead of swallowing errors.
Sourcepub async fn asset_manifest(
&mut self,
platform: Option<String>,
label: Option<String>,
namespace: Option<String>,
item_id: Option<String>,
app: Option<String>,
) -> Option<AssetManifest>
pub async fn asset_manifest( &mut self, platform: Option<String>, label: Option<String>, namespace: Option<String>, item_id: Option<String>, app: Option<String>, ) -> Option<AssetManifest>
Fetch asset manifest with CDN download URLs.
Defaults to platform=“Windows” and label=“Live” if not specified.
Returns None on API errors.
Sourcepub async fn fab_asset_manifest(
&self,
artifact_id: &str,
namespace: &str,
asset_id: &str,
platform: Option<&str>,
) -> Result<Vec<DownloadInfo>, EpicAPIError>
pub async fn fab_asset_manifest( &self, artifact_id: &str, namespace: &str, asset_id: &str, platform: Option<&str>, ) -> Result<Vec<DownloadInfo>, EpicAPIError>
Fetch Fab asset manifest with signed distribution points.
Returns Result to expose timeout errors (403 → EpicAPIError::FabTimeout).
Sourcepub async fn try_asset_info(
&mut self,
asset: &EpicAsset,
) -> Result<Option<AssetInfo>, EpicAPIError>
pub async fn try_asset_info( &mut self, asset: &EpicAsset, ) -> Result<Option<AssetInfo>, EpicAPIError>
Like asset_info, but returns a Result instead of swallowing errors.
Sourcepub async fn asset_info(&mut self, asset: &EpicAsset) -> Option<AssetInfo>
pub async fn asset_info(&mut self, asset: &EpicAsset) -> Option<AssetInfo>
Fetch catalog metadata for an asset (includes DLC tree).
Returns None on API errors.
Sourcepub async fn try_account_details(&mut self) -> Result<AccountData, EpicAPIError>
pub async fn try_account_details(&mut self) -> Result<AccountData, EpicAPIError>
Like account_details, but returns a Result instead of swallowing errors.
Sourcepub async fn account_details(&mut self) -> Option<AccountData>
pub async fn account_details(&mut self) -> Option<AccountData>
Fetch account details (email, display name, country, 2FA status).
Returns None on API errors.
Sourcepub async fn try_account_ids_details(
&mut self,
ids: Vec<String>,
) -> Result<Vec<AccountInfo>, EpicAPIError>
pub async fn try_account_ids_details( &mut self, ids: Vec<String>, ) -> Result<Vec<AccountInfo>, EpicAPIError>
Like account_ids_details, but returns a Result instead of swallowing errors.
Sourcepub async fn account_ids_details(
&mut self,
ids: Vec<String>,
) -> Option<Vec<AccountInfo>>
pub async fn account_ids_details( &mut self, ids: Vec<String>, ) -> Option<Vec<AccountInfo>>
Bulk lookup of account IDs to display names.
Returns None on API errors.
Sourcepub async fn try_account_friends(
&mut self,
include_pending: bool,
) -> Result<Vec<Friend>, EpicAPIError>
pub async fn try_account_friends( &mut self, include_pending: bool, ) -> Result<Vec<Friend>, EpicAPIError>
Like account_friends, but returns a Result instead of swallowing errors.
Sourcepub async fn account_friends(
&mut self,
include_pending: bool,
) -> Option<Vec<Friend>>
pub async fn account_friends( &mut self, include_pending: bool, ) -> Option<Vec<Friend>>
Fetch friends list (including pending requests if include_pending is true).
Returns None on API errors.
Sourcepub async fn try_game_token(&mut self) -> Result<GameToken, EpicAPIError>
pub async fn try_game_token(&mut self) -> Result<GameToken, EpicAPIError>
Like game_token, but returns a Result instead of swallowing errors.
Sourcepub async fn game_token(&mut self) -> Option<GameToken>
pub async fn game_token(&mut self) -> Option<GameToken>
Fetch a short-lived exchange code for game launches.
Returns None on API errors.
Sourcepub async fn try_ownership_token(
&mut self,
asset: &EpicAsset,
) -> Result<String, EpicAPIError>
pub async fn try_ownership_token( &mut self, asset: &EpicAsset, ) -> Result<String, EpicAPIError>
Like ownership_token, but returns a Result instead of swallowing errors.
Sourcepub async fn ownership_token(&mut self, asset: &EpicAsset) -> Option<String>
pub async fn ownership_token(&mut self, asset: &EpicAsset) -> Option<String>
Fetch a JWT proving ownership of an asset.
Returns None on API errors.
Sourcepub async fn try_user_entitlements(
&mut self,
) -> Result<Vec<Entitlement>, EpicAPIError>
pub async fn try_user_entitlements( &mut self, ) -> Result<Vec<Entitlement>, EpicAPIError>
Like user_entitlements, but returns a Result instead of swallowing errors.
Sourcepub async fn user_entitlements(&mut self) -> Vec<Entitlement>
pub async fn user_entitlements(&mut self) -> Vec<Entitlement>
Fetch all user entitlements (games, DLC, subscriptions).
Returns empty Vec on API errors.
Sourcepub async fn try_library_items(
&mut self,
include_metadata: bool,
) -> Result<Library, EpicAPIError>
pub async fn try_library_items( &mut self, include_metadata: bool, ) -> Result<Library, EpicAPIError>
Like library_items, but returns a Result instead of swallowing errors.
Sourcepub async fn library_items(&mut self, include_metadata: bool) -> Option<Library>
pub async fn library_items(&mut self, include_metadata: bool) -> Option<Library>
Fetch the user library with optional metadata.
Paginates internally and returns all records at once. Returns None on API errors.
Sourcepub async fn try_fab_library_items(
&mut self,
account_id: String,
) -> Result<FabLibrary, EpicAPIError>
pub async fn try_fab_library_items( &mut self, account_id: String, ) -> Result<FabLibrary, EpicAPIError>
Like fab_library_items, but returns a Result instead of swallowing errors.
Sourcepub async fn fab_library_items(
&mut self,
account_id: String,
) -> Option<FabLibrary>
pub async fn fab_library_items( &mut self, account_id: String, ) -> Option<FabLibrary>
Fetch the user Fab library.
Paginates internally and returns all records at once. Returns None on API errors.
Sourcepub async fn asset_download_manifests(
&self,
manifest: AssetManifest,
) -> Vec<DownloadManifest>
pub async fn asset_download_manifests( &self, manifest: AssetManifest, ) -> Vec<DownloadManifest>
Parse download manifests from all CDN mirrors.
Fetches from all mirrors, parses binary/JSON format, and populates custom fields
(BaseUrl, CatalogItemId, etc.). Returns empty Vec on API errors.
Sourcepub async fn fab_download_manifest(
&self,
download_info: DownloadInfo,
distribution_point_url: &str,
) -> Result<DownloadManifest, EpicAPIError>
pub async fn fab_download_manifest( &self, download_info: DownloadInfo, distribution_point_url: &str, ) -> Result<DownloadManifest, EpicAPIError>
Parse a Fab download manifest from a specific distribution point.
Checks signature expiration before fetching. Returns Result to expose timeout errors.
Sourcepub async fn try_auth_client_credentials(
&mut self,
) -> Result<bool, EpicAPIError>
pub async fn try_auth_client_credentials( &mut self, ) -> Result<bool, EpicAPIError>
Like auth_client_credentials, but returns a Result instead of swallowing errors.
Sourcepub async fn auth_client_credentials(&mut self) -> bool
pub async fn auth_client_credentials(&mut self) -> bool
Authenticate with client credentials (app-level, no user context).
Uses the launcher’s public client ID/secret to obtain an access token without any user interaction. The resulting session has limited permissions — it can query public endpoints (catalog, service status, currencies) but cannot access user-specific data (library, entitlements).
Returns true on success, false on failure.
Sourcepub async fn try_external_auths(
&self,
account_id: &str,
) -> Result<Vec<ExternalAuth>, EpicAPIError>
pub async fn try_external_auths( &self, account_id: &str, ) -> Result<Vec<ExternalAuth>, EpicAPIError>
Like external_auths, but returns a Result instead of swallowing errors.
Sourcepub async fn external_auths(
&self,
account_id: &str,
) -> Option<Vec<ExternalAuth>>
pub async fn external_auths( &self, account_id: &str, ) -> Option<Vec<ExternalAuth>>
Fetch external auth connections linked to an account.
Returns linked platform accounts (Steam, PSN, Xbox, Nintendo, etc.) with external display names and account IDs. Requires a valid user session.
Returns None on API errors.
Sourcepub async fn try_sso_domains(&self) -> Result<Vec<String>, EpicAPIError>
pub async fn try_sso_domains(&self) -> Result<Vec<String>, EpicAPIError>
Like sso_domains, but returns a Result instead of swallowing errors.
Sourcepub async fn sso_domains(&self) -> Option<Vec<String>>
pub async fn sso_domains(&self) -> Option<Vec<String>>
Fetch the list of SSO (Single Sign-On) domains.
Returns domain strings that support Epic’s SSO flow. Used by the launcher to determine which domains can share authentication cookies.
Returns None on API errors.
Sourcepub async fn try_catalog_items(
&self,
namespace: &str,
start: i64,
count: i64,
) -> Result<CatalogItemPage, EpicAPIError>
pub async fn try_catalog_items( &self, namespace: &str, start: i64, count: i64, ) -> Result<CatalogItemPage, EpicAPIError>
Like catalog_items, but returns a Result instead of swallowing errors.
Sourcepub async fn catalog_items(
&self,
namespace: &str,
start: i64,
count: i64,
) -> Option<CatalogItemPage>
pub async fn catalog_items( &self, namespace: &str, start: i64, count: i64, ) -> Option<CatalogItemPage>
Fetch paginated catalog items for a namespace.
Queries the Epic catalog service for items within a given namespace
(e.g., a game’s namespace). Results are paginated — use start and
count to page through. Each CatalogItemPage includes a paging
field with the total count.
Returns None on API errors.
Sourcepub async fn try_catalog_offers(
&self,
namespace: &str,
start: i64,
count: i64,
) -> Result<CatalogOfferPage, EpicAPIError>
pub async fn try_catalog_offers( &self, namespace: &str, start: i64, count: i64, ) -> Result<CatalogOfferPage, EpicAPIError>
Like catalog_offers, but returns a Result instead of swallowing errors.
Sourcepub async fn catalog_offers(
&self,
namespace: &str,
start: i64,
count: i64,
) -> Option<CatalogOfferPage>
pub async fn catalog_offers( &self, namespace: &str, start: i64, count: i64, ) -> Option<CatalogOfferPage>
Fetch paginated catalog offers for a namespace.
Queries the Epic catalog service for offers (purchasable items) within
a namespace. Offers include pricing metadata, seller info, and linked
catalog items. Use start and count to paginate.
Returns None on API errors.
Sourcepub async fn try_bulk_catalog_items(
&self,
items: &[(&str, &str)],
) -> Result<HashMap<String, HashMap<String, AssetInfo>>, EpicAPIError>
pub async fn try_bulk_catalog_items( &self, items: &[(&str, &str)], ) -> Result<HashMap<String, HashMap<String, AssetInfo>>, EpicAPIError>
Like bulk_catalog_items, but returns a Result instead of swallowing errors.
Sourcepub async fn bulk_catalog_items(
&self,
items: &[(&str, &str)],
) -> Option<HashMap<String, HashMap<String, AssetInfo>>>
pub async fn bulk_catalog_items( &self, items: &[(&str, &str)], ) -> Option<HashMap<String, HashMap<String, AssetInfo>>>
Bulk fetch catalog items across multiple namespaces.
Accepts a slice of (namespace, item_id) pairs and returns them grouped
by namespace → item_id → AssetInfo. Useful for resolving catalog
metadata for items from different games in a single request.
Returns None on API errors.
Sourcepub async fn try_currencies(
&self,
start: i64,
count: i64,
) -> Result<CurrencyPage, EpicAPIError>
pub async fn try_currencies( &self, start: i64, count: i64, ) -> Result<CurrencyPage, EpicAPIError>
Like currencies, but returns a Result instead of swallowing errors.
Sourcepub async fn currencies(&self, start: i64, count: i64) -> Option<CurrencyPage>
pub async fn currencies(&self, start: i64, count: i64) -> Option<CurrencyPage>
Fetch available currencies from the Epic catalog.
Returns paginated currency definitions including code, symbol, and
decimal precision. Use start and count to paginate.
Returns None on API errors.
Sourcepub async fn try_library_state_token_status(
&self,
token_id: &str,
) -> Result<bool, EpicAPIError>
pub async fn try_library_state_token_status( &self, token_id: &str, ) -> Result<bool, EpicAPIError>
Like library_state_token_status, but returns a Result instead of swallowing errors.
Sourcepub async fn library_state_token_status(&self, token_id: &str) -> Option<bool>
pub async fn library_state_token_status(&self, token_id: &str) -> Option<bool>
Check the validity of a library state token.
Returns Some(true) if the token is still valid, Some(false) if
expired or invalid, or None on API errors. Library state tokens are
used to detect changes to the user’s library since the last sync.
Returns None on API errors.
Sourcepub async fn try_service_status(
&self,
service_id: &str,
) -> Result<Vec<ServiceStatus>, EpicAPIError>
pub async fn try_service_status( &self, service_id: &str, ) -> Result<Vec<ServiceStatus>, EpicAPIError>
Like service_status, but returns a Result instead of swallowing errors.
Sourcepub async fn service_status(
&self,
service_id: &str,
) -> Option<Vec<ServiceStatus>>
pub async fn service_status( &self, service_id: &str, ) -> Option<Vec<ServiceStatus>>
Fetch service status from Epic’s lightswitch API.
Returns the operational status of an Epic online service (e.g., a game’s backend). The response includes whether the service is UP/DOWN, any maintenance message, and whether the current user is banned.
Returns None on API errors.
Sourcepub async fn try_offer_prices(
&self,
namespace: &str,
offer_ids: &[String],
country: &str,
) -> Result<PriceResponse, EpicAPIError>
pub async fn try_offer_prices( &self, namespace: &str, offer_ids: &[String], country: &str, ) -> Result<PriceResponse, EpicAPIError>
Like offer_prices, but returns a Result instead of swallowing errors.
Sourcepub async fn offer_prices(
&self,
namespace: &str,
offer_ids: &[String],
country: &str,
) -> Option<PriceResponse>
pub async fn offer_prices( &self, namespace: &str, offer_ids: &[String], country: &str, ) -> Option<PriceResponse>
Fetch offer prices from Epic’s price engine.
Queries current pricing for one or more offers within a namespace, localized to a specific country. The response includes original price, discount price, and pre-formatted display strings.
Returns None on API errors.
Sourcepub async fn try_quick_purchase(
&self,
namespace: &str,
offer_id: &str,
) -> Result<QuickPurchaseResponse, EpicAPIError>
pub async fn try_quick_purchase( &self, namespace: &str, offer_id: &str, ) -> Result<QuickPurchaseResponse, EpicAPIError>
Like quick_purchase, but returns a Result instead of swallowing errors.
Sourcepub async fn quick_purchase(
&self,
namespace: &str,
offer_id: &str,
) -> Option<QuickPurchaseResponse>
pub async fn quick_purchase( &self, namespace: &str, offer_id: &str, ) -> Option<QuickPurchaseResponse>
Execute a quick purchase (typically for free game claims).
Initiates a purchase order for a free offer. The response contains the order ID and its processing status. For paid offers, use the full checkout flow in the Epic Games launcher instead.
Returns None on API errors.
Sourcepub async fn try_billing_account(&self) -> Result<BillingAccount, EpicAPIError>
pub async fn try_billing_account(&self) -> Result<BillingAccount, EpicAPIError>
Like billing_account, but returns a Result instead of swallowing errors.
Sourcepub async fn billing_account(&self) -> Option<BillingAccount>
pub async fn billing_account(&self) -> Option<BillingAccount>
Fetch the default billing account for payment processing.
Returns the account’s billing country, which is used to determine regional pricing and payment availability.
Returns None on API errors.
Sourcepub async fn update_presence(
&self,
session_id: &str,
body: &PresenceUpdate,
) -> Result<(), EpicAPIError>
pub async fn update_presence( &self, session_id: &str, body: &PresenceUpdate, ) -> Result<(), EpicAPIError>
Update the user’s presence status.
Sends a PATCH request to update the user’s online presence (e.g.,
“online”, “away”) and optionally set an activity with custom properties.
The session_id is the OAuth session token from login. Returns Ok(())
on success (204 No Content) or an EpicAPIError on failure.
Sourcepub async fn try_fab_file_download_info(
&self,
listing_id: &str,
format_id: &str,
file_id: &str,
) -> Result<DownloadInfo, EpicAPIError>
pub async fn try_fab_file_download_info( &self, listing_id: &str, format_id: &str, file_id: &str, ) -> Result<DownloadInfo, EpicAPIError>
Like fab_file_download_info, but returns a Result instead of swallowing errors.
Sourcepub async fn fab_file_download_info(
&self,
listing_id: &str,
format_id: &str,
file_id: &str,
) -> Option<DownloadInfo>
pub async fn fab_file_download_info( &self, listing_id: &str, format_id: &str, file_id: &str, ) -> Option<DownloadInfo>
Fetch download info for a specific file within a Fab listing.
Returns signed DownloadInfo for a single file identified by
listing_id, format_id, and file_id. Use this for targeted
downloads of individual files from a Fab asset rather than fetching
the entire asset manifest.
Returns None on API errors.
Sourcepub async fn cloud_save_list(
&self,
app_name: Option<&str>,
manifests: bool,
) -> Result<CloudSaveResponse, EpicAPIError>
pub async fn cloud_save_list( &self, app_name: Option<&str>, manifests: bool, ) -> Result<CloudSaveResponse, EpicAPIError>
List cloud save files for the logged-in user.
If app_name is provided, lists saves for that specific game.
If manifests is true (only relevant when app_name is set), lists manifest files.
Sourcepub async fn cloud_save_query(
&self,
app_name: &str,
filenames: &[String],
) -> Result<CloudSaveResponse, EpicAPIError>
pub async fn cloud_save_query( &self, app_name: &str, filenames: &[String], ) -> Result<CloudSaveResponse, EpicAPIError>
Query cloud save files by specific filenames.
Returns metadata including read/write links for the specified files.
Sourcepub async fn cloud_save_delete(&self, path: &str) -> Result<(), EpicAPIError>
pub async fn cloud_save_delete(&self, path: &str) -> Result<(), EpicAPIError>
Delete a cloud save file by its storage path.
Sourcepub async fn artifact_service_ticket(
&self,
sandbox_id: &str,
artifact_id: &str,
label: Option<&str>,
platform: Option<&str>,
) -> Result<ArtifactServiceTicket, EpicAPIError>
pub async fn artifact_service_ticket( &self, sandbox_id: &str, artifact_id: &str, label: Option<&str>, platform: Option<&str>, ) -> Result<ArtifactServiceTicket, EpicAPIError>
Fetch an artifact service ticket for manifest retrieval via EOS Helper.
The sandbox_id is typically the game’s namespace and artifact_id
is the app name. Returns a signed ticket for use with
game_manifest_by_ticket.
Sourcepub async fn game_manifest_by_ticket(
&self,
artifact_id: &str,
signed_ticket: &str,
label: Option<&str>,
platform: Option<&str>,
) -> Result<AssetManifest, EpicAPIError>
pub async fn game_manifest_by_ticket( &self, artifact_id: &str, signed_ticket: &str, label: Option<&str>, platform: Option<&str>, ) -> Result<AssetManifest, EpicAPIError>
Fetch a game manifest using a signed artifact service ticket.
Alternative to asset_manifest using ticket-based
auth from the EOS Helper service.
Sourcepub async fn launcher_manifests(
&self,
platform: Option<&str>,
label: Option<&str>,
) -> Result<AssetManifest, EpicAPIError>
pub async fn launcher_manifests( &self, platform: Option<&str>, label: Option<&str>, ) -> Result<AssetManifest, EpicAPIError>
Fetch launcher manifests for self-update checks.
Sourcepub async fn delta_manifest(
&self,
base_url: &str,
old_build_id: &str,
new_build_id: &str,
) -> Option<Vec<u8>>
pub async fn delta_manifest( &self, base_url: &str, old_build_id: &str, new_build_id: &str, ) -> Option<Vec<u8>>
Try to fetch a delta manifest for optimized patching between builds.
Returns None if no delta is available or the builds are identical.
Sourcepub async fn auth_sid(&mut self, sid: &str) -> Result<bool, EpicAPIError>
pub async fn auth_sid(&mut self, sid: &str) -> Result<bool, EpicAPIError>
Authenticate via session ID (SID) from the Epic web login flow.
Performs the multi-step web exchange: set-sid → CSRF → exchange code,
then starts a session with the resulting code. Returns true on success.
Sourcepub async fn store_get_uplay_codes(
&self,
) -> Result<UplayGraphQLResponse<UplayCodesResult>, EpicAPIError>
pub async fn store_get_uplay_codes( &self, ) -> Result<UplayGraphQLResponse<UplayCodesResult>, EpicAPIError>
Fetch Uplay codes linked to the user’s Epic account.
Sourcepub async fn store_claim_uplay_code(
&self,
uplay_account_id: &str,
game_id: &str,
) -> Result<UplayGraphQLResponse<UplayClaimResult>, EpicAPIError>
pub async fn store_claim_uplay_code( &self, uplay_account_id: &str, game_id: &str, ) -> Result<UplayGraphQLResponse<UplayClaimResult>, EpicAPIError>
Claim a Uplay code for a specific game.
Sourcepub async fn store_redeem_uplay_codes(
&self,
uplay_account_id: &str,
) -> Result<UplayGraphQLResponse<UplayRedeemResult>, EpicAPIError>
pub async fn store_redeem_uplay_codes( &self, uplay_account_id: &str, ) -> Result<UplayGraphQLResponse<UplayRedeemResult>, EpicAPIError>
Redeem all pending Uplay codes for the user’s account.
Sourcepub async fn cosmos_session_setup(
&self,
exchange_code: &str,
) -> Result<CosmosAuthResponse, EpicAPIError>
pub async fn cosmos_session_setup( &self, exchange_code: &str, ) -> Result<CosmosAuthResponse, EpicAPIError>
Set up a Cosmos cookie session from an exchange code.
Typically called with a code from game_token().
Sourcepub async fn cosmos_auth_upgrade(
&self,
) -> Result<CosmosAuthResponse, EpicAPIError>
pub async fn cosmos_auth_upgrade( &self, ) -> Result<CosmosAuthResponse, EpicAPIError>
Upgrade bearer token to Cosmos session (step 5 of session setup).
Sourcepub async fn cosmos_eula_check(
&self,
eula_id: &str,
locale: &str,
) -> Option<bool>
pub async fn cosmos_eula_check( &self, eula_id: &str, locale: &str, ) -> Option<bool>
Check if a EULA has been accepted. Returns None on error.
Sourcepub async fn try_cosmos_eula_check(
&self,
eula_id: &str,
locale: &str,
) -> Result<CosmosEulaResponse, EpicAPIError>
pub async fn try_cosmos_eula_check( &self, eula_id: &str, locale: &str, ) -> Result<CosmosEulaResponse, EpicAPIError>
Check if a EULA has been accepted. Returns full Result.
Sourcepub async fn cosmos_eula_accept(
&self,
eula_id: &str,
locale: &str,
version: u32,
) -> Option<bool>
pub async fn cosmos_eula_accept( &self, eula_id: &str, locale: &str, version: u32, ) -> Option<bool>
Accept a EULA. Returns None on error.
Sourcepub async fn try_cosmos_eula_accept(
&self,
eula_id: &str,
locale: &str,
version: u32,
) -> Result<CosmosEulaResponse, EpicAPIError>
pub async fn try_cosmos_eula_accept( &self, eula_id: &str, locale: &str, version: u32, ) -> Result<CosmosEulaResponse, EpicAPIError>
Accept a EULA. Returns full Result.
Sourcepub async fn cosmos_account(&self) -> Option<CosmosAccount>
pub async fn cosmos_account(&self) -> Option<CosmosAccount>
Get Cosmos account details. Returns None on error.
Sourcepub async fn try_cosmos_account(&self) -> Result<CosmosAccount, EpicAPIError>
pub async fn try_cosmos_account(&self) -> Result<CosmosAccount, EpicAPIError>
Get Cosmos account details. Returns full Result.
Sourcepub async fn engine_versions(
&self,
platform: &str,
) -> Option<EngineBlobsResponse>
pub async fn engine_versions( &self, platform: &str, ) -> Option<EngineBlobsResponse>
Fetch engine version download blobs for a platform. Returns None on error.
Sourcepub async fn try_engine_versions(
&self,
platform: &str,
) -> Result<EngineBlobsResponse, EpicAPIError>
pub async fn try_engine_versions( &self, platform: &str, ) -> Result<EngineBlobsResponse, EpicAPIError>
Fetch engine version download blobs. Returns full Result.
Sourcepub async fn fab_search(
&self,
params: &FabSearchParams,
) -> Option<FabSearchResults>
pub async fn fab_search( &self, params: &FabSearchParams, ) -> Option<FabSearchResults>
Search Fab listings. Returns None on error.
Sourcepub async fn try_fab_search(
&self,
params: &FabSearchParams,
) -> Result<FabSearchResults, EpicAPIError>
pub async fn try_fab_search( &self, params: &FabSearchParams, ) -> Result<FabSearchResults, EpicAPIError>
Search Fab listings. Returns full Result.
Sourcepub async fn fab_listing(&self, uid: &str) -> Option<FabListingDetail>
pub async fn fab_listing(&self, uid: &str) -> Option<FabListingDetail>
Get full listing detail. Returns None on error.
Sourcepub async fn try_fab_listing(
&self,
uid: &str,
) -> Result<FabListingDetail, EpicAPIError>
pub async fn try_fab_listing( &self, uid: &str, ) -> Result<FabListingDetail, EpicAPIError>
Get full listing detail. Returns full Result.
Sourcepub async fn fab_listing_ue_formats(
&self,
uid: &str,
) -> Option<Vec<FabListingUeFormat>>
pub async fn fab_listing_ue_formats( &self, uid: &str, ) -> Option<Vec<FabListingUeFormat>>
Get UE-specific format details for a listing. Returns None on error.
Sourcepub async fn try_fab_listing_ue_formats(
&self,
uid: &str,
) -> Result<Vec<FabListingUeFormat>, EpicAPIError>
pub async fn try_fab_listing_ue_formats( &self, uid: &str, ) -> Result<Vec<FabListingUeFormat>, EpicAPIError>
Get UE-specific format details. Returns full Result.
Sourcepub async fn fab_listing_state(&self, uid: &str) -> Option<FabListingState>
pub async fn fab_listing_state(&self, uid: &str) -> Option<FabListingState>
Get listing state (ownership, wishlist, review). Returns None on error.
Sourcepub async fn try_fab_listing_state(
&self,
uid: &str,
) -> Result<FabListingState, EpicAPIError>
pub async fn try_fab_listing_state( &self, uid: &str, ) -> Result<FabListingState, EpicAPIError>
Get listing state. Returns full Result.
Sourcepub async fn fab_listing_states_bulk(
&self,
listing_ids: &[&str],
) -> Option<Vec<FabListingState>>
pub async fn fab_listing_states_bulk( &self, listing_ids: &[&str], ) -> Option<Vec<FabListingState>>
Bulk check listing states. Returns None on error.
Sourcepub async fn try_fab_listing_states_bulk(
&self,
listing_ids: &[&str],
) -> Result<Vec<FabListingState>, EpicAPIError>
pub async fn try_fab_listing_states_bulk( &self, listing_ids: &[&str], ) -> Result<Vec<FabListingState>, EpicAPIError>
Bulk check listing states. Returns full Result.
Sourcepub async fn fab_bulk_prices(
&self,
offer_ids: &[&str],
) -> Option<FabBulkPricesResponse>
pub async fn fab_bulk_prices( &self, offer_ids: &[&str], ) -> Option<FabBulkPricesResponse>
Bulk fetch pricing for multiple offer IDs. Returns None on error.
Sourcepub async fn try_fab_bulk_prices(
&self,
offer_ids: &[&str],
) -> Result<FabBulkPricesResponse, EpicAPIError>
pub async fn try_fab_bulk_prices( &self, offer_ids: &[&str], ) -> Result<FabBulkPricesResponse, EpicAPIError>
Bulk fetch pricing. Returns full Result.
Sourcepub async fn fab_listing_ownership(&self, uid: &str) -> Option<FabOwnership>
pub async fn fab_listing_ownership(&self, uid: &str) -> Option<FabOwnership>
Get listing ownership info. Returns None on error.
Sourcepub async fn try_fab_listing_ownership(
&self,
uid: &str,
) -> Result<FabOwnership, EpicAPIError>
pub async fn try_fab_listing_ownership( &self, uid: &str, ) -> Result<FabOwnership, EpicAPIError>
Get listing ownership info. Returns full Result.
Sourcepub async fn fab_listing_prices(&self, uid: &str) -> Option<Vec<FabPriceInfo>>
pub async fn fab_listing_prices(&self, uid: &str) -> Option<Vec<FabPriceInfo>>
Get pricing for a specific listing. Returns None on error.
Sourcepub async fn try_fab_listing_prices(
&self,
uid: &str,
) -> Result<Vec<FabPriceInfo>, EpicAPIError>
pub async fn try_fab_listing_prices( &self, uid: &str, ) -> Result<Vec<FabPriceInfo>, EpicAPIError>
Get pricing for a specific listing. Returns full Result.
Sourcepub async fn fab_listing_reviews(
&self,
uid: &str,
sort_by: Option<&str>,
cursor: Option<&str>,
) -> Option<FabReviewsResponse>
pub async fn fab_listing_reviews( &self, uid: &str, sort_by: Option<&str>, cursor: Option<&str>, ) -> Option<FabReviewsResponse>
Get reviews for a listing. Returns None on error.
Sourcepub async fn try_fab_listing_reviews(
&self,
uid: &str,
sort_by: Option<&str>,
cursor: Option<&str>,
) -> Result<FabReviewsResponse, EpicAPIError>
pub async fn try_fab_listing_reviews( &self, uid: &str, sort_by: Option<&str>, cursor: Option<&str>, ) -> Result<FabReviewsResponse, EpicAPIError>
Get reviews for a listing. Returns full Result.
Sourcepub async fn fab_licenses(&self) -> Option<Vec<FabLicenseType>>
pub async fn fab_licenses(&self) -> Option<Vec<FabLicenseType>>
Fetch available license types. Returns None on error.
Sourcepub async fn try_fab_licenses(
&self,
) -> Result<Vec<FabLicenseType>, EpicAPIError>
pub async fn try_fab_licenses( &self, ) -> Result<Vec<FabLicenseType>, EpicAPIError>
Fetch available license types. Returns full Result.
Sourcepub async fn fab_format_groups(&self) -> Option<Vec<FabFormatGroup>>
pub async fn fab_format_groups(&self) -> Option<Vec<FabFormatGroup>>
Fetch asset format groups. Returns None on error.
Sourcepub async fn try_fab_format_groups(
&self,
) -> Result<Vec<FabFormatGroup>, EpicAPIError>
pub async fn try_fab_format_groups( &self, ) -> Result<Vec<FabFormatGroup>, EpicAPIError>
Fetch asset format groups. Returns full Result.
Sourcepub async fn fab_tag_groups(&self) -> Option<Vec<FabTagGroup>>
pub async fn fab_tag_groups(&self) -> Option<Vec<FabTagGroup>>
Fetch tag groups with nested tags. Returns None on error.
Sourcepub async fn try_fab_tag_groups(&self) -> Result<Vec<FabTagGroup>, EpicAPIError>
pub async fn try_fab_tag_groups(&self) -> Result<Vec<FabTagGroup>, EpicAPIError>
Fetch tag groups with nested tags. Returns full Result.
Sourcepub async fn fab_ue_versions(&self) -> Option<Vec<String>>
pub async fn fab_ue_versions(&self) -> Option<Vec<String>>
Fetch available UE versions. Returns None on error.
Sourcepub async fn try_fab_ue_versions(&self) -> Result<Vec<String>, EpicAPIError>
pub async fn try_fab_ue_versions(&self) -> Result<Vec<String>, EpicAPIError>
Fetch available UE versions. Returns full Result.
Sourcepub async fn fab_channel(&self, slug: &str) -> Option<FabChannel>
pub async fn fab_channel(&self, slug: &str) -> Option<FabChannel>
Fetch channel info by slug. Returns None on error.
Sourcepub async fn try_fab_channel(
&self,
slug: &str,
) -> Result<FabChannel, EpicAPIError>
pub async fn try_fab_channel( &self, slug: &str, ) -> Result<FabChannel, EpicAPIError>
Fetch channel info by slug. Returns full Result.
Sourcepub async fn fab_library_entitlements(
&self,
params: &FabEntitlementSearchParams,
) -> Option<FabEntitlementResults>
pub async fn fab_library_entitlements( &self, params: &FabEntitlementSearchParams, ) -> Option<FabEntitlementResults>
Search library entitlements. Returns None on error.
Sourcepub async fn try_fab_library_entitlements(
&self,
params: &FabEntitlementSearchParams,
) -> Result<FabEntitlementResults, EpicAPIError>
pub async fn try_fab_library_entitlements( &self, params: &FabEntitlementSearchParams, ) -> Result<FabEntitlementResults, EpicAPIError>
Search library entitlements. Returns full Result.
Sourcepub async fn fab_csrf(&self) -> Result<(), EpicAPIError>
pub async fn fab_csrf(&self) -> Result<(), EpicAPIError>
Initialize Fab CSRF token. Sets cookies on the shared HTTP client.
Sourcepub async fn fab_user_context(&self) -> Option<FabUserContext>
pub async fn fab_user_context(&self) -> Option<FabUserContext>
Fetch Fab user context. Returns None on error.
Sourcepub async fn try_fab_user_context(&self) -> Result<FabUserContext, EpicAPIError>
pub async fn try_fab_user_context(&self) -> Result<FabUserContext, EpicAPIError>
Fetch Fab user context. Returns full Result.
Sourcepub async fn fab_add_to_library(
&self,
listing_uid: &str,
) -> Result<(), EpicAPIError>
pub async fn fab_add_to_library( &self, listing_uid: &str, ) -> Result<(), EpicAPIError>
Add a free listing to the user’s library. Returns Ok(()) on success.
Sourcepub async fn fab_listing_formats(
&self,
listing_uid: &str,
) -> Option<Vec<FabListingFormat>>
pub async fn fab_listing_formats( &self, listing_uid: &str, ) -> Option<Vec<FabListingFormat>>
Fetch all available asset formats for a listing. Returns None on error.
Sourcepub async fn try_fab_listing_formats(
&self,
listing_uid: &str,
) -> Result<Vec<FabListingFormat>, EpicAPIError>
pub async fn try_fab_listing_formats( &self, listing_uid: &str, ) -> Result<Vec<FabListingFormat>, EpicAPIError>
Fetch all available asset formats. Returns full Result.
Sourcepub async fn cosmos_policy_aodc(&self) -> Option<CosmosPolicyAodc>
pub async fn cosmos_policy_aodc(&self) -> Option<CosmosPolicyAodc>
Check Age of Digital Consent policy. Returns None on error.
Sourcepub async fn try_cosmos_policy_aodc(
&self,
) -> Result<CosmosPolicyAodc, EpicAPIError>
pub async fn try_cosmos_policy_aodc( &self, ) -> Result<CosmosPolicyAodc, EpicAPIError>
Check Age of Digital Consent policy. Returns full Result.
Sourcepub async fn cosmos_comm_opt_in(&self, setting: &str) -> Option<CosmosCommOptIn>
pub async fn cosmos_comm_opt_in(&self, setting: &str) -> Option<CosmosCommOptIn>
Check communication opt-in status. Returns None on error.
Sourcepub async fn try_cosmos_comm_opt_in(
&self,
setting: &str,
) -> Result<CosmosCommOptIn, EpicAPIError>
pub async fn try_cosmos_comm_opt_in( &self, setting: &str, ) -> Result<CosmosCommOptIn, EpicAPIError>
Check communication opt-in status. Returns full Result.
Sourcepub async fn cosmos_search(
&self,
query: &str,
slug: Option<&str>,
locale: Option<&str>,
filter: Option<&str>,
) -> Option<CosmosSearchResults>
pub async fn cosmos_search( &self, query: &str, slug: Option<&str>, locale: Option<&str>, filter: Option<&str>, ) -> Option<CosmosSearchResults>
Search unrealengine.com content. Requires an active Cosmos session.
Returns None on any error.
Sourcepub async fn try_cosmos_search(
&self,
query: &str,
slug: Option<&str>,
locale: Option<&str>,
filter: Option<&str>,
) -> Result<CosmosSearchResults, EpicAPIError>
pub async fn try_cosmos_search( &self, query: &str, slug: Option<&str>, locale: Option<&str>, filter: Option<&str>, ) -> Result<CosmosSearchResults, EpicAPIError>
Like cosmos_search, but returns a Result instead of swallowing errors.
Sourcepub async fn verify_access_token(
&self,
include_perms: bool,
) -> Option<TokenVerification>
pub async fn verify_access_token( &self, include_perms: bool, ) -> Option<TokenVerification>
Verify the current OAuth token and get account/session info.
Returns None on any error.
Sourcepub async fn try_verify_access_token(
&self,
include_perms: bool,
) -> Result<TokenVerification, EpicAPIError>
pub async fn try_verify_access_token( &self, include_perms: bool, ) -> Result<TokenVerification, EpicAPIError>
Like verify_access_token, but returns a Result instead of swallowing errors.