{"id":15436304,"url":"https://github.com/arunprakashg/wordpress_client","last_synced_at":"2025-08-20T20:32:17.625Z","repository":{"id":43073420,"uuid":"384466786","full_name":"ArunPrakashG/wordpress_client","owner":"ArunPrakashG","description":"A powerful and easy-to-use WordPress REST API client for Dart \u0026 Flutter.","archived":false,"fork":false,"pushed_at":"2024-09-08T17:17:43.000Z","size":759,"stargazers_count":34,"open_issues_count":1,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T07:53:15.041Z","etag":null,"topics":["dart","dart-library","flutter","hacktoberfest","hacktoberfest2021","wordpress"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArunPrakashG.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-07-09T14:45:38.000Z","updated_at":"2024-10-10T11:29:39.000Z","dependencies_parsed_at":"2024-01-20T20:26:55.130Z","dependency_job_id":"fc2e4fbc-5815-42ad-a716-46edc8875fda","html_url":"https://github.com/ArunPrakashG/wordpress_client","commit_stats":{"total_commits":284,"total_committers":6,"mean_commits":"47.333333333333336","dds":"0.021126760563380254","last_synced_commit":"b67f60f650d20f7723da39640666bb24f8189dcc"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ArunPrakashG/wordpress_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunPrakashG%2Fwordpress_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunPrakashG%2Fwordpress_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunPrakashG%2Fwordpress_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunPrakashG%2Fwordpress_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArunPrakashG","download_url":"https://codeload.github.com/ArunPrakashG/wordpress_client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunPrakashG%2Fwordpress_client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271378680,"owners_count":24749192,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dart","dart-library","flutter","hacktoberfest","hacktoberfest2021","wordpress"],"created_at":"2024-10-01T18:49:49.638Z","updated_at":"2025-08-20T20:32:17.226Z","avatar_url":"https://github.com/ArunPrakashG.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/arunprakashg"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eWordPress Client\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pub.dev/packages/wordpress_client\"\u003e\n      \u003cimg src=\"https://img.shields.io/pub/v/wordpress_client?color=blueviolet\" alt=\"Pub Version\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/ArunPrakashG/wordpress_client/blob/master/LICENSE\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/license/ArunPrakashG/wordpress_client?color=blue\" alt=\"License\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/ArunPrakashG/wordpress_client/stargazers\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/stars/ArunPrakashG/wordpress_client?style=social\" alt=\"Stars\"/\u003e\n    \u003c/a\u003e\n    \u003cbr\u003e\n    \u003cimg src=\"https://img.shields.io/badge/dart-%230175C2.svg?style=for-the-badge\u0026logo=dart\u0026logoColor=white\" alt=\"Dart\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Flutter-%2302569B.svg?style=for-the-badge\u0026logo=Flutter\u0026logoColor=white\" alt=\"Flutter\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/WordPress-%23117AC9.svg?style=for-the-badge\u0026logo=WordPress\u0026logoColor=white\" alt=\"WordPress\"/\u003e\n    \u003cbr\u003e\n    \u003cb\u003eA powerful and easy-to-use WordPress REST API client for Dart \u0026 Flutter.\u003c/b\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## 🚀 Features\n\n- 📦 API discovery support.\n- ⏲️ Measures request completion time.\n- 📝 Supports all CRUD operations.\n- 🌐 Supports all common endpoints.\n- 🎨 Custom Requests \u0026 Authorization systems.\n- 🔐 3 Popular authorization methods.\n- 📦 Third party Database integration.\n- 🔧 Middlewares for request \u0026 response operations.\n- 🎣 Events for preprocessing response.\n- 🚀 Execute requests in Parallel.\n\n## Future\n\nIf you find any functionality which you require is missing from the package and you are not able to work it out using built in options like raw requests etc, then please share the functionality in details as a comment here: https://github.com/ArunPrakashG/wordpress_client/discussions/55\n\n## 📦 Installation\n\nAdd `wordpress_client` to your `pubspec.yaml`:\n\n```dart\ndependencies:\n wordpress_client: ^8.5.3\n```\n\n\u003e 💡 Ensure you get the [latest version here](https://pub.dev/packages/wordpress_client).\n\nThen run `flutter pub get` to install the package.\n\n## 🔧 Usage\n\nImport the package where you need:\n\n```dart\nimport 'package:wordpress_client/wordpress_client.dart';\n```\n\n### **2. Initialization**\n\nYou can initialize `WordpressClient` in two methods:\n\n- Default (Simple Method)\n- Advanced (with Bootstrapper for additional configurations)\n\n**Simple Method:**\n\n```dart\nfinal baseUrl = Uri.parse('https://example.com/wp-json/wp/v2');\nfinal client = WordpressClient(baseUrl: baseUrl);\n```\n\n\u003e 📘 Learn more about the [Advanced Method here](https://github.com/ArunPrakashG/wordpress_client/wiki/Usage#-advanced-method).\n\n### **3. Sending Requests**\n\nExample to retrieve 20 recent WordPress posts in ascending order:\n\n```dart\nfinal request = ListPostRequest(\n  page: 1,\n  perPage: 20,\n  order = Order.asc,\n);\n\nfinal response = await client.posts.list(request);\n\n// Dart 3 style\nswitch (response) {\n    case WordpressSuccessResponse():\n      final data = response.data; // List\u003cPost\u003e\n      break;\n    case WordpressFailureResponse():\n      final error = response.error; // WordpressError\n      break;\n}\n\n// or\n// using map method to handle both success and failure\nfinal result = response.map(\n    onSuccess: (response) {\n      // response is a WordpressSuccessResponse\u003cList\u003cPost\u003e\u003e\n\n      print(response.message);\n      return response.data;\n    },\n    onFailure: (response) {\n      // response is a WordpressFailureResponse\n      print(response.error.toString());\n      return \u003cPost\u003e[];\n    },\n);\n\n// or\n// you can cast to a state directly; this will throw an error if the response is of the wrong type\nfinal result = response.asSuccess(); // or response.asFailure();\n```\n\nRefer to the [documentation](https://github.com/ArunPrakashG/wordpress_client/wiki/Usage) for more request examples.\n\n## 🔒 Supported Authorization\n\n### 1. **AppPasswordAuth**\n\nBy the WordPress Team, this method uses basic HTTP authentication where credentials are passed with every request. [Details](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/)\n\n### 2. **BasicJwtAuth**\n\nDeveloped by Enrique Chavez, it involves JSON Web Token (JWT) authentication where a token is issued and then used in subsequent requests. [Details](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/)\n\n### 3. **UsefulJwtAuth**\n\nBy Useful Team, this is another implementation using JWT for authentication purposes. [Details](https://github.com/usefulteam/jwt-auth)\n\n\u003e For custom authorization, check the [Authorization Wiki](https://github.com/ArunPrakashG/wordpress_client/wiki/Authorization).\n\n## 📋 Supported REST Methods\n\n| Endpoint              | Create | Read | Update | Delete |\n| --------------------- | :----: | :--: | :----: | :----: |\n| Posts                 |   ✅   |  ✅  |   ✅   |   ✅   |\n| Comments              |   ✅   |  ✅  |   ✅   |   ✅   |\n| Categories            |   ✅   |  ✅  |   ✅   |   ✅   |\n| Tags                  |   ✅   |  ✅  |   ✅   |   ✅   |\n| Users                 |   ✅   |  ✅  |   ✅   |   ✅   |\n| Me                    |   ✅   |  ✅  |   ✅   |   ✅   |\n| Media                 |   ✅   |  ✅  |   ✅   |   ✅   |\n| Pages                 |   ✅   |  ✅  |   ✅   |   ✅   |\n| Application Passwords |   ✅   |  ✅  |   ✅   |   ✅   |\n| Search                |   -    |  ✅  |   -    |   -    |\n| Post Revisions        |   ❌   |  ❌  |   ❌   |   ❌   |\n| Taxonomies            |   ❌   |  ❌  |   ❌   |   ❌   |\n| Post Types            |   ❌   |  ❌  |   ❌   |   ❌   |\n| Post Statuses         |   ❌   |  ❌  |   ❌   |   ❌   |\n| Settings              |   ❌   |  ❌  |   ❌   |   ❌   |\n\n## 📢 Custom Response Types\n\nLearn how to implement [Custom Requests here](https://github.com/ArunPrakashG/wordpress_client/wiki/Using-Custom-Requests).\n\n## 🤝 Feedback \u0026 Contributing\n\n- 🐛 For bugs or feature requests, use the [issue tracker][tracker].\n- 💡 Contributions are always appreciated. PRs are welcome!\n\n## 📄 License\n\nThis project is [MIT](https://github.com/ArunPrakashG/wordpress_client/blob/master/LICENSE) licensed.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  If you find this package helpful, consider supporting the development:\n\n[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/arunprakashg)\n\n\u003c/div\u003e\n\n[tracker]: https://github.com/ArunPrakashG/wordpress_client/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farunprakashg%2Fwordpress_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farunprakashg%2Fwordpress_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farunprakashg%2Fwordpress_client/lists"}