Skip to content

Commit

Permalink
add Initialization section, rename client
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-stack committed Jul 19, 2022
1 parent 8ad7289 commit ce6a55f
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 4 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Initialization
```php
$client = new OutscraperClient("SECRET_API_KEY");
```
[Link to the profile page to create the API key](https://app.outscraper.com/profile)

## Google Maps Scraper

Scrape Google Mpas results bu query "asian restaurants Berlin, Germany".

```php
$client = new ApiClient("your API_KEY from https://app.outscraper.com/profile");
$result = $client->google_maps_search(['asian restaurants Berlin, Germany'], 'en', 'DE');

print_r($result);
Expand Down
6 changes: 6 additions & 0 deletions examples/Emails And Contacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Initialization
```php
$client = new OutscraperClient("SECRET_API_KEY");
```
[Link to the profile page to create the API key](https://app.outscraper.com/profile)

## Usage

```php
Expand Down
6 changes: 6 additions & 0 deletions examples/Google Maps Reviews.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Initialization
```php
$client = new OutscraperClient("SECRET_API_KEY");
```
[Link to the profile page to create the API key](https://app.outscraper.com/profile)

## Usage

```php
Expand Down
6 changes: 6 additions & 0 deletions examples/Google Maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Initialization
```php
$client = new OutscraperClient("SECRET_API_KEY");
```
[Link to the profile page to create the API key](https://app.outscraper.com/profile)

## Usage

```php
Expand Down
6 changes: 6 additions & 0 deletions examples/Google SERP.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Initialization
```php
$client = new OutscraperClient("SECRET_API_KEY");
```
[Link to the profile page to create the API key](https://app.outscraper.com/profile)

## Usage

```php
Expand Down
6 changes: 6 additions & 0 deletions examples/Phones Validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Initialization
```php
$client = new OutscraperClient("SECRET_API_KEY");
```
[Link to the profile page to create the API key](https://app.outscraper.com/profile)

## Usage

```php
Expand Down
6 changes: 3 additions & 3 deletions outscraper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@


/**
* Outscraper ApiClient - PHP SDK that allows using Outscraper's services and Outscraper's API.
* OutscraperClient - PHP SDK that allows using Outscraper's services and Outscraper's API.
*
* @copyright Outscraper 2021
* @license https://raw.githubusercontent.com/outscraper/outscraper-php/main/LICENSE
* @version Release: 1.1.0
* @link https://github.com/outscraper/outscraper-php
*/
class ApiClient {
public $version = "1.5.1";
class OutscraperClient {
public $version = "1.6.0";
private $api_url = "https://api.app.outscraper.com";
private $api_headers;
private $max_ttl = 60 * 60;
Expand Down

0 comments on commit ce6a55f

Please sign in to comment.