Skip to content

Commit

Permalink
- Create method to access $request instance from the service class
Browse files Browse the repository at this point in the history
  • Loading branch information
ianriizky committed May 12, 2022
1 parent 10cc4f0 commit 377f12d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Services/TalentaApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Ianriizky\TalentaApi\Services;

use BadMethodCallException;
use Illuminate\Http\Client\PendingRequest;
use Illuminate\Http\Client\Response;
use Illuminate\Support\Arr;
use Illuminate\Support\Traits\Macroable;
Expand Down Expand Up @@ -147,6 +148,14 @@ protected function sendRequestToTalenta(string $method, array $parameters = []):
return $response->throw();
}

/**
* @return \Illuminate\Http\Client\PendingRequest
*/
public function request(): PendingRequest
{
return $this->request;
}

/**
* Dynamically handle calls to the class.
*
Expand Down
2 changes: 2 additions & 0 deletions src/Support/Facades/TalentaApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use Illuminate\Support\Facades\Facade;

/**
* @method static \Illuminate\Http\Client\PendingRequest request()
*
* @see \Ianriizky\TalentaApi\Services\Concerns\HandleAuthentication
*
* @method static string createAuthenticationSignature(\Illuminate\Support\Carbon $date, string|\Psr\Http\Message\RequestInterface $request, string $hmacSecret) Create authentication signature using sha256 hash and base64 encoding.
Expand Down

0 comments on commit 377f12d

Please sign in to comment.