Skip to content

Commit

Permalink
Merge pull request #43 from padhie/php-8.2
Browse files Browse the repository at this point in the history
update to php 8.2
  • Loading branch information
padhie authored Nov 18, 2023
2 parents c9e7c9c + bd6155e commit 64bbdee
Show file tree
Hide file tree
Showing 30 changed files with 1,147 additions and 1,272 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ $authorization = 'AUTHORIZATION';

$client = new \Padhie\TwitchApiBundle\TwitchClient(
new \GuzzleHttp\Client(),
new \Padhie\TwitchApiBundle\Request\RequestGenerator($clientId, $authorization)
new \Padhie\TwitchApiBundle\Request\RequestGenerator($clientId, $authorization),
new \Padhie\TwitchApiBundle\Response\ResponseGenerator(),
);

```

### send Single Request
```php
$request = new \Padhie\TwitchApiBundle\Request\Channels\GetChannelRequest($broadcasterId);
$request = new \Padhie\TwitchApiBundle\Request\Channels\GetChannelInformationRequest($broadcasterId);

$response = $client->send($request);
assert($response instanceof \Padhie\TwitchApiBundle\Request\Channels\GetChannelResponse);
assert($response instanceof \Padhie\TwitchApiBundle\Response\Channels\GetChannelInformationResponse);

$title = $response->getTitle();
$title = $response->getChannels()[0]->getTitle();
```

### send Pagination Request
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "padhie/twitch-api-bundle",
"version": "2.0.3",
"version": "2.0.4",
"type": "library",
"keywords": [
"twitch",
Expand All @@ -18,7 +18,7 @@
}
],
"require": {
"php": "^7.4 || ^8",
"php": "^8.2",
"ext-curl": "*",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.4",
Expand All @@ -27,10 +27,11 @@
"guzzlehttp/promises": "^1.5"
},
"require-dev": {
"phpunit/phpunit": "^7",
"phpunit/phpunit": "^9.6",
"phpstan/phpstan": "^1.5",
"friendsofphp/php-cs-fixer": "^3.6",
"maglnet/composer-require-checker": "^3.8"
"maglnet/composer-require-checker": "^3.8",
"rector/rector": "^0.18.10"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 64bbdee

Please sign in to comment.