File tree Expand file tree Collapse file tree 2 files changed +28
-4
lines changed
Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 1717 ],
1818 "require" : {
1919 "php" : " ^8.3" ,
20- "spatie/laravel-package-tools" : " ^1.16" ,
21- "illuminate/contracts" : " ^10.0||^11.0||^12.0"
20+ "illuminate/contracts" : " ^10.0||^11.0||^12.0" ,
21+ "saloonphp/laravel-plugin" : " ^3.0" ,
22+ "saloonphp/saloon" : " ^3.0" ,
23+ "spatie/laravel-package-tools" : " ^1.16"
2224 },
2325 "require-dev" : {
26+ "jonpurvis/lawman" : " ^4.0" ,
27+ "larastan/larastan" : " ^2.9||^3.0" ,
2428 "laravel/pint" : " ^1.14" ,
2529 "nunomaduro/collision" : " ^8.1.1||^7.10.0" ,
26- "larastan/larastan" : " ^2.9||^3.0" ,
2730 "orchestra/testbench" : " ^10.0.0||^9.0.0||^8.22.0" ,
2831 "pestphp/pest" : " ^3.0" ,
2932 "pestphp/pest-plugin-arch" : " ^3.0" ,
Original file line number Diff line number Diff line change 44
55namespace Ziming \LaravelGetResponse ;
66
7- class LaravelGetResponse {}
7+ use Saloon \Contracts \Authenticator ;
8+ use Saloon \Http \Auth \HeaderAuthenticator ;
9+ use Saloon \Http \Auth \TokenAuthenticator ;
10+ use Saloon \Http \Connector ;
11+
12+ /*
13+ * Add Oauth authenticator in the future
14+ */
15+ class LaravelGetResponse extends Connector
16+ {
17+ public function __construct (protected readonly string $ token ){}
18+
19+ protected function defaultAuth (): HeaderAuthenticator
20+ {
21+ return new HeaderAuthenticator ($ this ->token , 'X-AUTH-TOKEN ' );
22+ }
23+
24+ public function resolveBaseUrl (): string
25+ {
26+ return 'https://api.getresponse.com/v3/ ' ;
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments