Duolingo class abstract

This class provides the features to access the Duolingo API easily.

Constructors

Duolingo()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
session DuolingoSession
Returns the session information when communicating with the Duolingo API.
no setter

Methods

achievements({String userId, String fromLanguage, String learningLanguage}) Future<AchievementsResponse>
alphabets({String fromLanguage, String learningLanguage}) Future<AlphabetsResponse>
authenticate({required String username, required String password}) Future<AuthResponse>
Authenticate the user using the user information provided as an argument.
cachedAchievements({String userId, String fromLanguage, String learningLanguage}) Future<AchievementsResponse>
cachedAlphabets({String fromLanguage, String learningLanguage}) Future<AlphabetsResponse>
cachedDictionary({required String wordId}) Future<DictionaryResponse>
Returns cached dictionary information linked to wordId.
cachedForumComment({required int commentId}) Future<ForumCommentResponse>
cachedForumTopic({required int topicId}) Future<ForumTopicResponse>
cachedForumTopics() Future<ForumTopicsResponse>
cachedLeaderboard() Future<LeaderboardResponse>
cachedManifest() Future<ManifestResponse>
cachedOverview() Future<OverviewResponse>
Returns cached all learned words associated with the language that the authenticated user is currently learning.
cachedShopItems() Future<ShopItemsResponse>
cachedStories({String fromLanguage, String learningLanguage, IllustrationFormat format = IllustrationFormat.svg}) Future<StoriesResponse>
cachedSubscribers({String userId}) Future<SubscribersResponse>
cachedSubscriptions({String userId}) Future<SubscriptionsResponse>
cachedUser({String userId}) Future<UserResponse>
Returns cached the authenticated user information from userId.
cachedVersionInfo() Future<VersionInfoResponse>
Returns cached metadata about the configuration of the Duolingo service.
cachedWordHint({String fromLanguage, String learningLanguage, required String sentence}) Future<WordHintResponse>
Returns cached hint information of sentence specified in the argument.
cleanCache() → void
Deletes all cached response objects.
cleanCachedAchievements() → void
Deletes the cached data of the response object that was cached by calling the cachedAchievements method.
cleanCachedAlphabets() → void
Deletes the cached data of the response object that was cached by calling the cachedAlphabets method.
cleanCachedDictionary() → void
Deletes the cached data of the response object that was cached by calling the cachedDictionary method.
cleanCachedForumComment() → void
Deletes the cached data of the response object that was cached by calling the cachedForumComment method.
cleanCachedForumTopic() → void
Deletes the cached data of the response object that was cached by calling the cachedForumTopic method.
cleanCachedForumTopics() → void
Deletes the cached data of the response object that was cached by calling the cachedForumTopics method.
cleanCachedLeaderboard() → void
Deletes the cached data of the response object that was cached by calling the cachedLeaderboard method.
cleanCachedManifest() → void
Deletes the cached data of the response object that was cached by calling the cachedManifest method.
cleanCachedOverview() → void
Deletes the cached data of the response object that was cached by calling the cachedOverview method.
cleanCachedShopItems() → void
Deletes the cached data of the response object that was cached by calling the cachedShopItems method.
cleanCachedStories() → void
Deletes the cached data of the response object that was cached by calling the cachedStories method.
cleanCachedSubscribers() → void
Deletes the cached data of the response object that was cached by calling the cachedSubscribers method.
cleanCachedSubscriptions() → void
Deletes the cached data of the response object that was cached by calling the cachedSubscriptions method.
cleanCachedUser() → void
Deletes the cached data of the response object that was cached by calling the cachedUser method.
cleanCachedVersionInfo() → void
Deletes the cached data of the response object that was cached by calling the cachedVersionInfo method.
cleanCachedWordHint() → void
Deletes the cached data of the response object that was cached by calling the cachedWordHint method.
dictionary({required String wordId}) Future<DictionaryResponse>
Returns the dictionary information linked to wordId.
follow({required String targetUserId}) Future<FollowResponse>
forumComment({required int commentId}) Future<ForumCommentResponse>
forumComments({int page = 0, ForumCommentsSortPattern sortPattern = ForumCommentsSortPattern.newest, int topicId = -1}) Future<ForumCommentsResponse>
forumTopic({required int topicId}) Future<ForumTopicResponse>
forumTopics() Future<ForumTopicsResponse>
leaderboard() Future<LeaderboardResponse>
manifest() Future<ManifestResponse>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overview() Future<OverviewResponse>
Returns all learned words associated with the language that the authenticated user is currently learning.
purchase({required String itemId}) Future<PurchaseResponse>
recommendations({String userId}) Future<RecommendationsResponse>
searchForum({int page = 0, int perPage = 10, required String query}) Future<SearchForumResponse>
searchFriend({int page, int perPage, required String query}) Future<SearchFriendResponse>
shopItems() Future<ShopItemsResponse>
stories({IllustrationFormat format = IllustrationFormat.svg}) Future<StoriesResponse>
subscribers({String userId}) Future<SubscribersResponse>
subscriptions({String userId}) Future<SubscriptionsResponse>
switchLanguage({String fromLanguage, required String learningLanguage}) Future<SwitchLanguageResponse>
Switches the learning language for authenticated users.
toString() String
A string representation of this object.
inherited
unfollow({required String targetUserId}) Future<UnfollowResponse>
user({String userId}) Future<UserResponse>
Returns the authenticated user information from userId.
versionInfo() Future<VersionInfoResponse>
Returns metadata about the configuration of the Duolingo service.
wordHint({String fromLanguage, String learningLanguage, required String sentence}) Future<WordHintResponse>
Returns the hint information of sentence specified in the argument.

Operators

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

Static Properties

instance Duolingo
Returns the singleton instance of Duolingo.
no setter