Struct UserScope

Source
pub struct UserScope<E>(/* private fields */)
where
    E: Executor;

Implementations§

Source§

impl<E> UserScope<E>
where E: Executor,

Source

pub fn new(executor: E) -> Self

Source

pub async fn attacks<S>( self, builder: impl FnOnce(UserAttacksRequestBuilder<Empty>) -> UserAttacksRequestBuilder<S>, ) -> Result<FactionAttacksResponse, E::Error>
where S: IsComplete,

Get your detailed attacks

§Description

Requires limited access key.

Source

pub async fn attacksfull<S>( self, builder: impl FnOnce(UserAttacksfullRequestBuilder<Empty>) -> UserAttacksfullRequestBuilder<S>, ) -> Result<FactionAttacksFullResponse, E::Error>
where S: IsComplete,

Get your simplified attacks

§Description

Requires limited access key.
Returns up to 1,000 rows.

Source

pub async fn bounties<S>( self, builder: impl FnOnce(UserBountiesRequestBuilder<Empty>) -> UserBountiesRequestBuilder<S>, ) -> Result<UserBountiesResponse, E::Error>
where S: IsComplete,

Get bounties placed on you

§Description

Requires public access key.

Source

pub async fn bounties_for_id<S>( self, id: UserId, builder: impl FnOnce(UserBountiesForIdRequestBuilder<Empty>) -> UserBountiesForIdRequestBuilder<S>, ) -> Result<UserBountiesResponse, E::Error>
where S: IsComplete,

Get bounties placed on a specific user

§Description

Requires public access key.

Source

pub async fn calendar<S>( self, builder: impl FnOnce(UserCalendarRequestBuilder<Empty>) -> UserCalendarRequestBuilder<S>, ) -> Result<UserCalendarResponse, E::Error>
where S: IsComplete,

Get your competition’s event start time

§Description

Requires minimal access key.
Only available to yourself.

Source

pub async fn crimes_for_crime_id<S>( self, crime_id: TornCrimeId, builder: impl FnOnce(UserCrimesForCrimeIdRequestBuilder<Empty>) -> UserCrimesForCrimeIdRequestBuilder<S>, ) -> Result<UserCrimesResponse, E::Error>
where S: IsComplete,

Get your crime statistics

§Description

Requires minimal access key.
Return the details and statistics about for a specific crime.

Source

pub async fn education<S>( self, builder: impl FnOnce(UserEducationRequestBuilder<Empty>) -> UserEducationRequestBuilder<S>, ) -> Result<UserEducationResponse, E::Error>
where S: IsComplete,

Get your education information

§Description

The response contains a list of complete eduactions and of a current education (if any).

Source

pub async fn enlistedcars<S>( self, builder: impl FnOnce(UserEnlistedcarsRequestBuilder<Empty>) -> UserEnlistedcarsRequestBuilder<S>, ) -> Result<UserEnlistedCarsResponse, E::Error>
where S: IsComplete,

Get user enlisted cars

§Description

Requires minimal access key.
Returns a list of all user enlisted cars.

Source

pub async fn factionbalance<S>( self, builder: impl FnOnce(UserFactionbalanceRequestBuilder<Empty>) -> UserFactionbalanceRequestBuilder<S>, ) -> Result<UserFactionBalanceResponse, E::Error>
where S: IsComplete,

Get your current faction balance

§Description

Requires limited access key.

Source

pub async fn forumfeed<S>( self, builder: impl FnOnce(UserForumfeedRequestBuilder<Empty>) -> UserForumfeedRequestBuilder<S>, ) -> Result<UserForumFeedResponse, E::Error>
where S: IsComplete,

Get updates on your threads and posts

§Description

Requires minimal access key.
This selection returns data visible in ‘Feed’ section on forum page. Feed is sorted by timestamp descending. Only a maximum of 100 rows are returned.

Source

pub async fn forumfriends<S>( self, builder: impl FnOnce(UserForumfriendsRequestBuilder<Empty>) -> UserForumfriendsRequestBuilder<S>, ) -> Result<UserForumFriendsResponse, E::Error>
where S: IsComplete,

Get updates on your friends’ activity

§Description

Requires minimal access key.
This selection returns data visible in ‘Friends’ section on forum page. Feed is sorted by timestamp descending. Only a maximum of 100 rows are returned.

Source

pub async fn forumposts<S>( self, builder: impl FnOnce(UserForumpostsRequestBuilder<Empty>) -> UserForumpostsRequestBuilder<S>, ) -> Result<UserForumPostsResponse, E::Error>
where S: IsComplete,

Get your posts

