UsersService class abstract
This class provides methods to easily access endpoints based on User.
Constructors
- UsersService({required ClientContext context})
-
Returns the new instance of UsersService.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createBlock(
{required String userId, required String targetUserId}) → Future< TwitterResponse< BlockStateData, void> > - Causes the user (in the path) to block the target user. The user (in the path) must match the user Access Tokens being used to authorize the request.
-
createFollow(
{required String userId, required String targetUserId}) → Future< TwitterResponse< FollowStateData, void> > - Allows a user ID to follow another user.
-
createMute(
{required String userId, required String targetUserId}) → Future< TwitterResponse< MuteStateData, void> > - Allows an authenticated user ID to mute the target user.
-
createReportById(
{required String userId, bool? performBlock}) → Future< TwitterResponse< UserData, void> > - Report the specified user as a spam account to Twitter.
-
createReportByName(
{required String username, bool? performBlock}) → Future< TwitterResponse< UserData, void> > - Report the specified user as a spam account to Twitter.
-
destroyBlock(
{required String userId, required String targetUserId}) → Future< TwitterResponse< BlockStateData, void> > - Allows a user or authenticated user ID to unblock another user.
-
destroyFollow(
{required String userId, required String targetUserId}) → Future< TwitterResponse< FollowStateData, void> > - Allows a user ID to unfollow another user.
-
destroyMute(
{required String userId, required String targetUserId}) → Future< TwitterResponse< MuteStateData, void> > - Allows an authenticated user ID to unmute the target user.
-
destroyProfileBanner(
) → Future< TwitterResponse< EmptyData, void> > - Removes the uploaded profile banner for the authenticating user.
-
lookupBlockingUsers(
{required String userId, int? maxResults, String? paginationToken, List< UserExpansion> ? expansions, List<TweetField> ? tweetFields, List<UserField> ? userFields, Paging<List< ? paging}) → Future<UserData> , UserMeta>TwitterResponse< List< >UserData> , UserMeta> - Returns a list of users who are blocked by the specified user ID.
-
lookupById(
{required String userId, List< UserExpansion> ? expansions, List<TweetField> ? tweetFields, List<UserField> ? userFields}) → Future<TwitterResponse< UserData, void> > - Returns a variety of information about a single user specified by the requested ID.
-
lookupByIds(
{required List< String> userIds, List<UserExpansion> ? expansions, List<TweetField> ? tweetFields, List<UserField> ? userFields}) → Future<TwitterResponse< List< >UserData> , void> - Returns a variety of information about one or more users specified by the requested IDs.
-
lookupByName(
{required String username, List< UserExpansion> ? expansions, List<TweetField> ? tweetFields, List<UserField> ? userFields}) → Future<TwitterResponse< UserData, void> > - Returns a variety of information about one or more users specified by their usernames.
-
lookupByNames(
{required List< String> usernames, List<UserExpansion> ? expansions, List<TweetField> ? tweetFields, List<UserField> ? userFields}) → Future<TwitterResponse< List< >UserData> , void> - Returns a variety of information about one or more users specified by their usernames.
-
lookupFollowers(
{required String userId, int? maxResults, String? paginationToken, List< UserExpansion> ? expansions, List<TweetField> ? tweetFields, List<UserField> ? userFields, Paging<List< ? paging}) → Future<UserData> , UserMeta>TwitterResponse< List< >UserData> , UserMeta> - Returns a list of users who are followers of the specified user ID.
-
lookupFollowings(
{required String userId, int? maxResults, String? paginationToken, List< UserExpansion> ? expansions, List<TweetField> ? tweetFields, List<UserField> ? userFields, Paging<List< ? paging}) → Future<UserData> , UserMeta>TwitterResponse< List< >UserData> , UserMeta> - Returns a list of users the specified user ID is following.
-
lookupMe(
{List< UserExpansion> ? expansions, List<TweetField> ? tweetFields, List<UserField> ? userFields}) → Future<TwitterResponse< UserData, void> > - Returns information about an authorized user.
-
lookupMutingUsers(
{required String userId, int? maxResults, String? paginationToken, List< UserExpansion> ? expansions, List<TweetField> ? tweetFields, List<UserField> ? userFields, Paging<List< ? paging}) → Future<UserData> , UserMeta>TwitterResponse< List< >UserData> , UserMeta> - Returns a list of users who are muted by the specified user ID.
-
lookupProfileBannerById(
{required String userId}) → Future< TwitterResponse< ProfileBannerVariantsData, void> > - Returns a map of the available size variations of the specified user's profile banner.
-
lookupProfileBannerByName(
{required String username}) → Future< TwitterResponse< ProfileBannerVariantsData, void> > - Returns a map of the available size variations of the specified user's profile banner.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateProfile(
{String? name, String? description, String? url, String? location}) → Future< TwitterResponse< UserData, void> > - Sets some values that users are able to set under the "Account" tab of their settings page.
-
updateProfileBanner(
{required File file, int? width, int? height, int? offsetLeft, int? offsetTop}) → Future< TwitterResponse< EmptyData, void> > - Uploads a profile banner on behalf of the authenticating user.
-
updateProfileImage(
{required File file}) → Future< TwitterResponse< UserData, void> > - Updates the authenticating user's profile image. Note that this method expects raw multipart data, not a URL to an image.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited