[][src]Struct tarkov::Tarkov

pub struct Tarkov {
    pub hwid: String,
    pub session: String,
    // some fields omitted
}

Client for the EFT API.

Fields

hwid: String

Hardware ID

session: String

Session cookie

Methods

impl Tarkov[src]

pub async fn keep_alive<'_>(&'_ self) -> Result<()>[src]

Keep the current session alive. Session expires after 30 seconds of idling.

impl Tarkov[src]

pub async fn get_items<'_>(&'_ self) -> Result<HashMap<String, Item>>[src]

Get a list of all in-game items.

pub async fn get_item_prices<'_>(&'_ self) -> Result<HashMap<String, u64>>[src]

Get a list of all in-game item prices.

pub async fn get_locations<'_>(&'_ self) -> Result<Locations>[src]

Get a list of all locations/maps.

pub async fn get_weather<'_>(&'_ self) -> Result<Weather>[src]

Get the current forecast and time.

pub async fn get_i18n<'_, '_>(
    &'_ self,
    language: &'_ str
) -> Result<Localization>
[src]

Get the localization table. Pass a valid ISO 639-1 language code.

impl Tarkov[src]

pub async fn get_friends<'_>(&'_ self) -> Result<Friends>[src]

Get a list of account's friends.

impl Tarkov[src]

pub async fn get_profiles<'_>(&'_ self) -> Result<Vec<Profile>>[src]

Get a list of account's profiles.

pub async fn select_profile<'_, '_>(&'_ self, user_id: &'_ str) -> Result<()>[src]

Select a profile by user ID.

impl Tarkov[src]

pub async fn search_market<'a, '_, '_>(
    &'_ self,
    page: u64,
    limit: u64,
    filter: MarketFilter<'_>
) -> Result<SearchResult>
[src]

Search the flea market.

pub async fn get_item_price<'_, '_>(
    &'_ self,
    schema_id: &'_ str
) -> Result<Price>
[src]

Get the item price data from the flea market.

pub async fn buy_item<'_, '_, '_>(
    &'_ self,
    offer_id: &'_ str,
    quantity: u64,
    barter_items: &'_ [BarterItem]
) -> Result<InventoryUpdate>
[src]

Buy items from the flea market.

pub async fn offer_item<'_, '_, '_, '_>(
    &'_ self,
    items: &'_ [&'_ str],
    requirements: &'_ [Requirement],
    sell_all: bool
) -> Result<InventoryUpdate>
[src]

List an item for sale on the flea market.

impl Tarkov[src]

pub async fn get_traders<'_>(&'_ self) -> Result<Vec<Trader>>[src]

Get a list of all traders.

pub async fn get_trader<'_, '_>(&'_ self, trader_id: &'_ str) -> Result<Trader>[src]

Get a trader by ID.

pub async fn get_trader_items<'_, '_>(
    &'_ self,
    trader_id: &'_ str
) -> Result<Vec<TraderItem>>
[src]

Get a list of items for sale by trader ID.

pub async fn trade_item<'_, '_, '_, '_>(
    &'_ self,
    trader_id: &'_ str,
    item_id: &'_ str,
    quantity: u64,
    barter_items: &'_ [BarterItem]
) -> Result<InventoryUpdate>
[src]

Trade items with traders.

All trades, including cash trades, are considered bartering. barter_items expects a list of items from your inventory that matches the item price.

pub async fn sell_item<'_, '_, '_>(
    &'_ self,
    trader_id: &'_ str,
    item_id: &'_ str,
    quantity: u64
) -> Result<InventoryUpdate>
[src]

Sell items to trader.

impl Tarkov[src]

pub async fn login<'_, '_, '_>(
    email: &'_ str,
    password: &'_ str,
    hwid: &'_ str
) -> Result<Self>
[src]

Login with email and password.

pub async fn login_with_captcha<'_, '_, '_, '_>(
    email: &'_ str,
    password: &'_ str,
    captcha: &'_ str,
    hwid: &'_ str
) -> Result<Self>
[src]

Login with email, password and captcha.

pub async fn login_with_2fa<'_, '_, '_, '_>(
    email: &'_ str,
    password: &'_ str,
    code: &'_ str,
    hwid: &'_ str
) -> Result<Self>
[src]

Login with email, password and 2FA code.

pub async fn from_access_token<'_, '_>(
    access_token: &'_ str,
    hwid: &'_ str
) -> Result<Self>
[src]

Login with a Bearer token.

pub fn from_session(session: &str) -> Self[src]

Login with a cookie session (AKA PHPSESSID).

Auto Trait Implementations

impl !RefUnwindSafe for Tarkov

impl Send for Tarkov

impl Sync for Tarkov

impl Unpin for Tarkov

impl !UnwindSafe for Tarkov

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,