Skip to content

Commit

Permalink
Add setClient method to customize client parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Stichoza committed Aug 5, 2021
1 parent 61b9bf7 commit 4e436b0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/GoogleTranslate.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ public function setUrl(string $url): self
return $this;
}

/**
* Set Google Translate client param (webapp, gtx, etc.)
*
* @param string $client Google Translate client param (webapp, gtx, etc.)
* @return GoogleTranslate
*/
public function setClient(string $client): self
{
$this->urlParams['client'] = $client;
return $this;
}

/**
* Set GuzzleHttp client options.
*
Expand Down

0 comments on commit 4e436b0

Please sign in to comment.