§Description

Requires public access key.
Returns 20 posts per page.

Source

pub async fn forumposts_for_id<S>( self, id: UserId, builder: impl FnOnce(UserForumpostsForIdRequestBuilder<Empty>) -> UserForumpostsForIdRequestBuilder<S>, ) -> Result<UserForumPostsResponse, E::Error>
where S: IsComplete,

Get posts for a specific player

§Description

Requires public access key.
Returns 20 posts per page for a specific player.

Source

pub async fn forumsubscribedthreads<S>( self, builder: impl FnOnce(UserForumsubscribedthreadsRequestBuilder<Empty>) -> UserForumsubscribedthreadsRequestBuilder<S>, ) -> Result<UserForumSubscribedThreadsResponse, E::Error>
where S: IsComplete,

Get updates on threads you subscribed to

§Description

Requires minimal access key.
This selection returns data visible in ‘Subscribed Threads’ section on forum page. Threads are sorted in the same way as on site.

Source

pub async fn forumthreads<S>( self, builder: impl FnOnce(UserForumthreadsRequestBuilder<Empty>) -> UserForumthreadsRequestBuilder<S>, ) -> Result<UserForumThreadsResponse, E::Error>
where S: IsComplete,

Get your threads

§Description

Requires public access key.
Returns 100 threads per page. The field ‘new_posts’ is also available, indicating the amount of unread posts with a Minimum API key (or higher).

Source

pub async fn forumthreads_for_id<S>( self, id: UserId, builder: impl FnOnce(UserForumthreadsForIdRequestBuilder<Empty>) -> UserForumthreadsForIdRequestBuilder<S>, ) -> Result<UserForumThreadsResponse, E::Error>
where S: IsComplete,

Get threads for a specific player

§Description

Requires public access key.
Returns 100 threads per page for a specific player. When requesting data for the key owner, a field ‘new_posts’ is also available, indicating the amount of unread posts. Minimum API key is required for that.

Source

pub async fn hof<S>( self, builder: impl FnOnce(UserHofRequestBuilder<Empty>) -> UserHofRequestBuilder<S>, ) -> Result<UserHofResponse, E::Error>
where S: IsComplete,

Get your hall of fame rankings

§Description

Requires public access key.
When requesting selection with Limited, Full or Custom key, battle_stats selection will be populated.

Source

pub async fn hof_for_id<S>( self, id: UserId, builder: impl FnOnce(UserHofForIdRequestBuilder<Empty>) -> UserHofForIdRequestBuilder<S>, ) -> Result<UserHofResponse, E::Error>
where S: IsComplete,

Get hall of fame rankings for a specific player

§Description

Requires public access key.
The battle_stats selection will be populated only when requesting selection with Limited, Full or Custom key and for yourself.

Source

pub async fn itemmarket<S>( self, builder: impl FnOnce(UserItemmarketRequestBuilder<Empty>) -> UserItemmarketRequestBuilder<S>, ) -> Result<UserItemMarketResponse, E::Error>
where S: IsComplete,

Get your item market listings for a specific item

§Description

Requires limited access key.

Source

pub async fn jobranks<S>( self, builder: impl FnOnce(UserJobranksRequestBuilder<Empty>) -> UserJobranksRequestBuilder<S>, ) -> Result<UserJobRanksResponse, E::Error>
where S: IsComplete,

Get your starter job positions

§Description

Requires minimal access key.

Source

pub async fn list<S>( self, builder: impl FnOnce(UserListRequestBuilder<Empty>) -> UserListRequestBuilder<S>, ) -> Result<UserListResponse, E::Error>
where S: IsComplete,

Get your friends, enemies or targets list

§Description

Requires limited access key.

Source

pub async fn organizedcrime<S>( self, builder: impl FnOnce(UserOrganizedcrimeRequestBuilder<Empty>) -> UserOrganizedcrimeRequestBuilder<S>, ) -> Result<UserOrganizedCrimeResponse, E::Error>
where S: IsComplete,

Get your current ongoing organized crime

§Description

Requires minimal access key.

Source

pub async fn personalstats<S>( self, builder: impl FnOnce(UserPersonalstatsRequestBuilder<Empty>) -> UserPersonalstatsRequestBuilder<S>, ) -> Result<UserPersonalStatsResponse, E::Error>
where S: IsComplete,

Get your personal stats

§Description

