Users class

User's with public data will return info with all GET methods. Private user's (including yourself) require valid OAuth and a friend relationship to return data.

Username vs. slug

All users methods should use the slug to identify the user. The slug is a URL safe and globally unique version of the username.

Special id for the OAuth user

If you send valid OAuth, you can use me to identify the OAuth user instead of needing their actual slug. You can of course still use their actual slug, it's up to you.

Extra headers

If valid OAuth is sent, additional headers will be sent to better determine it is a data permissions issue (they aren't friends) and not bad OAuth. For example, you might try and access a private user's list you aren't friends with. This will return a 401 HTTP status code and the additional headers. This means the OAuth is valid, but authorization ultimately failed because there is no friend relationship.

Inheritance

Constructors

Users(TraktManager manager)

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

addHiddenItems({required HiddenItemSection section, List<Movie> movies = const [], List<Show> shows = const [], List<Season> seasons = const []}) Future<HiddenItem>
Hide items for a specific section. Here's what type of items can hidden for each section.
addItemsToCustomList(int id, String listId, {List<Movie> movies = const [], List<Show> shows = const [], List<Season> seasons = const [], List<Episode> episodes = const [], List<Person> people = const []}) Future<AddToCustomListResponse>
Add one or more items to a custom list. Items can be movies, shows, seasons, episodes, or people.
approveFollowerRequest(int id) Future<Follower>
Approve a follower using the id of the request.
createCustomList(String id, {required String name, String? description, CustomListPrivacy privacy = CustomListPrivacy.private, bool displayNumbers = false, bool allowComments = true, CustomListSort sortBy = CustomListSort.rank, CustomListSortHow sortHow = CustomListSortHow.asc}) Future<TraktList>
Create a new custom list.
deleteList(String id, String listId) Future<void>
Remove a custom list and all items it contains.
denyFollowerRequest(int id) Future<void>
Deny a follower using the id of the request.
followUser(String id) Future<Following>
If the user has a private profile, the follow request will require approval (approved_at will be null).
getCollection(String id, UserCollectionType type, {bool extendedFull = false, bool? extendedMetadata, bool useOAuth = false}) Future<List<UserCollectionItem>>
Get all collected items in a user's collection.
getComments(String id, {CommentType? commentType, MediaType? mediaType, String? includeReplies, bool extendedFull = false, RequestPagination? pagination, bool useOAuth = false}) Future<List<MediaComment>>
Returns the most recently written comments for the user.
getFollowerRequests({bool extendedFull = false}) Future<List<FollowRequest>>
List a user's pending follow requests so they can either approve or deny them.
getFollowers(String id, {bool useOAuth = false, bool extendedFull = false}) Future<List<Follower>>
Returns all followers including when the relationship began.
getFollowing(String id, {bool useOAuth = false, bool extendedFull = false}) Future<List<Follower>>
Returns all friends for a user including when the relationship began.
getFollowingRequests({bool extendedFull = false}) Future<List<FollowRequest>>
List a user's pending following requests that they're waiting for the other user's to approve.
getFriends(String id, {bool useOAuth = false, bool extendedFull = false}) Future<List<Friend>>
Returns all friends for a user including when the relationship began.
getHiddenItems({required HiddenItemSection section, HiddenItemType? type, bool extendedFull = false, RequestPagination? pagination}) Future<List<HiddenItem>>
Get hidden items for a section.
getHistory(String id, {WatchedItemType? type, String? itemId, String? startAt, String? endAt, bool useOAuth = false, bool extendedFull = false, RequestPagination? pagination}) Future<List<HistoryItem>>
Returns movies and episodes that a user has watched, sorted by most recent.
getLikes({UserLikesType? type, RequestPagination? pagination}) Future<List<UserLike>>
Get items a user likes.
getList(String id, String listId, {bool useOAuth = false}) Future<TraktList>
Returns a single custom list.
getListComments(int id, String listId, {bool useOAuth = false, ListCommentsSortBy sort = ListCommentsSortBy.newest, RequestPagination? pagination}) Future<List<Comment>>
Returns all top level comments for a list.
getListItems(int id, String listId, {bool useOAuth = false, ListType? listType, RequestPagination? pagination, bool extendedFull = false}) Future<List<ListItem>>
Get all items on a custom list.
getListLikes(int id, String listId, {bool useOAuth = false, RequestPagination? pagination}) Future<List<ListLikes>>
Returns all users who liked a list.
getLists(String id, {bool useOAuth = false}) Future<List<TraktList>>
Returns all custom lists for a user.
getPersonalRecommendations(String id, {MoviesShowsType? type, SortBy? sortBy, bool extendedFull = false, RequestPagination? pagination}) Future<List<PersonalRecommendation>>
Returns all items a user personally recommendeds to others including optional notes explaining why they recommended an item.
getProfile(String id, {bool extendedFull = false, bool? extendedVIP, bool useOAuth = false}) Future<User>
Get a user's profile information.
getRatings(String id, {MediaType? type, List<int>? ratings, bool useOAuth = false, bool extendedFull = false, RequestPagination? pagination}) Future<List<RatedItem>>
Get a user's ratings filtered by type.
getSettings() Future<UserSettings>
Get the user's settings so you can align your app's experience with what they're used to on the trakt website.
getStats(String id, {bool useOAuth = false}) Future<Stats>
Returns stats about the movies, shows, and episodes a user has watched, collected, and rated.
getWatched(String id, MoviesShowsType type, {bool useOAuth = false, bool extendedFull = false, bool? extendedNoSeasons}) Future<List<WatchedItem>>
Returns all movies or shows a user has watched sorted by most plays.
getWatching(String id, {bool useOAuth = false, bool extendedFull = false}) Future<Watching>
Returns a movie or episode if the user is currently watching something.
getWatchlist(String id, {WatchedItemType? type, SortBy? sortBy, bool useOAuth = false, bool extendedFull = false, RequestPagination? pagination}) Future<List<WatchlistItem>>
Returns all items in a user's watchlist filtered by type.
likeList(int id, String listId) Future<void>
Votes help determine popular lists. Only one like is allowed per list per user.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeHiddenItems({required HiddenItemSection section, List<Movie> movies = const [], List<Show> shows = const [], List<Season> seasons = const []}) Future<HiddenItem>
Unhide items for a specific section. Here's what type of items can unhidden for each section.
removeItemsFromCustomList(int id, String listId, {List<Movie> movies = const [], List<Show> shows = const [], List<Season> seasons = const [], List<Episode> episodes = const [], List<Person> people = const []}) Future<RemoveFromCustomListResponse>
Remove one or more items from a custom list.
removeListLike(int id, String listId) Future<void>
Remove a like on a list.
reorderListItems(String id, String listId, List<int> itemIds) Future<ReorderListResponse>
Reorder all items on a list by sending the updated rank of list item ids.
reorderLists(String id, List<int> listIds) Future<ReorderListResponse>
Reorder all lists by sending the updated rank of list ids.
toString() String
A string representation of this object.
inherited
unfollowUser(String id) Future<void>
Unfollow someone you already follow.
updateCustomList(String id, String listId, {String? name, String? description, CustomListPrivacy? privacy, bool? displayNumbers, bool? allowComments, CustomListSort? sortBy, CustomListSortHow? sortHow}) Future<TraktList>
Update a custom list by sending 1 or more parameters.

Operators

operator ==(Object other) bool
The equality operator.
inherited