Skip to content

Commit acbc268

Browse files
committed
Added onlime/laravel-bexio-api-client to suggested packages
1 parent 1068981 commit acbc268

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## [0.4.x (Unreleased)](https://github.com/onlime/bexio-api-client/compare/0.3.1...main)
44

5+
- Extended `getFullApiUrl()` to optionally append query params.
6+
- Added `onlime/laravel-bexio-api-client` to suggested packages to use this library with Laravel HTTP Client instead of Guzzle.
7+
58
## [0.4.0 (2022-03-24)](https://github.com/onlime/bexio-api-client/compare/0.3.1...0.4.0)
69

710
- Fix release comparison links in CHANGELOG.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) Christian Ruhstaller
3+
Copyright (c) Philip Iezzi, Onlime GmbH https://www.onlime.ch
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
"jumbojett/openid-connect-php": "^0.9.5",
2626
"guzzlehttp/guzzle": "^7.4"
2727
},
28+
"suggest": {
29+
"onlime/laravel-bexio-api-client": "To use Laravel HTTP Client instead of Guzzle"
30+
},
2831
"autoload": {
2932
"psr-4": {
3033
"Bexio\\": "src/Bexio"

src/Bexio/AbstractClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ public function refreshToken()
112112
$this->setRefreshToken($oidc->getRefreshToken());
113113
}
114114

115-
public function getFullApiUrl(string $path = '')
115+
public function getFullApiUrl(string $path = '', array $query = []): string
116116
{
117117
// prefix path with default API version if there was no version provided
118118
return implode('/', array_filter([
119119
self::API_URL,
120120
1 === preg_match('/\d\.\d\//', $path) ? '' : self::API_DEFAULT_VERSION,
121-
$path
121+
empty($query) ? $path : $path . '?' . http_build_query($query)
122122
]));
123123
}
124124

0 commit comments

Comments
 (0)