承接 newman/draugiem-php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

newman/draugiem-php-sdk

最新稳定版本:1.0.0

Composer 安装命令:

composer require newman/draugiem-php-sdk

包简介

Draugiem.lv API library for PHP based on Guzzle.

README 文档

README

This is not the official library!

This is a minor rewrite of original api library using Guzzle client and strict typing.

Requirements

  • PHP 7.4+

Installation

Require the package via Composer:

composer require newman/draugiem-php-sdk

📖 Documentation & Usage

Make an API call

Response is an implementation of Psr\Http\Message\ResponseInterface.

$draugiemApi = new \Newman\DraugiemPhpSdk\DraugiemApi(1234, 'app key');
//$draugiemApi = new \Newman\DraugiemPhpSdk\DraugiemApi(1234, 'app key', 'user key');

$response = $draugiemApi->apiCall('authorize', ['code' => 5728195]);

var_dump($response->getStatusCode());
var_dump($response->getBody()->getContents());

Set default Guzzle client options

$draugiemApi = new \Newman\DraugiemPhpSdk\DraugiemApi(1234, 'app key');
$draugiemApi->setDefaultGuzzleClientOptions([
    'timeout' => 10,
    'headers' => [
        'User-Agent' => 'testing/1.0',
    ],
]);

// make an api call

🤝 Contributing

We'll appreciate your collaboration to this package.

When making pull requests, make sure:

  • All tests are passing: composer test
  • Test coverage is not reduced: composer test-coverage
  • There are no PHPStan errors: composer phpstan
  • Coding standard is followed: composer lint or composer fix-style to automatically fix it.

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-25