パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.2.0+1

wordpress_api

WooCommerce およびカスタムネームスペースをサポートする、Dart用のWordPress REST APIクライアントです。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
90
いいね数
102
Pub ポイント
145

パッケージをインストール

flutter pub add wordpress_api

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

WordPress REST API 用のクライアントを提供するDartパッケージで、WooCommerceおよびカスタムネームスペースをサポートしています。モバイルやウェブを含む複数のプラットフォームでのWordPressサイトとのシームレスな統合を可能にします。認証、データ取得、複雑なAPI応答の処理を簡素化し、WordPressで駆動されるコンテンツやECシステムと連携するアプリを開発する開発者にとって最適です。Android、iOS、Web、macOS、Windows、Linuxに対応しており、クロスプラットフォーム互換性を確保しています。ソースコードはGitHub上で公開されており、透明性とコミュニティ参加を促進しています。

用途

  • WordPressブログ用のモバイルアプリの構築
  • FlutterアプリへのWooCommerceストアの統合
  • WordPressからカスタム投稿タイプを取得する
  • コンテンツ駆動型のWebアプリケーションの作成
  • カスタム API エンドポイントを使用して WordPress に接続する

主な機能

  • WooCommerce API のサポート
  • カスタム名前空間の処理
  • クロスプラットフォーム互換性
  • 認証ユーティリティ
  • 堅牢なエラー処理
  • 型安全な応答パース

適している対象

  • WordPress を使用する Flutter 開発者
  • WooCommerce を使用する eコマースアプリの作成者
  • コンテンツ管理システム統合業者
  • APIファーストのアプリケーションビルダー
  • マルチプラットフォームのWordPress統合を必要とするチーム

注意事項

  • WordPress REST API 構造に精通している必要があります
  • カスタムエンドポイント用に追加のセットアップが必要になる場合があります
  • 外部のWordPressサイト構成に依存します
  • 基本的な例以外のドキュメントは限られている
  • 直接的なWordPress管理操作には適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

WordPress REST API client for Dart | Flutter

All Contributors

GitHub stars Pub Build Status Maintenance

Description

A WordPress REST API client for dart with support for WooCommerce and custom namespaces/endpoints.

Features

  • Retrieve data from standard WordPress endpoints.
  • Retrieve data from any custom namespace

Installation

In the dependencies: section of your pubspec.yaml, add the following line:

dependencies:
  wordpress_api: <latest_version>

Usage

  • Import the package
import 'package:wordpress_api/wordpress_api';
  • Initialize WPAPI
  WordPressAPI api = WordPressAPI('wp-site.com');
  • Retrieve posts from .posts getter

    • You can fetch a list of posts by simply calling .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);
        }
      }
    
    • As of 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);
  }

ToDo

  • Authentication using Application Passwords. WordPress 5.6+ only
  • Fully integrated WooCommerce support.
  • Full CRUD operations.
  • Support for other popular WordPress Plugins.

Contributions are welcome, report any issues here

Special Thanks

Contributors ✨

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!

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。