v1.2.0+1
wordpress_api
WooCommerce 및 사용자 정의 네임스페이스를 지원하는 Dart용 워드프레스 REST API 클라이언트입니다.
102좋아요 3030일 다운로드145Pub 점수
AndroidiOSWebmacOSWindowsLinux
WooCommerce 및 사용자 정의 네임스페이스를 지원하는 Dart용 워드프레스 API 클라이언트입니다.
^1.15.0^5.5.0+1^0.15.0^2.4.0^4.0.0아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
GitHub stars Pub Build Status Maintenance
A WordPress REST API client for dart with support for WooCommerce and custom namespaces/endpoints.
In the dependencies: section of your pubspec.yaml, add the following line:
dependencies:
wordpress_api: <latest_version>
import 'package:wordpress_api/wordpress_api';
WordPressAPI api = WordPressAPI('wp-site.com');
Retrieve posts from .posts getter
.posts. More arguments can be passed to further filter the data returned void main() async {
final api = WordPressAPI('wp-site.com');
final WPResponse res = await api.posts.fetch();
for (final post in res.data) {
print(post.title);
}
}
v0.3.0, you can query a single post from the same endpoint by passing an id void main() async {
final api = WordPressAPI('wp-site.com');
final WPResponse res = await api.posts.fetch(id: 1);
print(res.data.title);
}
Retrieve data from a custom endpoint
void main() async {
final api = WordPressAPI('wp-site.com');
final WPResponse res = await api.get(endpoint: 'your-custom-endpoint');
print(res.data);
}
Application Passwords. WordPress 5.6+ onlyContributions are welcome, report any issues here
Thanks goes to these wonderful people (emoji key):
| anKii anKii 💻 |
Kellvem Barbosa Kellvem Barbosa 💻 |
NKlage NKlage 💻 🐛 |
Elikem (Junior) Medehou Elikem (Junior) Medehou 💻 |
Okan Demir Okan Demir 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!