Tinq\Scraper
Official Tinq.ai PHP SDK.
All URIs are relative to https://tinq.ai/api/v2, except if the operation defines another base path.
Method | HTTP request | Description |
---|
extractArticle | POST /scraper/extract-article | Extract article |
googleSearch | POST /scraper/google | Google Search |
scrape | POST /scraper/scrape | Scrape |
extractArticle()
extractArticle($accept, $body)
Extract article
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Tinq\Api\Scraper(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$accept = application/json; // string
$body = array('key' => new \stdClass); // object
try {
$apiInstance->extractArticle($accept, $body);
} catch (Exception $e) {
echo 'Exception when calling Scraper->extractArticle: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|
accept | string | | [optional] |
body | object | | [optional] |
Return type
void (empty response body)
Authorization
bearerAuth
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list]
[Back to Model list]
[Back to README]
googleSearch()
googleSearch($accept, $body)
Google Search
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Tinq\Api\Scraper(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$accept = application/json; // string
$body = array('key' => new \stdClass); // object
try {
$apiInstance->googleSearch($accept, $body);
} catch (Exception $e) {
echo 'Exception when calling Scraper->googleSearch: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|
accept | string | | [optional] |
body | object | | [optional] |
Return type
void (empty response body)
Authorization
bearerAuth
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list]
[Back to Model list]
[Back to README]
scrape()
Scrape
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Tinq\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Tinq\Api\Scraper(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$accept = application/json; // string
$body = array('key' => new \stdClass); // object
try {
$apiInstance->scrape($accept, $body);
} catch (Exception $e) {
echo 'Exception when calling Scraper->scrape: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|
accept | string | | [optional] |
body | object | | [optional] |
Return type
void (empty response body)
Authorization
bearerAuth
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list]
[Back to Model list]
[Back to README]