pub struct EpicClient { /* private fields */ }Implementations§
Source§impl EpicClient
impl EpicClient
pub fn new() -> Result<Self>
Sourcepub async fn request_device_auth(&self) -> Result<DeviceAuthResponse>
pub async fn request_device_auth(&self) -> Result<DeviceAuthResponse>
Request device authorization (Step 1 of OAuth device flow)
Sourcepub async fn poll_for_token(
&self,
device_code: &str,
) -> Result<Option<AuthToken>>
pub async fn poll_for_token( &self, device_code: &str, ) -> Result<Option<AuthToken>>
Poll for token using device code (Step 2 of OAuth device flow)
Sourcepub async fn exchange_auth_code(&self, code: &str) -> Result<AuthToken>
pub async fn exchange_auth_code(&self, code: &str) -> Result<AuthToken>
Exchange authorization code for access token
Sourcepub async fn authenticate(&self) -> Result<(String, String, AuthToken)>
pub async fn authenticate(&self) -> Result<(String, String, AuthToken)>
Authenticate with Epic Games using device code flow (combined method for CLI)
Sourcepub async fn refresh_token(&self, refresh_token: &str) -> Result<AuthToken>
pub async fn refresh_token(&self, refresh_token: &str) -> Result<AuthToken>
Refresh an expired access token
Sourcepub async fn get_games(&self, token: &AuthToken) -> Result<Vec<Game>>
pub async fn get_games(&self, token: &AuthToken) -> Result<Vec<Game>>
Get the user’s game library
Sourcepub async fn fetch_catalog_item(
&self,
token: &AuthToken,
namespace: &str,
catalog_item_id: &str,
) -> Result<Game>
pub async fn fetch_catalog_item( &self, token: &AuthToken, namespace: &str, catalog_item_id: &str, ) -> Result<Game>
Fetch catalog item details using REST API (public method)
Sourcepub async fn get_game_manifest(
&self,
token: &AuthToken,
app_name: &str,
) -> Result<String>
pub async fn get_game_manifest( &self, token: &AuthToken, app_name: &str, ) -> Result<String>
Get game manifest URL for download
Sourcepub async fn download_manifest(
&self,
token: &AuthToken,
app_name: &str,
) -> Result<GameManifest>
pub async fn download_manifest( &self, token: &AuthToken, app_name: &str, ) -> Result<GameManifest>
Download and parse game manifest
Sourcepub async fn download_chunk(
&self,
chunk_guid: &str,
_token: &AuthToken,
) -> Result<Vec<u8>>
pub async fn download_chunk( &self, chunk_guid: &str, _token: &AuthToken, ) -> Result<Vec<u8>>
Download a game chunk
Sourcepub async fn check_for_updates(
&self,
token: &AuthToken,
app_name: &str,
current_version: &str,
) -> Result<Option<String>>
pub async fn check_for_updates( &self, token: &AuthToken, app_name: &str, current_version: &str, ) -> Result<Option<String>>
Check for game updates
Sourcepub async fn get_cloud_saves(
&self,
_token: &AuthToken,
app_name: &str,
) -> Result<Vec<CloudSave>>
pub async fn get_cloud_saves( &self, _token: &AuthToken, app_name: &str, ) -> Result<Vec<CloudSave>>
Get cloud saves for a game
Trait Implementations§
Source§impl Debug for EpicClient
impl Debug for EpicClient
Auto Trait Implementations§
impl Freeze for EpicClient
impl !RefUnwindSafe for EpicClient
impl Send for EpicClient
impl Sync for EpicClient
impl Unpin for EpicClient
impl !UnwindSafe for EpicClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().