{"id":22154280,"url":"https://github.com/myconsciousness/mastodon-api","last_synced_at":"2026-01-11T04:49:04.622Z","repository":{"id":63360911,"uuid":"567112218","full_name":"myConsciousness/mastodon-api","owner":"myConsciousness","description":"This library provides the easiest and powerful Dart/Flutter library for Mastodon API 🎯","archived":false,"fork":false,"pushed_at":"2024-08-21T07:00:51.000Z","size":995,"stargazers_count":63,"open_issues_count":20,"forks_count":14,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T20:15:50.726Z","etag":null,"topics":["api","dart","flutter","marketing","mastodon","mastodon-api","mastodon-client","mobile","web","wrapper","wrapper-api"],"latest_commit_sha":null,"homepage":"http://pub.dev/packages/mastodon_api","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myConsciousness.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["myConsciousness"],"patreon":["kato_shinya"],"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-11-17T04:58:21.000Z","updated_at":"2024-11-30T08:37:44.000Z","dependencies_parsed_at":"2022-11-17T16:30:44.226Z","dependency_job_id":"71f17d62-7a23-48a3-a60f-8dd34c8991fe","html_url":"https://github.com/myConsciousness/mastodon-api","commit_stats":{"total_commits":209,"total_committers":9,"mean_commits":23.22222222222222,"dds":0.4880382775119617,"last_synced_commit":"0e8ec7a97063658b501aff2f1ee13e20b315c9e8"},"previous_names":["myconsciousness/mastodon-api","mastodon-dart/mastodon-api"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myConsciousness%2Fmastodon-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myConsciousness%2Fmastodon-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myConsciousness%2Fmastodon-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myConsciousness%2Fmastodon-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myConsciousness","download_url":"https://codeload.github.com/myConsciousness/mastodon-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625523,"owners_count":21135515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","dart","flutter","marketing","mastodon","mastodon-api","mastodon-client","mobile","web","wrapper","wrapper-api"],"created_at":"2024-12-02T01:47:01.999Z","updated_at":"2026-01-11T04:49:04.606Z","avatar_url":"https://github.com/myConsciousness.png","language":"Dart","funding_links":["https://github.com/sponsors/myConsciousness","https://patreon.com/[\"kato_shinya\"]","https://github.com/sponsors/myconsciousness"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/mastodon-dart/mastodon-api\"\u003e\n    \u003cimg alt=\"mastodon_api\" width=\"600px\" src=\"https://user-images.githubusercontent.com/13072231/202892481-5b9c8a39-ef55-4dca-a912-e298beb635ca.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eThe Easiest and Powerful Dart/Flutter Library for Mastodon API 🎯\u003c/b\u003e\n\u003c/p\u003e\n\n---\n\n[![GitHub Sponsor](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=ff69b4)](https://github.com/sponsors/myConsciousness)\n[![GitHub Sponsor](https://img.shields.io/static/v1?label=Maintainer\u0026message=myConsciousness\u0026logo=GitHub\u0026color=00acee)](https://github.com/myConsciousness)\n\n[![pub package](https://img.shields.io/pub/v/mastodon_api.svg?logo=dart\u0026logoColor=00b9fc)](https://pub.dartlang.org/packages/mastodon_api)\n[![Dart SDK Version](https://badgen.net/pub/sdk-version/mastodon_api)](https://pub.dev/packages/mastodon_api/)\n[![Test](https://github.com/mastodon-dart/mastodon-api/actions/workflows/test.yml/badge.svg)](https://github.com/mastodon-dart/mastodon-api/actions/workflows/test.yml)\n[![Analyzer](https://github.com/mastodon-dart/mastodon-api/actions/workflows/analyzer.yml/badge.svg)](https://github.com/mastodon-dart/mastodon-api/actions/workflows/analyzer.yml)\n[![codecov](https://codecov.io/gh/mastodon-dart/mastodon-api/branch/main/graph/badge.svg?token=J5GT1PF9Y3)](https://codecov.io/gh/mastodon-dart/mastodon-api)\n[![Issues](https://img.shields.io/github/issues/mastodon-dart/mastodon-api?logo=github\u0026logoColor=white)](https://github.com/mastodon-dart/mastodon-api/issues)\n[![Pull Requests](https://img.shields.io/github/issues-pr/mastodon-dart/mastodon-api?logo=github\u0026logoColor=white)](https://github.com/mastodon-dart/mastodon-api/pulls)\n[![Stars](https://img.shields.io/github/stars/mastodon-dart/mastodon-api?logo=github\u0026logoColor=white)](https://github.com/mastodon-dart/mastodon-api)\n[![Contributors](https://img.shields.io/github/contributors/mastodon-dart/mastodon-api)](https://github.com/mastodon-dart/mastodon-api/graphs/contributors)\n[![Code size](https://img.shields.io/github/languages/code-size/mastodon-dart/mastodon-api?logo=github\u0026logoColor=white)](https://github.com/mastodon-dart/mastodon-api)\n[![Last Commits](https://img.shields.io/github/last-commit/mastodon-dart/mastodon-api?logo=git\u0026logoColor=white)](https://github.com/mastodon-dart/mastodon-api/commits/main)\n[![License](https://img.shields.io/github/license/mastodon-dart/mastodon-api?logo=open-source-initiative\u0026logoColor=green)](https://github.com/mastodon-dart/mastodon-api/blob/main/LICENSE)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/mastodon-dart/mastodon-api/blob/main/CODE_OF_CONDUCT.md)\n\n---\n\n\u003c!-- TOC --\u003e\n\n- [1. Guide 🌎](#1-guide-)\n  - [1.1. Features 💎](#11-features-)\n  - [1.2. Getting Started ⚡](#12-getting-started-)\n    - [1.2.1. Install Library](#121-install-library)\n    - [1.2.2. Import](#122-import)\n    - [1.2.3. Implementation](#123-implementation)\n  - [1.3. Supported Endpoints 👀](#13-supported-endpoints-)\n    - [1.3.1. Instance Service](#131-instance-service)\n      - [1.3.1.1. v1](#1311-v1)\n      - [1.3.1.2. v2](#1312-v2)\n    - [1.3.2. Apps Service](#132-apps-service)\n      - [1.3.2.1. v1](#1321-v1)\n      - [1.3.2.2. v2](#1322-v2)\n    - [1.3.3. Search Service](#133-search-service)\n      - [1.3.3.1. v1](#1331-v1)\n      - [1.3.3.2. v2](#1332-v2)\n    - [1.3.4. Accounts Service](#134-accounts-service)\n      - [1.3.4.1. v1](#1341-v1)\n      - [1.3.4.2. v2](#1342-v2)\n    - [1.3.5. Timelines Service](#135-timelines-service)\n      - [1.3.5.1. v1](#1351-v1)\n    - [1.3.6. Statuses Service](#136-statuses-service)\n      - [1.3.6.1. v1](#1361-v1)\n      - [1.3.6.2. v2](#1362-v2)\n    - [1.3.7. Notifications Service](#137-notifications-service)\n      - [1.3.7.1. v1](#1371-v1)\n      - [1.3.7.2. v2](#1372-v2)\n    - [1.3.8. OEmbed Service](#138-oembed-service)\n      - [1.3.8.1. v1](#1381-v1)\n      - [1.3.8.2. v2](#1382-v2)\n    - [1.3.9. Media Service](#139-media-service)\n      - [1.3.9.1. v1](#1391-v1)\n      - [1.3.9.2. v2](#1392-v2)\n  - [1.4. Tips 🏄](#14-tips-)\n    - [1.4.1. Method Names](#141-method-names)\n    - [1.4.2. Null Parameter at Request](#142-null-parameter-at-request)\n    - [1.4.3. OAuth 2.0 Authorization Code Flow](#143-oauth-20-authorization-code-flow)\n    - [1.4.4. Change the Timeout Duration](#144-change-the-timeout-duration)\n    - [1.4.5. Automatic Retry](#145-automatic-retry)\n      - [1.4.5.1. Exponential Backoff and Jitter](#1451-exponential-backoff-and-jitter)\n      - [1.4.5.2. Do Something on Retry](#1452-do-something-on-retry)\n    - [1.4.6. Thrown Exceptions](#146-thrown-exceptions)\n  - [1.5. Contribution 🏆](#15-contribution-)\n  - [1.6. Contributors ✨](#16-contributors-)\n  - [1.7. Support ❤️](#17-support-️)\n  - [1.8. License 🔑](#18-license-)\n  - [1.9. More Information 🧐](#19-more-information-)\n\n\u003c!-- /TOC --\u003e\n\n# 1. Guide 🌎\n\nThis library provides the easiest way to use [Mastodon API](https://docs.joinmastodon.org/client/intro/) in **Dart** and **Flutter** apps.\n\nThis library was designed and developed by **_Kato Shinya_** ([@myConsciousness](https://github.com/myConsciousness)), the author of [twitter_api_v2](https://pub.dev/packages/twitter_api_v2), and many parts are adapted from [twitter_api_v2](https://pub.dev/packages/twitter_api_v2).\n\n**Show some ❤️ and star the repo to support the project.**\n\nWe also provide [mastodon_oauth2](https://pub.dev/packages/mastodon_oauth2) for easy [OAuth 2.0](https://docs.joinmastodon.org/spec/oauth/) when using the Mastodon API!\n\n## 1.1. Features 💎\n\n✅ The **wrapper library** for **[Mastodon API](https://docs.joinmastodon.org/client/intro/)**. \u003c/br\u003e\n✅ **Easily integrates** with the **Dart** \u0026 **Flutter** apps. \u003c/br\u003e\n✅ Provides response objects with a **guaranteed safe types.** \u003c/br\u003e\n✅ **Well documented** and **well tested**.\u003c/br\u003e\n✅ Supports the powerful **automatic retry**.\u003c/br\u003e\n\n## 1.2. Getting Started ⚡\n\n### 1.2.1. Install Library\n\n**With Dart:**\n\n```bash\n dart pub add mastodon_api\n```\n\n**Or With Flutter:**\n\n```bash\n flutter pub add mastodon_api\n```\n\n### 1.2.2. Import\n\n```dart\nimport 'package:mastodon_api/mastodon_api';\n```\n\n### 1.2.3. Implementation\n\n```dart\nimport 'package:mastodon_api/mastodon_api.dart';\n\nFuture\u003cvoid\u003e main() async {\n  //! You need to specify mastodon instance (domain) you want to access.\n  //! Also you need to get bearer token from your developer page, or OAuth 2.0.\n  final mastodon = MastodonApi(\n    instance: 'MASTODON_INSTANCE',\n    bearerToken: 'YOUR_BEARER_TOKEN',\n\n    //! Automatic retry is available when server error or network error occurs\n    //! when communicating with the API.\n    retryConfig: RetryConfig(\n      maxAttempts: 5,\n      jitter: Jitter(\n        minInSeconds: 2,\n        maxInSeconds: 5,\n      ),\n      onExecute: (event) =\u003e print(\n        'Retry after ${event.intervalInSeconds} seconds... '\n        '[${event.retryCount} times]',\n      ),\n    ),\n\n    //! The default timeout is 10 seconds.\n    timeout: Duration(seconds: 20),\n  );\n\n  try {\n    //! Let's Toot from v1 endpoint!\n    final response = await mastodon.v1.statuses.createStatus(\n      text: 'Toot!',\n    );\n\n    print(response.rateLimit);\n    print(response.data);\n  } on UnauthorizedException catch (e) {\n    print(e);\n  } on RateLimitExceededException catch (e) {\n    print(e);\n  } on MastodonException catch (e) {\n    print(e.response);\n    print(e.body);\n    print(e);\n  }\n}\n```\n\n## 1.3. Supported Endpoints 👀\n\n### 1.3.1. Instance Service\n\n#### 1.3.1.1. v1\n\n| **Endpoint**                                                                                                              | **Method Name**                                                                                                                                                                                                                                                                   |\n| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [GET /api/v1/instance (deprecated)](https://docs.joinmastodon.org/methods/instance/#v1)                                   | [lookupInformation](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupInformation.html)                                                                                                                                                      |\n| [GET /api/v1/instance/peers](https://docs.joinmastodon.org/methods/instance/#peers)                                       | [lookupConnectedDomains](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupConnectedDomains.html)                                                                                                                                            |\n| [GET /api/v1/instance/activity](https://docs.joinmastodon.org/methods/instance/#activity)                                 | [lookupWeeklyActivities](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupWeeklyActivities.html)                                                                                                                                            |\n| [GET /api/v1/instance/rules](https://docs.joinmastodon.org/methods/instance/#rules)                                       | [lookupRules](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupRules.html)                                                                                                                                                                  |\n| [GET /api/v1/instance/domain_block](https://docs.joinmastodon.org/methods/instance/#domain_blocks)                        | [lookupBlockedDomains](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupBlockedDomains.html)                                                                                                                                                |\n| [GET /api/v1/example](https://docs.joinmastodon.org/methods/instance/#extended_description)                               | [lookupExtendedDescription](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupExtendedDescription.html)                                                                                                                                      |\n| [GET /api/v1/announcements](https://docs.joinmastodon.org/methods/announcements/#get)                                     | [lookupAnnouncements](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupAnnouncements.html)\u003c/br\u003e[lookupActiveAnnouncements](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupActiveAnnouncements.html) |\n| [POST /api/v1/announcements/:id/dismiss](https://docs.joinmastodon.org/methods/announcements/#dismiss)                    | [createMarkAnnouncementAsRead](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/createMarkAnnouncementAsRead.html)                                                                                                                                |\n| [PUT /api/v1/announcements/:id/reactions/:name](https://docs.joinmastodon.org/methods/announcements/#put-reactions)       | [createReactionToAnnouncement](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/createReactionToAnnouncement.html)                                                                                                                                |\n| [DELETE /api/v1/announcements/:id/reactions/:name](https://docs.joinmastodon.org/methods/announcements/#delete-reactions) | [destroyReactionToAnnouncement](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/destroyReactionToAnnouncement.html)                                                                                                                              |\n| [GET /api/v1/custom_emojis](https://docs.joinmastodon.org/methods/custom_emojis/#get)                                     | [lookupAvailableEmoji](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupAvailableEmoji.html)                                                                                                                                                |\n| [GET /api/v1/directory](https://docs.joinmastodon.org/methods/directory/#get)                                             | [lookupAccounts](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupAccounts.html)                                                                                                                                                            |\n\n#### 1.3.1.2. v2\n\n| **Endpoint**                                                               | **Method Name**                                                                                                              |\n| -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| [GET /api/v2/instance](https://docs.joinmastodon.org/methods/instance/#v2) | [lookupInformation](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/InstanceV1Service/lookupInformation.html) |\n\n### 1.3.2. Apps Service\n\n#### 1.3.2.1. v1\n\n| **Endpoint**                                                                                          | **Method Name**                                                                                                                            |\n| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| [POST /api/v1/apps](https://docs.joinmastodon.org/methods/apps/#create)                               | [createApplication](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AppsV1Service/createApplication.html)                   |\n| [GET /api/v1/apps/verify_credentials](https://docs.joinmastodon.org/methods/apps/#verify_credentials) | [verifyOAuthCredentials](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AppsV1Service/verifyOAuthCredentials.html)         |\n| [POST /api/v1/emails/confirmation](https://docs.joinmastodon.org/methods/emails/#confirmation)        | [createNewConfirmationEmail](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AppsV1Service/createNewConfirmationEmail.html) |\n\n#### 1.3.2.2. v2\n\n### 1.3.3. Search Service\n\n#### 1.3.3.1. v1\n\n#### 1.3.3.2. v2\n\n| **Endpoint**                                                           | **Method Name**                                                                                                     |\n| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |\n| [GET /api/v2/search](https://docs.joinmastodon.org/methods/search/#v2) | [searchContents](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/SarchV2Service/searchContents.html) |\n\n### 1.3.4. Accounts Service\n\n#### 1.3.4.1. v1\n\n| **Endpoint**                                                                                                             | **Method Name**                                                                                                                                              |\n| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| [POST /api/v1/accounts](https://docs.joinmastodon.org/methods/accounts/#create)                                          | [createAccount](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createAccount.html)                                         |\n| [GET /api/v1/accounts/verify_credentials](https://docs.joinmastodon.org/methods/accounts/#verify_credentials)            | [verifyAccountCredentials](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/verifyAccountCredentials.html)                   |\n| [PATCH /api/v1/accounts/update_credentials](https://docs.joinmastodon.org/methods/accounts/#verify_credentials)          | [updateAccount](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/updateAccount.html)                                         |\n| [PATCH /api/v1/accounts/update_credentials](https://docs.joinmastodon.org/methods/accounts/#verify_credentials)          | [updateAvatarImage](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/updateAvatarImage.html)                                 |\n| [PATCH /api/v1/accounts/update_credentials](https://docs.joinmastodon.org/methods/accounts/#verify_credentials)          | [updateHeaderImage](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/updateHeaderImage.html)                                 |\n| [GET /api/v1/accounts/:id](https://docs.joinmastodon.org/methods/accounts/#get)                                          | [lookupAccount](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupAccount.html)                                         |\n| [GET /api/v1/accounts/:id/statuses](https://docs.joinmastodon.org/methods/accounts/#statuses)                            | [lookupStatuses](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupStatuses.html)                                       |\n| [GET /api/v1/accounts/:id/followers](https://docs.joinmastodon.org/methods/accounts/#followers)                          | [lookupFollowers](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupFollowers.html)                                     |\n| [GET /api/v1/accounts/:id/following](https://docs.joinmastodon.org/methods/accounts/#following)                          | [lookupFollowings](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupFollowings.html)                                   |\n| [GET /api/v1/accounts/:id/featured_tags](https://docs.joinmastodon.org/methods/accounts/#featured_tags)                  | [lookupFeaturedTags](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupFeaturedTags.html)                               |\n| [GET /api/v1/accounts/:id/lists](https://docs.joinmastodon.org/methods/accounts/#lists)                                  | [lookupContainedLists](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupContainedLists.html)                           |\n| [POST /api/v1/accounts/:id/follow](https://docs.joinmastodon.org/methods/accounts/#follow)                               | [createFollow](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createFollow.html)                                           |\n| [POST /api/v1/accounts/:id/unfollow](https://docs.joinmastodon.org/methods/accounts/#unfollow)                           | [destroyFollow](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyFollow.html)                                         |\n| [POST /api/v1/accounts/:id/remove_from_followers](https://docs.joinmastodon.org/methods/accounts/#remove_from_followers) | [destroyFollower](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyFollower.html)                                     |\n| [POST /api/v1/accounts/:id/block](https://docs.joinmastodon.org/methods/accounts/#block)                                 | [createBlock](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createBlock.html)                                             |\n| [POST /api/v1/accounts/:id/unblock](https://docs.joinmastodon.org/methods/accounts/#unblock)                             | [destroyBlock](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyBlock.html)                                           |\n| [POST /api/v1/accounts/:id/mute](https://docs.joinmastodon.org/methods/accounts/#mute)                                   | [createMute](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createMute.html)                                               |\n| [POST /api/v1/accounts/:id/unmute](https://docs.joinmastodon.org/methods/accounts/#unmute)                               | [destroyMute](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyMute.html)                                             |\n| [POST /api/v1/accounts/:id/pin](https://docs.joinmastodon.org/methods/accounts/#pin)                                     | [createFeaturedProfile](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createFeaturedProfile.html)                         |\n| [POST /api/v1/accounts/:id/unpin](https://docs.joinmastodon.org/methods/accounts/#unpin)                                 | [destroyFeaturedProfile](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyFeaturedProfile.html)                       |\n| [POST /api/v1/accounts/:id/note](https://docs.joinmastodon.org/methods/accounts/#note)                                   | [updatePrivateComment](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/updatePrivateComment.html)                           |\n| [GET /api/v1/accounts/relationships](https://docs.joinmastodon.org/methods/accounts/#relationships)                      | [lookupRelationships](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupRelationships.html)                             |\n| [GET /api/v1/accounts/familiar_followers](https://docs.joinmastodon.org/methods/accounts/#familiar_followers)            | [lookupFamiliarFollowers](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupFamiliarFollowers.html)                     |\n| [GET /api/v1/accounts/search](https://docs.joinmastodon.org/methods/accounts/#search)                                    | [searchAccounts](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/searchAccounts.html)                                       |\n| [GET /api/v1/accounts/lookup](https://docs.joinmastodon.org/methods/accounts/#lookup)                                    | [lookupAccountFromWebFingerAddress](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupAccountFromWebFingerAddress.html) |\n| [GET /api/v1/preferences](https://docs.joinmastodon.org/methods/preferences/#get)                                        | [lookupPreferences](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupPreferences.html)                                 |\n| [GET /api/v1/featured_tags](https://docs.joinmastodon.org/methods/featured_tags/#get)                                    | [lookupOwnedFeaturedTags](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupOwnedFeaturedTags.html)                     |\n| [POST /api/v1/featured_tags](https://docs.joinmastodon.org/methods/featured_tags/#feature)                               | [createFeaturedTag](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createFeaturedTag.html)                                 |\n| [DELETE /api/v1/featured_tags/:id](https://docs.joinmastodon.org/methods/featured_tags/#unfeature-a-tag-unfeature)       | [destroyFeaturedTag](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyFeaturedTag.html)                               |\n| [GET /api/v1/featured_tags/suggestions](https://docs.joinmastodon.org/methods/featured_tags/#suggestions)                | [lookupSuggestedTags](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupSuggestedTags.html)                             |\n| [GET /api/v1/followed_tags](https://docs.joinmastodon.org/methods/followed_tags/#get)                                    | [lookupFollowedTags](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupFollowedTags.html)                               |\n| [DELETE /api/v1/suggestions/:account_id](https://docs.joinmastodon.org/methods/suggestions/#remove)                      | [destroyFollowSuggestion](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyFollowSuggestion.html)                     |\n| [GET /api/v1/tags/:id](https://docs.joinmastodon.org/methods/tags/#get)                                                  | [lookupTag](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupTag.html)                                                 |\n| [POST /api/v1/tags/:id/follow](https://docs.joinmastodon.org/methods/tags/#follow)                                       | [createFollowingTag](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createFollowingTag.html)                               |\n| [POST /api/v1/tags/:id/unfollow](https://docs.joinmastodon.org/methods/tags/#unfollow)                                   | [destroyFollowingTag](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyFollowingTag.html)                             |\n| [POST /api/v1/reports](https://docs.joinmastodon.org/methods/reports/#post)                                              | [createReport](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createReport.html)                                           |\n| [GET /api/v1/endorsements](https://docs.joinmastodon.org/methods/endorsements/#get)                                      | [lookupFeaturedProfiles](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupFeaturedProfiles.html)                       |\n| [GET /api/v1/mutes](https://docs.joinmastodon.org/methods/mutes/#get)                                                    | [lookupMutedAccounts](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupMutedAccounts.html)                             |\n| [GET /api/v1/favourites](https://docs.joinmastodon.org/methods/favourites/#get)                                          | [lookupFavouritedStatuses](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupFavouritedStatuses.html)                   |\n| [GET /api/v1/blocks](https://docs.joinmastodon.org/methods/blocks/#get)                                                  | [lookupBlockedAccounts](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupBlockedAccounts.html)                         |\n| [GET /api/v1/bookmarks](https://docs.joinmastodon.org/methods/bookmarks/#get)                                            | [lookupBookmarkedStatuses](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupBookmarkedStatuses.html)                   |\n| [GET /api/v1/domain_blocks](https://docs.joinmastodon.org/methods/domain_blocks/#get)                                    | [lookupBlockedDomains](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupBlockedDomains.html)                           |\n| [POST /api/v1/domain_blocks](https://docs.joinmastodon.org/methods/domain_blocks/#block)                                 | [createBlockedDomain](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createBlockedDomain.html)                             |\n| [DELETE /api/v1/domain_blocks](https://docs.joinmastodon.org/methods/domain_blocks/#unblock)                             | [destroyBlockedDomain](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyBlockedDomain.html)                           |\n| [GET /api/v1/follow_requests](https://docs.joinmastodon.org/methods/follow_requests/#get)                                | [lookupFollowRequests](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/lookupFollowRequests.html)                           |\n| [POST /api/v1/follow_requests/:account_id/authorize](https://docs.joinmastodon.org/methods/follow_requests/#accept)      | [createFollower](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/createFollower.html)                                       |\n| [POST /api/v1/follow_requests/:account_id/reject](https://docs.joinmastodon.org/methods/follow_requests/#reject)         | [destroyFollowRequest](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV1Service/destroyFollowRequest.html)                           |\n\n#### 1.3.4.2. v2\n\n| **Endpoint**                                                                     | **Method Name**                                                                                                                          |\n| -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |\n| [GET /api/v2/suggestions](https://docs.joinmastodon.org/methods/suggestions/#v2) | [lookupFollowSuggestions](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/AccountsV2Service/lookupFollowSuggestions.html) |\n\n### 1.3.5. Timelines Service\n\n#### 1.3.5.1. v1\n\n| **Endpoint**                                                                                     | **Method Name**                                                                                                                                     |\n| ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [GET /api/v1/timelines/public](https://docs.joinmastodon.org/methods/timelines/#public)          | [lookupPublicTimeline](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/lookupPublicTimeline.html)                 |\n| [GET /api/v1/timelines/tag/:hashtag](https://docs.joinmastodon.org/methods/timelines/#tag)       | [lookupTimelineByHashtag](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/lookupTimelineByHashtag.html)           |\n| [GET /api/v1/timelines/home](https://docs.joinmastodon.org/methods/timelines/#home)              | [lookupHomeTimeline](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/lookupHomeTimeline.html)                     |\n| [GET /api/v1/timelines/list/:list_id](https://docs.joinmastodon.org/methods/timelines/#list)     | [lookupListTimeline](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/lookupListTimeline.html)                     |\n| [GET /api/v1/conversations](https://docs.joinmastodon.org/methods/conversations/#get)            | [lookupConversations](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/lookupConversations.html)                   |\n| [DELETE /api/v1/conversations/:id](https://docs.joinmastodon.org/methods/conversations/#delete)  | [destroyConversation](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/destroyConversation.html)                   |\n| [POST /api/v1/conversations/:id/read](https://docs.joinmastodon.org/methods/conversations/#read) | [createMarkConversationAsRead](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/createMarkConversationAsRead.html) |\n| [GET /api/v1/markers](https://docs.joinmastodon.org/methods/markers/#get)                        | [lookupStatusSnapshot](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/lookupStatusSnapshot.html)                 |\n| [GET /api/v1/markers](https://docs.joinmastodon.org/methods/markers/#get)                        | [lookupNotificationSnapshot](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/lookupNotificationSnapshot.html)     |\n| [POST /api/v1/markers](https://docs.joinmastodon.org/methods/markers/#create)                    | [createStatusSnapshot](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/createStatusSnapshot.html)                 |\n| [POST /api/v1/markers](https://docs.joinmastodon.org/methods/markers/#create)                    | [createNotificationSnapshot](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/TimelinesV1Service/createNotificationSnapshot.html)     |\n\n### 1.3.6. Statuses Service\n\n#### 1.3.6.1. v1\n\n| **Endpoint**                                                                                              | **Method Name**                                                                                                                                                                                                                     |\n| --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [POST /api/v1/statuses](https://docs.joinmastodon.org/methods/statuses/#create)                           | [createStatus](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/createStatus.html)                                                                                                                  |\n| [GET /api/v1/polls/:id](https://docs.joinmastodon.org/methods/polls/#get)                                 | [lookupPollById](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/lookupPollById.html)                                                                                                              |\n| [POST /api/v1/polls/:id/votes](https://docs.joinmastodon.org/methods/polls/#get)                          | [createVote](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/createVote.html)\u003c/br\u003e[createVotes](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/createVotes.html) |\n| [GET /api/v1/statuses/:id](https://docs.joinmastodon.org/methods/statuses/#get)                           | [lookupStatus](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/lookupStatus.html)                                                                                                                  |\n| [DELETE /api/v1/statuses/:id](https://docs.joinmastodon.org/methods/statuses/#delete)                     | [destroyStatus](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/destroyStatus.html)                                                                                                                |\n| [GET /api/v1/statuses/:id/context](https://docs.joinmastodon.org/methods/statuses/#context)               | [lookupStatusContext](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/lookupStatusContext.html)                                                                                                    |\n| [GET /api/v1/statuses/:id/reblogged_by](https://docs.joinmastodon.org/methods/statuses/#reblogged_by)     | [lookupRebloggedUsers](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/lookupRebloggedUsers.html)                                                                                                  |\n| [GET /api/v1/statuses/:id/favourited_by](https://docs.joinmastodon.org/methods/statuses/#favourited_by)   | [lookupFavouritedUsers](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/lookupFavouritedUsers.html)                                                                                                |\n| [POST /api/v1/statuses/:id/favourite](https://docs.joinmastodon.org/methods/statuses/#favourite)          | [createFavourite](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/createFavourite.html)                                                                                                            |\n| [POST /api/v1/statuses/:id/unfavourite](https://docs.joinmastodon.org/methods/statuses/#unfavourite)      | [destroyFavourite](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/destroyFavourite.html)                                                                                                          |\n| [POST /api/v1/statuses/:id/reblog](https://docs.joinmastodon.org/methods/statuses/#reblog)                | [createReblog](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/createReblog.html)                                                                                                                  |\n| [POST /api/v1/statuses/:id/unreblog](https://docs.joinmastodon.org/methods/statuses/#unreblog)            | [destroyReblog](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/destroyReblog.html)                                                                                                                |\n| [POST /api/v1/statuses/:id/bookmark](https://docs.joinmastodon.org/methods/statuses/#bookmark)            | [createBookmark](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/createBookmark.html)                                                                                                              |\n| [POST /api/v1/statuses/:id/unbookmark](https://docs.joinmastodon.org/methods/statuses/#unbookmark)        | [destroyBookmark](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/destroyBookmark.html)                                                                                                            |\n| [POST /api/v1/statuses/:id/mute](https://docs.joinmastodon.org/methods/statuses/#mute)                    | [createMute](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/createMute.html)                                                                                                                      |\n| [POST /api/v1/statuses/:id/unmute](https://docs.joinmastodon.org/methods/statuses/#unmute)                | [destroyMute](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/destroyMute.html)                                                                                                                    |\n| [POST /api/v1/statuses/:id/pin](https://docs.joinmastodon.org/methods/statuses/#pin)                      | [createPinnedStatus](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/createPinnedStatus.html)                                                                                                      |\n| [POST /api/v1/statuses/:id/unpin](https://docs.joinmastodon.org/methods/statuses/#unpin)                  | [destroyPinnedStatus](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/destroyPinnedStatus.html)                                                                                                    |\n| [PUT /api/v1/statuses/:id](https://docs.joinmastodon.org/methods/statuses/#edit)                          | [updateStatus](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/updateStatus.html)                                                                                                                  |\n| [GET /api/v1/statuses/:id/history](https://docs.joinmastodon.org/methods/statuses/#history)               | [lookupEditHistory](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/lookupEditHistory.html)                                                                                                        |\n| [GET /api/v1/statuses/:id/source](https://docs.joinmastodon.org/methods/statuses/#source)                 | [lookupEditableSource](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/lookupEditableSource.html)                                                                                                  |\n| [GET /api/v1/scheduled_statuses](https://docs.joinmastodon.org/methods/scheduled_statuses/#get)           | [lookupScheduledStatuses](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/lookupScheduledStatuses.html)                                                                                            |\n| [GET /api/v1/scheduled_statuses/:id](https://docs.joinmastodon.org/methods/scheduled_statuses/#get-one)   | [lookupScheduledStatus](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/lookupScheduledStatus.html)                                                                                                |\n| [PUT /api/v1/scheduled_statuses/:id](https://docs.joinmastodon.org/methods/scheduled_statuses/#update)    | [updateScheduledStatus](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/updateScheduledStatus.html)                                                                                                |\n| [DELETE /api/v1/scheduled_statuses/:id](https://docs.joinmastodon.org/methods/scheduled_statuses/#cancel) | [destroyScheduledStatus](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/StatusesV1Service/destroyScheduledStatus.html)                                                                                              |\n\n#### 1.3.6.2. v2\n\n### 1.3.7. Notifications Service\n\n#### 1.3.7.1. v1\n\n| **Endpoint**                                                                                           | **Method Name**                                                                                                                               |\n| ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| [GET /api/v1/notifications](https://docs.joinmastodon.org/methods/notifications/#get)                  | [lookupNotifications](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/NotificationsV1Service/lookupNotifications.html)         |\n| [GET /api/v1/notification/:id](https://docs.joinmastodon.org/methods/notifications/#get-one)           | [lookupNotification](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/NotificationsV1Service/lookupNotification.html)           |\n| [POST /api/v1/notifications/clear](https://docs.joinmastodon.org/methods/notifications/#clear)         | [destroyAllNotifications](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/NotificationsV1Service/destroyAllNotifications.html) |\n| [POST /api/v1/notifications/:id/dismiss](https://docs.joinmastodon.org/methods/notifications/#dismiss) | [destroyNotification](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/NotificationsV1Service/destroyNotification.html)         |\n\n#### 1.3.7.2. v2\n\n### 1.3.8. OEmbed Service\n\n#### 1.3.8.1. v1\n\n| **Endpoint**                                                         | **Method Name**                                                                                                                |\n| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| [GET /api/oembed](https://docs.joinmastodon.org/methods/oembed/#get) | [lookupOEmbedMetadata](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/OEmbedService/lookupOEmbedMetadata.html) |\n\n#### 1.3.8.2. v2\n\n### 1.3.9. Media Service\n\n#### 1.3.9.1. v1\n\n| **Endpoint**                                                                       | **Method Name**                                                                                               |\n| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |\n| [POST /api/v1/media (deprecated)](https://docs.joinmastodon.org/methods/media/#v1) | [uploadMedia](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MediaV1Service/uploadMedia.html) |\n| [GET /api/v1/media/:id](https://docs.joinmastodon.org/methods/media/#get)          | [lookupMedia](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MediaV1Service/lookupMedia.html) |\n| [PUT /api/v1/media/:id](https://docs.joinmastodon.org/methods/media/#update)       | [updateMedia](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MediaV1Service/updateMedia.html) |\n\n#### 1.3.9.2. v2\n\n| **Endpoint**                                                          | **Method Name**                                                                                               |\n| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |\n| [POST /api/v2/media](https://docs.joinmastodon.org/methods/media/#v2) | [uploadMedia](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MediaV2Service/uploadMedia.html) |\n\n## 1.4. Tips 🏄\n\n### 1.4.1. Method Names\n\n**mastodon_api** uses the following standard prefixes depending on endpoint characteristics. So it's very easy to find the method corresponding to the endpoint you want to use!\n\n| Prefix      | Description                                                                                       |\n| ----------- | ------------------------------------------------------------------------------------------------- |\n| **lookup**  | This prefix is attached to endpoints that reference toots, accounts, etc.                         |\n| **search**  | This prefix is attached to endpoints that perform extensive searches.                             |\n| **connect** | This prefix is attached to endpoints with high-performance streaming.                             |\n| **create**  | This prefix is attached to the endpoint performing the create state such as `Toot` and `Follow`.  |\n| **destroy** | This prefix is attached to the endpoint performing the destroy state such as `Toot` and `Follow`. |\n| **update**  | This prefix is attached to the endpoint performing the update state.                              |\n| **upload**  | This prefix is attached to the endpoint performing the media uploading.                           |\n| **verify**  | This prefix is attached to the endpoint performing the verify specific states or values.          |\n\n### 1.4.2. Null Parameter at Request\n\nIn this library, parameters that are not required at request time, i.e., optional parameters, are defined as nullable.\nHowever, developers do not need to be aware of the null parameter when sending requests when using this library.\n\nIt means the parameters specified with a null value are safely removed and ignored before the request is sent.\n\nFor example, arguments specified with null are ignored in the following request.\n\n```dart\nimport 'package:mastodon_api/mastodon_api.dart';\n\nFuture\u003cvoid\u003e main() async {\n  final mastodon = MastodonApi(\n    instance: 'MASTODON_INSTANCE',\n    bearerToken: 'YOUR_BEARER_TOKEN',\n  );\n\n  await mastodon.v1.statuses.createStatus(\n    text: 'Toot!',\n\n    //! These parameters are ignored at request because they are null.\n    poll: null,\n    sensitive: null,\n  );\n}\n```\n\n### 1.4.3. OAuth 2.0 Authorization Code Flow\n\n**Mastodon API** supports authentication methods with [OAuth 2.0](https://docs.joinmastodon.org/methods/oauth/), and it allows users of apps using **Mastodon API** to request authorization for the minimum necessary [scope](https://docs.joinmastodon.org/api/oauth-scopes/) of operation.\n\nSince **OAuth2.0** authentication requires going through a browser, **mastodon_api** does not provide this specification for compatibility with CLI applications. Instead, we provide [mastodon_oauth2](https://pub.dev/packages/mastodon_oauth2), a library for Flutter apps.\n\nThe **mastodon_oauth2** is 100% compatible with **mastodon_api** and can be used. You can see more details from links below.\n\n- [Repository](https://github.com/mastodon-dart/mastodon-oauth2)\n- [Pub.dev](https://pub.dev/packages/mastodon_oauth2)\n\n### 1.4.4. Change the Timeout Duration\n\nThe library specifies a default timeout of **10 seconds** for all API communications.\n\nHowever, there may be times when you wish to specify an arbitrary timeout duration. If there is such a demand, an arbitrary timeout duration can be specified as follows.\n\n```dart\nimport 'package:mastodon_api/mastodon_api.dart';\n\nFuture\u003cvoid\u003e main() {\n final mastodon = MastodonApi(\n    instance: 'MASTODON_INSTANCE',\n    bearerToken: 'YOUR_TOKEN_HERE',\n\n    //! The default timeout is 10 seconds.\n    timeout: Duration(seconds: 20),\n  );\n}\n```\n\n### 1.4.5. Automatic Retry\n\nDue to the nature of this library's communication with external systems, timeouts may occur due to inevitable communication failures or temporary crashes of the server to which requests are sent.\n\nWhen such timeouts occur, an effective countermeasure in many cases is to send the request again after a certain interval. And **mastodon_api** provides an **automatic retry** feature as a solution to this problem.\n\nAlso, errors subject to retry are as follows.\n\n- When the status code of the response returned from Mastodon is `500` or `503`.\n- When the network is temporarily lost and a `SocketException` is thrown.\n- When communication times out temporarily and a `TimeoutException` is thrown\n\n#### 1.4.5.1. Exponential Backoff and Jitter\n\nAlthough the algorithm introduced earlier that exponentially increases the retry interval is already powerful, some may believe that it is not yet sufficient to distribute the sensation of retries. It's more distributed than equally spaced retries, but retries still occur at static intervals.\n\nThis problem can be solved by adding a random number called **Jitter**, and this method is called the **Exponential Backoff and Jitter** algorithm. By adding a random number to the exponentially increasing retry interval, the retry interval can be distributed more flexibly.\n\nSimilar to the previous example, **mastodon_api** can be implemented as follows.\n\n```dart\nimport 'package:mastodon_api/mastodon_api.dart';\n\nFuture\u003cvoid\u003e main() async {\n  final mastodon = MastodonApi(\n    instance: 'MASTODON_INSTANCE',\n    bearerToken: 'YOUR_TOKEN_HERE',\n\n    //! Add these lines.\n    retryConfig: RetryConfig(\n      maxAttempts: 3,\n    ),\n  );\n}\n```\n\nIn the above implementation, the interval increases exponentially for each retry count with jitter. It can be expressed by next formula.\n\n\u003e **(2 ^ retryCount) + jitter(Random Number between 0 ~ 3)**\n\n#### 1.4.5.2. Do Something on Retry\n\nIt would be useful to output logging on retries and a popup notifying the user that a retry has been executed. So **mastodon_api** provides callbacks that can perform arbitrary processing when retries are executed.\n\nIt can be implemented as follows.\n\n```dart\nimport 'package:mastodon_api/mastodon_api.dart';\n\nFuture\u003cvoid\u003e main() async {\n  final mastodon = MastodonApi(\n    instance: 'MASTODON_INSTANCE',\n    bearerToken: 'YOUR_TOKEN_HERE',\n    retryConfig: RetryConfig(\n      maxAttempts: 3,\n\n      //! Add this line.\n      onExecute: (event) =\u003e print('Retrying... ${event.retryCount} times.'),\n    ),\n  );\n}\n```\n\nThe [RetryEvent](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/RetryEvent-class.html) passed to the callback contains information on retries.\n\n### 1.4.6. Thrown Exceptions\n\n**mastodon_api** provides a convenient exception object for easy handling of exceptional responses and errors returned from Mastodon API.\n\n| Exception                                                                                                                          | Description                                                                                                           |\n| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| [MastodonException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MastodonException-class.html)                   | The most basic exception object. For example, it can be used to search for posts that have already been deleted, etc. |\n| [UnauthorizedException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/UnauthorizedException-class.html)           | Thrown when authentication fails with the specified access token.                                                     |\n| [RateLimitExceededException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/RateLimitExceededException-class.html) | Thrown when the request rate limit is exceeded.                                                                       |\n| [DataNotFoundException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/DataNotFoundException-class.html)           | Thrown when response has no body or data field in body string, or when 404 status is returned.                        |\n\nAlso, all of the above exceptions thrown from the **mastodon_api** process extend [MastodonException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MastodonException-class.html). This means that you can take all exceptions as [MastodonException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MastodonException-class.html) or handle them as certain exception types, depending on the situation.\n\nHowever note that, if you receive an individual type exception, be sure to define the process so that the individual exception type is cached before [MastodonException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MastodonException-class.html). Otherwise, certain type exceptions will also be caught as [MastodonException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MastodonException-class.html).\n\nTherefore, if you need to catch a specific type of exception in addition to [MastodonException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MastodonException-class.html), be sure to catch [MastodonException](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/MastodonException-class.html) in the bottom catch clause as in the following example.\n\n```dart\nimport 'package:mastodon_api/mastodon_api.dart';\n\nFuture\u003cvoid\u003e main() async {\n  final mastodon = MastodonApi(\n    instance: 'MASTODON_INSTANCE',\n    bearerToken: 'YOUR_TOKEN_HERE',\n  );\n\n  try {\n    final response = await mastodon.v1.statuses.createStatus(text: 'Toot!');\n\n    print(response);\n  } on UnauthorizedException catch (e) {\n    print(e);\n  } on RateLimitExceededException catch (e) {\n    print(e);\n  } on MastodonException catch (e) {\n    print(e);\n  }\n}\n```\n\n## 1.5. Contribution 🏆\n\nIf you would like to contribute to **mastodon_api**, please create an [issue](https://github.com/mastodon-dart/mastodon-api/issues) or create a Pull Request.\n\nThere are many ways to contribute to the OSS. For example, the following subjects can be considered:\n\n- There are request parameters or response fields that are not implemented.\n- Documentation is outdated or incomplete.\n- Have a better way or idea to achieve the functionality.\n- etc...\n\nYou can see more details from resources below:\n\n- [Contributor Covenant Code of Conduct](https://github.com/mastodon-dart/mastodon-api/blob/main/CODE_OF_CONDUCT.md)\n- [Contribution Guidelines](https://github.com/mastodon-dart/mastodon-api/blob/main/CONTRIBUTING.md)\n- [Style Guide](https://github.com/mastodon-dart/mastodon-api/blob/main/STYLEGUIDE.md)\n\nOr you can create a [discussion](https://github.com/mastodon-dart/mastodon-api/discussions) if you like.\n\n**Feel free to join this development, diverse opinions make software better!**\n\n## 1.6. Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"20%\"\u003e\u003ca href=\"https://github.com/myConsciousness\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/13072231?v=4?s=100\" width=\"100px;\" alt=\"KATO, Shinya / 加藤 真也\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKATO, Shinya / 加藤 真也\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=myConsciousness\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=myConsciousness\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#design-myConsciousness\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"#example-myConsciousness\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#fundingFinding-myConsciousness\" title=\"Funding Finding\"\u003e🔍\u003c/a\u003e \u003ca href=\"#ideas-myConsciousness\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-myConsciousness\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#security-myConsciousness\" title=\"Security\"\u003e🛡️\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=myConsciousness\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"#tutorial-myConsciousness\" title=\"Tutorials\"\u003e✅\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"20%\"\u003e\u003ca href=\"https://github.com/MarkOSullivan94\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6950843?v=4?s=100\" width=\"100px;\" alt=\"Mark O'Sullivan\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMark O'Sullivan\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=MarkOSullivan94\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#ideas-MarkOSullivan94\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#question-MarkOSullivan94\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"20%\"\u003e\u003ca href=\"https://github.com/Elleo\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/59350?v=4?s=100\" width=\"100px;\" alt=\"Mike Sheldon\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMike Sheldon\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-Elleo\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#content-Elleo\" title=\"Content\"\u003e🖋\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=Elleo\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/issues?q=author%3AElleo\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=Elleo\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"20%\"\u003e\u003ca href=\"https://github.com/SkywaveTM\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4926340?v=4?s=100\" width=\"100px;\" alt=\"YeongJun\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eYeongJun\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-SkywaveTM\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=SkywaveTM\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"20%\"\u003e\u003ca href=\"https://github.com/alevinetx\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5067356?v=4?s=100\" width=\"100px;\" alt=\"alevinetx\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ealevinetx\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=alevinetx\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#question-alevinetx\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/issues?q=author%3Aalevinetx\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"20%\"\u003e\u003ca href=\"https://github.com/Kraigo\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/8700639?v=4?s=100\" width=\"100px;\" alt=\"Igor\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eIgor\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=Kraigo\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=Kraigo\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/commits?author=Kraigo\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/mastodon-dart/mastodon-api/issues?q=author%3AKraigo\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## 1.7. Support ❤️\n\nThe simplest way to show us your support is by **giving the project a star** at [GitHub](https://github.com/mastodon-dart/mastodon-api) and [Pub.dev](https://pub.dev/packages/mastodon_api).\n\nYou can also support this project by **becoming a sponsor** on GitHub:\n\n\u003cdiv align=\"left\"\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://github.com/sponsors/myconsciousness\"\u003e\n      \u003cimg src=\"https://cdn.ko-fi.com/cdn/kofi3.png?v=3\" height=\"50\" width=\"210\" alt=\"myconsciousness\" /\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\nYou can also show on your repository that your app is made with **mastodon_api** by using one of the following badges:\n\n[![Powered by mastodon_api](https://img.shields.io/badge/Powered%20by-mastodon_api-00acee.svg)](https://github.com/mastodon-dart/mastodon-api)\n[![Powered by mastodon_api](https://img.shields.io/badge/Powered%20by-mastodon_api-00acee.svg?style=flat-square)](https://github.com/mastodon-dart/mastodon-api)\n[![Powered by mastodon_api](https://img.shields.io/badge/Powered%20by-mastodon_api-00acee.svg?style=for-the-badge)](https://github.com/mastodon-dart/mastodon-api)\n\n```license\n[![Powered by mastodon_api](https://img.shields.io/badge/Powered%20by-mastodon_api-00acee.svg)](https://github.com/mastodon-dart/mastodon-api)\n[![Powered by mastodon_api](https://img.shields.io/badge/Powered%20by-mastodon_api-00acee.svg?style=flat-square)](https://github.com/mastodon-dart/mastodon-api)\n[![Powered by mastodon_api](https://img.shields.io/badge/Powered%20by-mastodon_api-00acee.svg?style=for-the-badge)](https://github.com/mastodon-dart/mastodon-api)\n```\n\n## 1.8. License 🔑\n\nAll resources of **mastodon_api** is provided under the `BSD-3` license.\n\n```license\nCopyright 2022 Kato Shinya. All rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided the conditions.\n```\n\n\u003e **Note**\u003c/br\u003e\n\u003e License notices in the source are strictly validated based on `.github/header-checker-lint.yml`. Please check [header-checker-lint.yml](https://github.com/mastodon-dart/mastodon-api/tree/main/.github/header-checker-lint.yml) for the permitted standards.\n\n## 1.9. More Information 🧐\n\n**mastodon_api** was designed and implemented by **_Kato Shinya ([@myConsciousness](https://github.com/myConsciousness))_**.\n\n- [Creator Profile](https://github.com/myConsciousness)\n- [License](https://github.com/mastodon-dart/mastodon-api/blob/main/LICENSE)\n- [API Document](https://pub.dev/documentation/mastodon_api/latest/mastodon_api/mastodon_api-library.html)\n- [Release Note](https://github.com/mastodon-dart/mastodon-api/releases)\n- [Bug Report](https://github.com/mastodon-dart/mastodon-api/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyconsciousness%2Fmastodon-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyconsciousness%2Fmastodon-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyconsciousness%2Fmastodon-api/lists"}