[−][src]Struct gw2rs::prelude::GW2
The Guild Wars 2 API Wrapper.
Structs of this type provide rust functions mapping to ArenaNet GuildWars 2 API (Version 2). The struct retains the API key to use for authenticated requests, along with the desired Locale.
Almost every method used to interact with the API through this crate is a self method on GW2. Mutator functions have been provided for scenarios where changing the API key or locale is desired, but since the wrapper keeps very little state, it is usually easier to just spawn new instances for one-off calls.
All exposed API functionality is, therefore, built on the requirement that only an immutable reference is necessary once initialized.
Methods
impl GW2
[src]
impl GW2
#[must_use]
pub fn daily_achievements(
&self
) -> impl Future<Item = DailyAchievements, Error = APIError>
[src]
#[must_use]
pub fn daily_achievements(
&self
) -> impl Future<Item = DailyAchievements, Error = APIError>
Retrieves today's daily achievements.
#[must_use]
pub fn daily_achievements_tomorrow(
&self
) -> impl Future<Item = DailyAchievements, Error = APIError>
[src]
#[must_use]
pub fn daily_achievements_tomorrow(
&self
) -> impl Future<Item = DailyAchievements, Error = APIError>
Retrieves tomorrows daily achievements.
#[must_use]
pub fn achievements_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Achievement>, Error = APIError> + 'a
[src]
#[must_use]
pub fn achievements_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Achievement>, Error = APIError> + 'a
Fetches achievements using a slice of u64 identifiers.
#[must_use]
pub fn achievement_categories(
&self
) -> impl Future<Item = Vec<u64>, Error = APIError>
[src]
#[must_use]
pub fn achievement_categories(
&self
) -> impl Future<Item = Vec<u64>, Error = APIError>
Retrieves the identifiers for valid achievement categories.
#[must_use]
pub fn achievement_categories_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<AchievementCategory>, Error = APIError> + 'a
[src]
#[must_use]
pub fn achievement_categories_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<AchievementCategory>, Error = APIError> + 'a
Retrieves achievement categories with the given identifiers.
#[must_use]
pub fn achievement_groups(
&self
) -> impl Future<Item = Vec<AchievementGroupId>, Error = APIError>
[src]
#[must_use]
pub fn achievement_groups(
&self
) -> impl Future<Item = Vec<AchievementGroupId>, Error = APIError>
Retrieves valid achievement group identifiers.
#[must_use]
pub fn achievement_groups_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<AchievementGroup>, Error = APIError> + 'a
[src]
#[must_use]
pub fn achievement_groups_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<AchievementGroup>, Error = APIError> + 'a
Retrieves achievement groups with the given identifiers.
impl GW2
[src]
impl GW2
#[must_use]
pub fn backstory_answers(
&self
) -> impl Future<Item = Vec<BackstoryAnswerId>, Error = APIError>
[src]
#[must_use]
pub fn backstory_answers(
&self
) -> impl Future<Item = Vec<BackstoryAnswerId>, Error = APIError>
Retrieves backstory answer identifiers.
#[must_use]
pub fn backstory_answers_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<BackstoryAnswer>, Error = APIError> + 'a
[src]
#[must_use]
pub fn backstory_answers_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<BackstoryAnswer>, Error = APIError> + 'a
Retrieves backstory answers using the given list of identifiers.
#[must_use]
pub fn backstory_questions(
&self
) -> impl Future<Item = Vec<BackstoryQuestionId>, Error = APIError>
[src]
#[must_use]
pub fn backstory_questions(
&self
) -> impl Future<Item = Vec<BackstoryQuestionId>, Error = APIError>
Retrieves backstory question identifiers.
#[must_use]
pub fn backstory_questions_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<BackstoryQuestion>, Error = APIError> + 'a
[src]
#[must_use]
pub fn backstory_questions_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<BackstoryQuestion>, Error = APIError> + 'a
Retrieves backstory questions using the given list of identifiers.
impl GW2
[src]
impl GW2
pub fn new<I>(token: I, locale: Locale, handle: Handle) -> GW2 where
I: Into<String>,
[src]
pub fn new<I>(token: I, locale: Locale, handle: Handle) -> GW2 where
I: Into<String>,
Initializes the GW2 API interface with a given API token.
pub fn new_with_threads<I>(
token: I,
locale: Locale,
handle: Handle,
threads: usize
) -> GW2 where
I: Into<String>,
[src]
pub fn new_with_threads<I>(
token: I,
locale: Locale,
handle: Handle,
threads: usize
) -> GW2 where
I: Into<String>,
pub fn locale(&self) -> Locale
[src]
pub fn locale(&self) -> Locale
Returns a reference to the current Locale.
pub fn set_locale(&mut self, l: Locale)
[src]
pub fn set_locale(&mut self, l: Locale)
Updates the current locale.
pub fn api_key(&self) -> &str
[src]
pub fn api_key(&self) -> &str
Returns a reference to the current API key.
pub fn set_api_key(&mut self, key: String)
[src]
pub fn set_api_key(&mut self, key: String)
Updates the current API Key.
Note
This method is provided for convenience. In usual workflows however it will probably make more sense to just instantiate a new GW2 struct, as there isnt really any state to lose. However, this is handy for situations where you're keeping a global struct, or need to be conservative regarding allocations being made.
pub fn get_http_client(&self) -> &Client<HttpsConnector<HttpConnector>>
[src]
pub fn get_http_client(&self) -> &Client<HttpsConnector<HttpConnector>>
Grants the caller an immutable reference to the internal HTTP Client. Useful for queueing up http requests as work to the internal Tokio Core.
pub fn get_tokio_handle(&self) -> &Handle
[src]
pub fn get_tokio_handle(&self) -> &Handle
Grants the caller an immutable reference to the internal Tokio handle.
impl GW2
[src]
impl GW2
#[must_use]
pub fn build(
&self
) -> impl Future<Item = Build, Error = APIError>
[src]
#[must_use]
pub fn build(
&self
) -> impl Future<Item = Build, Error = APIError>
Retrieves the current build information.
impl GW2
[src]
impl GW2
#[must_use]
pub fn cats(
&self
) -> impl Future<Item = Vec<CatId>, Error = APIError>
[src]
#[must_use]
pub fn cats(
&self
) -> impl Future<Item = Vec<CatId>, Error = APIError>
Retrieves cat identifiers.
#[must_use]
pub fn cats_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Cat>, Error = APIError> + 'a
[src]
#[must_use]
pub fn cats_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Cat>, Error = APIError> + 'a
Retrieves cats using a list of identifiers.
impl GW2
[src]
impl GW2
#[must_use]
pub fn colors(
&self
) -> impl Future<Item = Vec<ColorId>, Error = APIError>
[src]
#[must_use]
pub fn colors(
&self
) -> impl Future<Item = Vec<ColorId>, Error = APIError>
Retrieves valid color identifiers.
#[must_use]
pub fn colors_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Color>, Error = APIError> + 'a
[src]
#[must_use]
pub fn colors_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Color>, Error = APIError> + 'a
Retrieves a list of Colors using the given list of identifiers.
impl GW2
[src]
impl GW2
#[must_use]
pub fn gems_to_gold(
&self,
qty: u64
) -> impl Future<Item = CurrencyConversion, Error = APIError>
[src]
#[must_use]
pub fn gems_to_gold(
&self,
qty: u64
) -> impl Future<Item = CurrencyConversion, Error = APIError>
Fetches the current going rate converting the given number of gems into gold.
#[must_use]
pub fn gold_to_gems(
&self,
qty: u64
) -> impl Future<Item = CurrencyConversion, Error = APIError>
[src]
#[must_use]
pub fn gold_to_gems(
&self,
qty: u64
) -> impl Future<Item = CurrencyConversion, Error = APIError>
Fetches the current conversion rate converting gold into gems.
#[must_use]
pub fn trading_post_listings<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Listing>, Error = APIError> + 'a
[src]
#[must_use]
pub fn trading_post_listings<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Listing>, Error = APIError> + 'a
Fetches trading post sales data for the given item identifiers.
#[must_use]
pub fn trading_post_prices<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Prices>, Error = APIError> + 'a
[src]
#[must_use]
pub fn trading_post_prices<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Prices>, Error = APIError> + 'a
Fetches trading post data data on the prices of the given items.
#[must_use]
pub fn trading_post_deliveries(
&self
) -> impl Future<Item = TradingPostDeliveries, Error = APIError>
[src]
#[must_use]
pub fn trading_post_deliveries(
&self
) -> impl Future<Item = TradingPostDeliveries, Error = APIError>
Fetches the trading post deliveries for an account.
#[must_use]
pub fn trading_post_current_buys(
&self
) -> impl Future<Item = Vec<TradingPostTransaction>, Error = APIError>
[src]
#[must_use]
pub fn trading_post_current_buys(
&self
) -> impl Future<Item = Vec<TradingPostTransaction>, Error = APIError>
Fetches the current buy orders for an account.
#[must_use]
pub fn trading_post_current_sells(
&self
) -> impl Future<Item = Vec<TradingPostTransaction>, Error = APIError>
[src]
#[must_use]
pub fn trading_post_current_sells(
&self
) -> impl Future<Item = Vec<TradingPostTransaction>, Error = APIError>
Fetches the current sell orders for an account.
#[must_use]
pub fn trading_post_past_buys(
&self
) -> impl Future<Item = Vec<TradingPostTransaction>, Error = APIError>
[src]
#[must_use]
pub fn trading_post_past_buys(
&self
) -> impl Future<Item = Vec<TradingPostTransaction>, Error = APIError>
Fetches historical buy orders for an account.
#[must_use]
pub fn trading_post_past_sells(
&self
) -> impl Future<Item = Vec<TradingPostTransaction>, Error = APIError>
[src]
#[must_use]
pub fn trading_post_past_sells(
&self
) -> impl Future<Item = Vec<TradingPostTransaction>, Error = APIError>
Fetches historical sell orders for an account.
impl GW2
[src]
impl GW2
#[must_use]
pub fn currencies(
&self
) -> impl Future<Item = Vec<CurrencyId>, Error = APIError>
[src]
#[must_use]
pub fn currencies(
&self
) -> impl Future<Item = Vec<CurrencyId>, Error = APIError>
Retrieves a list of Currency identifiers.
#[must_use]
pub fn currencies_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Currency>, Error = APIError> + 'a
[src]
#[must_use]
pub fn currencies_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Currency>, Error = APIError> + 'a
Retrieves a list of Currency objects using the given list of identifiers.
impl GW2
[src]
impl GW2
#[must_use]
pub fn gliders(
&self
) -> impl Future<Item = Vec<GliderId>, Error = APIError>
[src]
#[must_use]
pub fn gliders(
&self
) -> impl Future<Item = Vec<GliderId>, Error = APIError>
Retrieves a list of Glider identifiers.
#[must_use]
pub fn gliders_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Glider>, Error = APIError> + 'a
[src]
#[must_use]
pub fn gliders_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Glider>, Error = APIError> + 'a
Retrieves a list of GW2 Gliders.
impl GW2
[src]
impl GW2
#[must_use]
pub fn legends(
&self
) -> impl Future<Item = Vec<LegendId>, Error = APIError>
[src]
#[must_use]
pub fn legends(
&self
) -> impl Future<Item = Vec<LegendId>, Error = APIError>
Fetches a list of GW2 Revenant Legend identifiers.
#[must_use]
pub fn legends_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<Legend>, Error = APIError> + 'a
[src]
#[must_use]
pub fn legends_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<Legend>, Error = APIError> + 'a
Fetches a list of GW2 Revenant Legends.
impl GW2
[src]
impl GW2
#[must_use]
pub fn specializations(
&self
) -> impl Future<Item = Vec<SpecializationId>, Error = APIError>
[src]
#[must_use]
pub fn specializations(
&self
) -> impl Future<Item = Vec<SpecializationId>, Error = APIError>
Fetches the list of Specialization identifiers.
#[must_use]
pub fn specializations_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Specialization>, Error = APIError> + 'a
[src]
#[must_use]
pub fn specializations_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Specialization>, Error = APIError> + 'a
Fetches a list of class specializations.
impl GW2
[src]
impl GW2
#[must_use]
pub fn stories(
&self
) -> impl Future<Item = Vec<StoryId>, Error = APIError>
[src]
#[must_use]
pub fn stories(
&self
) -> impl Future<Item = Vec<StoryId>, Error = APIError>
Fetches the list of Story identifiers.
#[must_use]
pub fn stories_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Story>, Error = APIError> + 'a
[src]
#[must_use]
pub fn stories_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Story>, Error = APIError> + 'a
Fetches a list of stories with identifiers matching the input set.
#[must_use]
pub fn story_seasons(
&self
) -> impl Future<Item = Vec<StorySeasonId>, Error = APIError>
[src]
#[must_use]
pub fn story_seasons(
&self
) -> impl Future<Item = Vec<StorySeasonId>, Error = APIError>
Fetches the list of story season identifiers.
#[must_use]
pub fn story_seasons_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<StorySeason>, Error = APIError> + 'a
[src]
#[must_use]
pub fn story_seasons_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<StorySeason>, Error = APIError> + 'a
Fetches a list of StorySeason's with identifiers matching the input set.
impl GW2
[src]
impl GW2
#[must_use]
pub fn titles(
&self
) -> impl Future<Item = Vec<TitleId>, Error = APIError>
[src]
#[must_use]
pub fn titles(
&self
) -> impl Future<Item = Vec<TitleId>, Error = APIError>
Fetches character title identifiers.
#[must_use]
pub fn titles_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Title>, Error = APIError> + 'a
[src]
#[must_use]
pub fn titles_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Title>, Error = APIError> + 'a
Fetches specificied character titles.
impl GW2
[src]
impl GW2
#[must_use]
pub fn token_info(
&self
) -> impl Future<Item = TokenInfo, Error = APIError>
[src]
#[must_use]
pub fn token_info(
&self
) -> impl Future<Item = TokenInfo, Error = APIError>
Fetches information on the provided access token.
impl GW2
[src]
impl GW2
#[must_use]
pub fn worlds(
&self
) -> impl Future<Item = Vec<WorldId>, Error = APIError>
[src]
#[must_use]
pub fn worlds(
&self
) -> impl Future<Item = Vec<WorldId>, Error = APIError>
Fetches a list of world (server) identifiers.
#[must_use]
pub fn worlds_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<World>, Error = APIError> + 'a
[src]
#[must_use]
pub fn worlds_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<World>, Error = APIError> + 'a
Fetches world data for the desired world identifiers.
impl GW2
[src]
impl GW2
#[must_use]
pub fn wvw_abilities(
&self
) -> impl Future<Item = Vec<WVWAbilityId>, Error = APIError>
[src]
#[must_use]
pub fn wvw_abilities(
&self
) -> impl Future<Item = Vec<WVWAbilityId>, Error = APIError>
Fetches World versus World Ability identifiers.
#[must_use]
pub fn wvw_abilities_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<WVWAbility>, Error = APIError> + 'a
[src]
#[must_use]
pub fn wvw_abilities_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<WVWAbility>, Error = APIError> + 'a
Fetches World versus World abilities with the given identifiers.
#[must_use]
pub fn objectives(
&self
) -> impl Future<Item = Vec<ObjectiveId>, Error = APIError>
[src]
#[must_use]
pub fn objectives(
&self
) -> impl Future<Item = Vec<ObjectiveId>, Error = APIError>
Returns a list of World vs World Objective identifiers.
#[must_use]
pub fn objectives_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<Objective>, Error = APIError> + 'a
[src]
#[must_use]
pub fn objectives_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<Objective>, Error = APIError> + 'a
#[must_use]
pub fn wvw_matches(
&self
) -> impl Future<Item = Vec<WVWMatchId>, Error = APIError>
[src]
#[must_use]
pub fn wvw_matches(
&self
) -> impl Future<Item = Vec<WVWMatchId>, Error = APIError>
#[must_use]
pub fn wvw_matches_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<WVWMatch>, Error = APIError> + 'a
[src]
#[must_use]
pub fn wvw_matches_by_ids<'a>(
&self,
ids: &'a [&str]
) -> impl Future<Item = Vec<WVWMatch>, Error = APIError> + 'a
Fetches world versus world match data for the given matchups.
#[must_use]
pub fn wvw_ranks(
&self
) -> impl Future<Item = Vec<WVWRankId>, Error = APIError>
[src]
#[must_use]
pub fn wvw_ranks(
&self
) -> impl Future<Item = Vec<WVWRankId>, Error = APIError>
Returns a list of World vs World Rank identifiers.
#[must_use]
pub fn wvw_ranks_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<WVWRank>, Error = APIError> + 'a
[src]
#[must_use]
pub fn wvw_ranks_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<WVWRank>, Error = APIError> + 'a
Returns a list of World vs World Ranks given a set of identifiers.
#[must_use]
pub fn wvw_upgrades(
&self
) -> impl Future<Item = Vec<UpgradeId>, Error = APIError>
[src]
#[must_use]
pub fn wvw_upgrades(
&self
) -> impl Future<Item = Vec<UpgradeId>, Error = APIError>
Returns a list of World vs World objective upgrade identifiers.
#[must_use]
pub fn wvw_upgrades_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Upgrade>, Error = APIError> + 'a
[src]
#[must_use]
pub fn wvw_upgrades_by_ids<'a>(
&self,
ids: &'a [u64]
) -> impl Future<Item = Vec<Upgrade>, Error = APIError> + 'a
Returns a list of World vs World objective upgrades given a set of identifiers.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Erased for T
impl<T> Erased for T