Requires public access key.

  • UserPersonalStatsFull is returned only when this selection is requested with Limited, Full or Custom key access key.
  • UserPersonalStatsFullPublic is returned when the requested category is ‘all’.
  • UserPersonalStatsPopular is returned when the requested category is ‘popular’. Please try to use UserPersonalStatsPopular over UserPersonalStatsFullPublic wherever possible in order to reduce the server load.
  • Otherwise, UserPersonalStatsCategory is returned for the matched category.
  • It’s possible to request specific stats via ‘stat’ parameter. In this case the response will vary depending on the stats requested. Private stats are still available only to the key owner (with Limited or higher key).
  • Additionally, historical stats can also be fetched via ‘stat’ query parameter, but ‘timestamp’ parameter must be provided as well. It’s only possible to pass up to 10 historical stats at once (the rest is trimmed). When requesting historical stats the response will be of type UserPersonalStatsHistoric.
Source

pub async fn personalstats_for_id<S>( self, id: UserId, builder: impl FnOnce(UserPersonalstatsForIdRequestBuilder<Empty>) -> UserPersonalstatsForIdRequestBuilder<S>, ) -> Result<UserPersonalStatsResponse, E::Error>
where S: IsComplete,

Get a player’s personal stats

§Description

Requires public access key.

  • UserPersonalStatsFull is returned only when this selection is requested for the key owner with Limited, Full or Custom key.
  • UserPersonalStatsFullPublic is returned when the requested category is ‘all’.
  • UserPersonalStatsPopular is returned when the requested category is ‘popular’. Please try to use UserPersonalStatsPopular over UserPersonalStatsFullPublic wherever possible in order to reduce the server load.
  • Otherwise, UserPersonalStatsCategory is returned for the matched category.
  • It’s possible to request specific stats via ‘stat’ parameter. In this case the response will vary depending on the stats requested. Private stats are still available only to the key owner (with Limited or higher key).
  • Additionally, historical stats can also be fetched via ‘stat’ query parameter, but ‘timestamp’ parameter must be provided as well. It’s only possible to pass up to 10 historical stats at once (the rest is trimmed). When requesting historical stats the response will be of type UserPersonalStatsHistoric.
Source

pub async fn races<S>( self, builder: impl FnOnce(UserRacesRequestBuilder<Empty>) -> UserRacesRequestBuilder<S>, ) -> Result<UserRacesResponse, E::Error>
where S: IsComplete,

Get user races

§Description

Requires minimal access key.
Returns a list of user races, ordered by race start timestamp.

Source

pub async fn reports<S>( self, builder: impl FnOnce(UserReportsRequestBuilder<Empty>) -> UserReportsRequestBuilder<S>, ) -> Result<ReportsResponse, E::Error>
where S: IsComplete,

Get your reports

§Description

Requires limited access key.

  • The default limit is set to 25. However, the limit can be set to 100 for the ‘stats’ category.
Source

pub async fn revives<S>( self, builder: impl FnOnce(UserRevivesRequestBuilder<Empty>) -> UserRevivesRequestBuilder<S>, ) -> Result<RevivesResponse, E::Error>
where S: IsComplete,

Get your detailed revives

§Description

Requires limited access key.

Source

pub async fn revives_full<S>( self, builder: impl FnOnce(UserRevivesFullRequestBuilder<Empty>) -> UserRevivesFullRequestBuilder<S>, ) -> Result<RevivesFullResponse, E::Error>
where S: IsComplete,

Get your simplified revives

§Description

Requires limited access key.

Source

pub async fn lookup<S>( self, builder: impl FnOnce(UserLookupRequestBuilder<Empty>) -> UserLookupRequestBuilder<S>, ) -> Result<UserLookupResponse, E::Error>
where S: IsComplete,

Get all available user selections

§Description

Requires public access key.

Source

pub async fn timestamp<S>( self, builder: impl FnOnce(UserTimestampRequestBuilder<Empty>) -> UserTimestampRequestBuilder<S>, ) -> Result<TimestampResponse, E::Error>
where S: IsComplete,

Get current server time

§Description

Requires public access key.

Source

pub async fn for_selections<S>( self, builder: impl FnOnce(UserRequestBuilder<Empty>) -> UserRequestBuilder<S>, ) -> Result<Response, E::Error>
where S: IsComplete,

Get any User selection

§Description

Key access level depends on the required selections.
Choose one or more selections (comma separated).

Auto Trait Implementations§

§

impl<E> Freeze for UserScope<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for UserScope<E>
where E: RefUnwindSafe,

§

impl<E> Send for UserScope<E>
where E: Send,

§

impl<E> Sync for UserScope<E>
where E: Sync,

§

impl<E> Unpin for UserScope<E>
where E: Unpin,

§

impl<E> UnwindSafe for UserScope<E>
where E: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T