Download the PHP package yasukei/dmm-api-client-php without Composer

On this page you can find all versions of the php package yasukei/dmm-api-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dmm-api-client-php

dmm-api-client-php

CI Latest Version

DMM Web サービス API(v3)の PHP クライアントライブラリ。

レスポンスは Valinor で検証してから型付きの DTO として返す。 API の仕様と食い違うレスポンスは、null になって埋もれるのではなく、JSON パス付きの例外になる。

状態: 開発中。v1.0.0 までは予告なく API が変わる可能性がある。

動作要件

インストール

PSR-18 クライアントをまだ入れていない場合は、あわせてインストールする。

使い方

リクエストの型は src/Api/Request、レスポンスの型は src/Api/Response 配下にある。 各パラメータ・項目の意味は、それぞれのクラスの docblock を参照。

DMM API を使ったサイトやアプリケーションには クレジット表示 が必要。

対応 API

API メソッド リクエスト
/ItemList itemList() ItemListRequest
/FloorList floorList() FloorListRequest(省略可)
/ActressSearch actressSearch() ActressSearchRequest
/GenreSearch genreSearch() GenreSearchRequest
/MakerSearch makerSearch() MakerSearchRequest
/SeriesSearch seriesSearch() SeriesSearchRequest
/AuthorSearch authorSearch() AuthorSearchRequest

エラー処理

ライブラリが投げる例外は、すべて DmmApiClient\Api\Exception\DmmApiClientException を実装している。

例外 発生する場面
InvalidArgumentException リクエストを不正な値で組み立てた
TransportException HTTP 通信に失敗した(DNS 失敗、タイムアウトなど)
ApiErrorException API がエラーを返した($error にエラー内容が入る)
MalformedResponseException レスポンスが JSON として読めなかった
ResponseValidationException レスポンスが期待する構造と一致しなかった($errors に JSON パスと理由が入る)

コマンド

レスポンスを確認するための dmm-api-client コマンドを同梱している。 認証情報は環境変数 DMM_API_ID / DMM_AFFILIATE_ID、またはカレントディレクトリの .env から読む。

出力に含まれる認証情報は、既定で *** に伏せ字にする。

開発

変更履歴は CHANGELOG.md にまとめている。

コマンド 用途
composer test 単体テスト(Pest)
composer coverage コードカバレッジ付きの単体テスト(PCOV か Xdebug が必要)。CI では全体のカバレッジに下限を設けている
composer mutate ミューテーションテスト。CLI(src/Console)は対象外(PCOV か Xdebug が必要)。CI ではスコアに下限を設けている
composer lint stan + cs-check + rector-dry + deps
composer fix rector + cs-fix
composer stan 静的解析(PHPStan)
composer cs-check / composer cs-fix コードスタイル(PHP-CS-Fixer)
composer rector-dry / composer rector 自動リファクタリング(Rector)
composer deps 依存の過不足の検査(composer-dependency-analyser)
composer probe 実際の API から取得したデータで DTO を検証する。詳細は tools/live-probe

ライセンス

MIT


All versions of dmm-api-client-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
cuyz/valinor Version ^2.6
php-http/discovery Version ^1.19
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yasukei/dmm-api-client-php contains the following files

Loading the files please wait ...