API class
Provides an interface for calling Ruqqus API endpoints
Constructors
Properties
- client → Client
-
Instance of client for accessing
accessToken
final - hashCode → int
-
The hash code for this object.
no setterinherited
- httpClient → HttpClient
-
Allows making HTTP requests to the Ruqqus API
final
- log → Sprint
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userAgent → String
-
A string that identifies the application interacting with the API
final
Methods
-
delete(
{required SubmissionType submissionType, required String id}) → Future - Delete submission
-
deleteAccount(
{required AccountDeletion accountDeletion}) → Future< bool> - Deletes the account accessing the API. There is no going back!
-
disable2fa(
{required Disable2FA disable2fa}) → Future< bool> - Disables 2FA on the account
-
edit<
Submission extends Primary> ({required SubmissionType parentSubmissionType, required String id, required String body}) → Future< Primary?> - Edit submission by replacing previous content body with a new content body
-
enable2fa(
{required Enable2FA enable2fa}) → Future< bool> - Enables 2FA on the account
-
get(
String route, {Map< String, dynamic> headers = const {}}) → Future<Response?> -
Submits a HTTP
GET
request with the givenheaders
-
logoutAll(
{required String password}) → Future< bool> - Logs all other instances out
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String route, {Map< String, dynamic> headers = const {}, Map<String, dynamic> body = const {}}) → Future<Response?> -
Submits a HTTP
POST
request with the givenheaders
andbody
-
submitPost(
{required String targetGuild, required String title, required String body, String? url}) → Future< Post?> -
Submits a
Post
to aGuild
with the specifiedtitle
andbody
, and an optionalurl
hyperlink -
submitReply(
{required SubmissionType parentSubmissionType, required String id, required String body}) → Future< Comment?> -
Submits a
Comment
as a reply to the given submission with the specifiedbody
-
toString(
) → String -
A string representation of this object.
inherited
-
updateEmail(
{required UpdateEmail updateEmail}) → Future< bool> - Updates the account's email
-
updatePassword(
{required UpdatePassword updatePassword}) → Future< bool> - Updates the account's password
-
updateProfileSettings(
{required ProfileSettings profileSettings}) → Future< bool> - Updates the account's profile settings
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited