Response class abstract
This abstract class represents the common elements of the entity objects corresponding to the Duolingo API.
This abstract class manages the following information.
- status -> HTTP status included in the response returned by the API.
- headers -> Headers included in the response returned by the API.
If you want to check the HTTP status and header information of the response
after calling a method of Duolingo4D
, you can refer to the entity object
that inherits from this abstract class.
Example:
void main() async {
final duolingo = Duolingo.instance;
final authResponse = await duolingo.authenticate(
username: 'test_username',
password: 'test_password',
);
if (authResponse.status.isNotOk) {
authResponse.status.reasonPhrase;
authResponse.headers;
return;
}
}
- Implementers
- AlphabetsResponse
- AuthResponse
- DictionaryResponse
- ForumCommentResponse
- ForumCommentsResponse
- ForumTopicResponse
- ForumTopicsResponse
- LeaderboardResponse
- ManifestResponse
- OverviewResponse
- PurchaseResponse
- RecommendationsResponse
- SearchForumResponse
- SearchFriendResponse
- ShopItemsResponse
- SubscribersResponse
- SubscriptionsResponse
- SwitchLanguageResponse
- UserResponse
- VersionInfoResponse
- WordHintResponse
Constructors
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override