File tree Expand file tree Collapse file tree 4 files changed +9
-3
lines changed
Expand file tree Collapse file tree 4 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change 11The MIT License (MIT)
22
3- Copyright (c) Christian Ruhstaller
3+ Copyright (c) Philip Iezzi, Onlime GmbH https://www.onlime.ch
44
55Permission is hereby granted, free of charge, to any person obtaining a copy of
66this software and associated documentation files (the "Software"), to deal in
Original file line number Diff line number Diff line change 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"
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments