pub struct UserScope<E>(/* private fields */)
where
E: Executor;
Implementations§
Source§impl<E> UserScope<E>where
E: Executor,
impl<E> UserScope<E>where
E: Executor,
pub fn new(executor: E) -> Self
Sourcepub async fn attacks<S>(
self,
builder: impl FnOnce(UserAttacksRequestBuilder<Empty>) -> UserAttacksRequestBuilder<S>,
) -> Result<FactionAttacksResponse, E::Error>where
S: IsComplete,
pub async fn attacks<S>(
self,
builder: impl FnOnce(UserAttacksRequestBuilder<Empty>) -> UserAttacksRequestBuilder<S>,
) -> Result<FactionAttacksResponse, E::Error>where
S: IsComplete,
Sourcepub async fn attacksfull<S>(
self,
builder: impl FnOnce(UserAttacksfullRequestBuilder<Empty>) -> UserAttacksfullRequestBuilder<S>,
) -> Result<FactionAttacksFullResponse, E::Error>where
S: IsComplete,
pub async fn attacksfull<S>(
self,
builder: impl FnOnce(UserAttacksfullRequestBuilder<Empty>) -> UserAttacksfullRequestBuilder<S>,
) -> Result<FactionAttacksFullResponse, E::Error>where
S: IsComplete,
Sourcepub async fn bounties<S>(
self,
builder: impl FnOnce(UserBountiesRequestBuilder<Empty>) -> UserBountiesRequestBuilder<S>,
) -> Result<UserBountiesResponse, E::Error>where
S: IsComplete,
pub async fn bounties<S>(
self,
builder: impl FnOnce(UserBountiesRequestBuilder<Empty>) -> UserBountiesRequestBuilder<S>,
) -> Result<UserBountiesResponse, E::Error>where
S: IsComplete,
Sourcepub async fn bounties_for_id<S>(
self,
id: UserId,
builder: impl FnOnce(UserBountiesForIdRequestBuilder<Empty>) -> UserBountiesForIdRequestBuilder<S>,
) -> Result<UserBountiesResponse, E::Error>where
S: IsComplete,
pub async fn bounties_for_id<S>(
self,
id: UserId,
builder: impl FnOnce(UserBountiesForIdRequestBuilder<Empty>) -> UserBountiesForIdRequestBuilder<S>,
) -> Result<UserBountiesResponse, E::Error>where
S: IsComplete,
Sourcepub async fn calendar<S>(
self,
builder: impl FnOnce(UserCalendarRequestBuilder<Empty>) -> UserCalendarRequestBuilder<S>,
) -> Result<UserCalendarResponse, E::Error>where
S: IsComplete,
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.
Sourcepub 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,
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.
Sourcepub async fn education<S>(
self,
builder: impl FnOnce(UserEducationRequestBuilder<Empty>) -> UserEducationRequestBuilder<S>,
) -> Result<UserEducationResponse, E::Error>where
S: IsComplete,
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).
Sourcepub async fn enlistedcars<S>(
self,
builder: impl FnOnce(UserEnlistedcarsRequestBuilder<Empty>) -> UserEnlistedcarsRequestBuilder<S>,
) -> Result<UserEnlistedCarsResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn factionbalance<S>(
self,
builder: impl FnOnce(UserFactionbalanceRequestBuilder<Empty>) -> UserFactionbalanceRequestBuilder<S>,
) -> Result<UserFactionBalanceResponse, E::Error>where
S: IsComplete,
pub async fn factionbalance<S>(
self,
builder: impl FnOnce(UserFactionbalanceRequestBuilder<Empty>) -> UserFactionbalanceRequestBuilder<S>,
) -> Result<UserFactionBalanceResponse, E::Error>where
S: IsComplete,
Sourcepub async fn forumfeed<S>(
self,
builder: impl FnOnce(UserForumfeedRequestBuilder<Empty>) -> UserForumfeedRequestBuilder<S>,
) -> Result<UserForumFeedResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn forumfriends<S>(
self,
builder: impl FnOnce(UserForumfriendsRequestBuilder<Empty>) -> UserForumfriendsRequestBuilder<S>,
) -> Result<UserForumFriendsResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn forumposts<S>(
self,
builder: impl FnOnce(UserForumpostsRequestBuilder<Empty>) -> UserForumpostsRequestBuilder<S>,
) -> Result<UserForumPostsResponse, E::Error>where
S: IsComplete,
pub async fn forumposts<S>(
self,
builder: impl FnOnce(UserForumpostsRequestBuilder<Empty>) -> UserForumpostsRequestBuilder<S>,
) -> Result<UserForumPostsResponse, E::Error>where
S: IsComplete,
Sourcepub async fn forumposts_for_id<S>(
self,
id: UserId,
builder: impl FnOnce(UserForumpostsForIdRequestBuilder<Empty>) -> UserForumpostsForIdRequestBuilder<S>,
) -> Result<UserForumPostsResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn forumsubscribedthreads<S>(
self,
builder: impl FnOnce(UserForumsubscribedthreadsRequestBuilder<Empty>) -> UserForumsubscribedthreadsRequestBuilder<S>,
) -> Result<UserForumSubscribedThreadsResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn forumthreads<S>(
self,
builder: impl FnOnce(UserForumthreadsRequestBuilder<Empty>) -> UserForumthreadsRequestBuilder<S>,
) -> Result<UserForumThreadsResponse, E::Error>where
S: IsComplete,
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).
Sourcepub async fn forumthreads_for_id<S>(
self,
id: UserId,
builder: impl FnOnce(UserForumthreadsForIdRequestBuilder<Empty>) -> UserForumthreadsForIdRequestBuilder<S>,
) -> Result<UserForumThreadsResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn hof<S>(
self,
builder: impl FnOnce(UserHofRequestBuilder<Empty>) -> UserHofRequestBuilder<S>,
) -> Result<UserHofResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn hof_for_id<S>(
self,
id: UserId,
builder: impl FnOnce(UserHofForIdRequestBuilder<Empty>) -> UserHofForIdRequestBuilder<S>,
) -> Result<UserHofResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn itemmarket<S>(
self,
builder: impl FnOnce(UserItemmarketRequestBuilder<Empty>) -> UserItemmarketRequestBuilder<S>,
) -> Result<UserItemMarketResponse, E::Error>where
S: IsComplete,
pub async fn itemmarket<S>(
self,
builder: impl FnOnce(UserItemmarketRequestBuilder<Empty>) -> UserItemmarketRequestBuilder<S>,
) -> Result<UserItemMarketResponse, E::Error>where
S: IsComplete,
Sourcepub async fn jobranks<S>(
self,
builder: impl FnOnce(UserJobranksRequestBuilder<Empty>) -> UserJobranksRequestBuilder<S>,
) -> Result<UserJobRanksResponse, E::Error>where
S: IsComplete,
pub async fn jobranks<S>(
self,
builder: impl FnOnce(UserJobranksRequestBuilder<Empty>) -> UserJobranksRequestBuilder<S>,
) -> Result<UserJobRanksResponse, E::Error>where
S: IsComplete,
Sourcepub async fn list<S>(
self,
builder: impl FnOnce(UserListRequestBuilder<Empty>) -> UserListRequestBuilder<S>,
) -> Result<UserListResponse, E::Error>where
S: IsComplete,
pub async fn list<S>(
self,
builder: impl FnOnce(UserListRequestBuilder<Empty>) -> UserListRequestBuilder<S>,
) -> Result<UserListResponse, E::Error>where
S: IsComplete,
Sourcepub async fn organizedcrime<S>(
self,
builder: impl FnOnce(UserOrganizedcrimeRequestBuilder<Empty>) -> UserOrganizedcrimeRequestBuilder<S>,
) -> Result<UserOrganizedCrimeResponse, E::Error>where
S: IsComplete,
pub async fn organizedcrime<S>(
self,
builder: impl FnOnce(UserOrganizedcrimeRequestBuilder<Empty>) -> UserOrganizedcrimeRequestBuilder<S>,
) -> Result<UserOrganizedCrimeResponse, E::Error>where
S: IsComplete,
Sourcepub async fn personalstats<S>(
self,
builder: impl FnOnce(UserPersonalstatsRequestBuilder<Empty>) -> UserPersonalstatsRequestBuilder<S>,
) -> Result<UserPersonalStatsResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn personalstats_for_id<S>(
self,
id: UserId,
builder: impl FnOnce(UserPersonalstatsForIdRequestBuilder<Empty>) -> UserPersonalstatsForIdRequestBuilder<S>,
) -> Result<UserPersonalStatsResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn races<S>(
self,
builder: impl FnOnce(UserRacesRequestBuilder<Empty>) -> UserRacesRequestBuilder<S>,
) -> Result<UserRacesResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn reports<S>(
self,
builder: impl FnOnce(UserReportsRequestBuilder<Empty>) -> UserReportsRequestBuilder<S>,
) -> Result<ReportsResponse, E::Error>where
S: IsComplete,
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.
Sourcepub async fn revives<S>(
self,
builder: impl FnOnce(UserRevivesRequestBuilder<Empty>) -> UserRevivesRequestBuilder<S>,
) -> Result<RevivesResponse, E::Error>where
S: IsComplete,
pub async fn revives<S>(
self,
builder: impl FnOnce(UserRevivesRequestBuilder<Empty>) -> UserRevivesRequestBuilder<S>,
) -> Result<RevivesResponse, E::Error>where
S: IsComplete,
Sourcepub async fn revives_full<S>(
self,
builder: impl FnOnce(UserRevivesFullRequestBuilder<Empty>) -> UserRevivesFullRequestBuilder<S>,
) -> Result<RevivesFullResponse, E::Error>where
S: IsComplete,
pub async fn revives_full<S>(
self,
builder: impl FnOnce(UserRevivesFullRequestBuilder<Empty>) -> UserRevivesFullRequestBuilder<S>,
) -> Result<RevivesFullResponse, E::Error>where
S: IsComplete,
Sourcepub async fn lookup<S>(
self,
builder: impl FnOnce(UserLookupRequestBuilder<Empty>) -> UserLookupRequestBuilder<S>,
) -> Result<UserLookupResponse, E::Error>where
S: IsComplete,
pub async fn lookup<S>(
self,
builder: impl FnOnce(UserLookupRequestBuilder<Empty>) -> UserLookupRequestBuilder<S>,
) -> Result<UserLookupResponse, E::Error>where
S: IsComplete,
Sourcepub async fn timestamp<S>(
self,
builder: impl FnOnce(UserTimestampRequestBuilder<Empty>) -> UserTimestampRequestBuilder<S>,
) -> Result<TimestampResponse, E::Error>where
S: IsComplete,
pub async fn timestamp<S>(
self,
builder: impl FnOnce(UserTimestampRequestBuilder<Empty>) -> UserTimestampRequestBuilder<S>,
) -> Result<TimestampResponse, E::Error>where
S: IsComplete,
Sourcepub async fn for_selections<S>(
self,
builder: impl FnOnce(UserRequestBuilder<Empty>) -> UserRequestBuilder<S>,
) -> Result<Response, E::Error>where
S: IsComplete,
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).