PHPackages                             karaden-prg/karaden-prg-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. karaden-prg/karaden-prg-php

ActiveLibrary[API Development](/categories/api)

karaden-prg/karaden-prg-php
===========================

PHP library for the Karaden API.

v1.2.1(3mo ago)18.1k↓33%MITPHPPHP ^7.4 || ^8.0

Since May 16Pushed 3mo agoCompare

[ Source](https://github.com/karaden-prg/karaden-prg-php)[ Packagist](https://packagist.org/packages/karaden-prg/karaden-prg-php)[ RSS](/packages/karaden-prg-karaden-prg-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (13)Versions (7)Used By (0)

Karaden PHPライブラリ
================

[](#karaden-phpライブラリ)

Karaden PHPライブラリは、PHPで書かれたアプリケーションからKaraden APIへ簡単にアクセスするための手段を提供します。
それにはAPIレスポンスから動的に初期化するAPIリソースの一連のクラス定義が含まれているため、Karaden APIの幅広いバージョンと互換性があります。

インストール方法
--------

[](#インストール方法)

パッケージを変更しないならば、このソースコードは必要ありません。
パッケージを使用したいだけならば、下記を実行するだけです。

```
composer require karaden-prg/karaden-prg-php

```

動作環境
----

[](#動作環境)

PHP 7.4～

このライブラリはHTTPクライアントを抽象化するライブラリである[HTTPlug](http://httplug.io/)を使用しています。
使用する環境に合わせ、いずれかの[HTTPlugのクライアント/アダプタ](https://docs.php-http.org/en/latest/clients.html)をインストールする必要があります。
例えばGuzzleの7.xを使用する場合、下記を実行する必要があります。

```
composer require php-http/guzzle7-adapter

```

使い方
---

[](#使い方)

Karadenでテナントを作成し、プロジェクト毎に発行できるトークンを発行する必要があります。
作成したテナントID（テナントIDはテナント選択画面で表示されています）は、`Config::$tenantId`に、発行したトークンは`Config::$apiKey`にそれぞれ設定します。

```
\Karaden\Config::$apiKey = '';
\Karaden\Config::$tenantId = '';
$params = \Karaden\Param\Message\MessageCreateParams::newBuilder()
    ->withServiceId(1)
    ->withTo('09012345678')
    ->withBody('本文')
    ->build();
$message = \Karaden\Model\Message::create($params);
```

### リクエスト毎の設定

[](#リクエスト毎の設定)

同一のプロセスで複数のキーを使用する必要がある場合、リクエスト毎にキーやテナントIDを設定することができます。

```
$params = \Karaden\Param\Message\MessageDetailParams::newBuilder()
    ->withId('')
    ->build();
$requestOptions = \Karaden\RequestOptions::newBuilder()
    ->withApiKey('')
    ->withTenantId('')
    ->build();
$message = \Karaden\Model\Message::detail($params, $requestOptions);
```

### HTTPクライアントの明示的な指定

[](#httpクライアントの明示的な指定)

通常、PSR-18のインタフェースを実装したHTTPクライアントを指定しなくても適切な実装を検索し、検出したHTTPクライアントを使用しますが、明示的に指定することもできます。
HTTPクライアントに依存したタイムアウトやプロキシなどのような設定を必要とするユースケースにおいて使用します。

```
\Karaden\Config::$httpClient = \Http\Adapter\Guzzle7\Client::createWithConfig(['timeout' => ]);
```

### タイムアウトについて

[](#タイムアウトについて)

通信をするファイルサイズや実行環境の通信速度によってはHTTP通信時にタイムアウトが発生する可能性があります。
何度も同じような現象が起こる際は、ファイルサイズの調整もしくは`HTTPクライアントの明示的な指定`からHTTPクライアントの指定及びタイムアウトの時間を増やして、再度実行してください。

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance78

Regular maintenance activity

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~196 days

Recently: every ~239 days

Total

6

Last Release

118d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13238fafa1d78ebd9b0f32addb265c3234d2ccb79f98202565db42b891d47a46?d=identicon)[karaden-prg](/maintainers/karaden-prg)

---

Top Contributors

[![hogeraccio](https://avatars.githubusercontent.com/u/61817876?v=4)](https://github.com/hogeraccio "hogeraccio (13 commits)")[![khagiya1](https://avatars.githubusercontent.com/u/61724348?v=4)](https://github.com/khagiya1 "khagiya1 (11 commits)")[![yamada953](https://avatars.githubusercontent.com/u/180383902?v=4)](https://github.com/yamada953 "yamada953 (3 commits)")

---

Tags

apismskaradencommunication platform as a servicecpaas

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/karaden-prg-karaden-prg-php/health.svg)

```
[![Health](https://phpackages.com/badges/karaden-prg-karaden-prg-php/health.svg)](https://phpackages.com/packages/karaden-prg-karaden-prg-php)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[deeplcom/deepl-php

Official DeepL API Client Library

2616.2M66](/packages/deeplcom-deepl-php)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
