Updated Wrapper

This commit is contained in:
Pablo Ferreiro 2022-02-15 13:55:36 +01:00
parent a11a17f9d2
commit 9711bb903c
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
3 changed files with 13 additions and 9 deletions

View file

@ -1,6 +1,9 @@
# APP_URL="http://localhost:8000" # Full url path, PLEASE REPLACE TO YOUR OWN ONE
# SIGNER_URL="https://tiktok-sign.herokuapp.com/signature" # External signing service
# LATTE_CACHE=/tmp/proxitok_api # Path for Latte cache, leave commented for ./cache/latte
# API CONFIG
# USE_TEST_ENDPOINTS=1 # Discomment for usage of t.tiktok.com
# SIGNER_URL="https://tiktok-sign.herokuapp.com/signature" # External signing service
# API_CACHE=redis # Cache engine for TikTok Api, (more info on README)
# Redis cache, used on Helpers\CacheEngines\RedisCache

View file

@ -18,7 +18,7 @@ class Misc {
}
static public function env(string $key, string $default_value): string {
return isset($_ENV[$key]) && !empty($_ENV[$key]) ? $_ENV[$key] : $default_value;
return $_ENV[$key] ?? $default_value;
}
/**
@ -33,7 +33,8 @@ class Misc {
*/
static public function api(): \TikScraper\Api {
$options = [
'remote_signer' => self::env('SIGNER_URL', 'http://localhost:8080/signature')
'remote_signer' => self::env('SIGNER_URL', 'http://localhost:8080/signature'),
'use_test_endpoints' => self::env('USE_TEST_ENDPOINTS', false)
];
$cacheEngine = false;
// Proxy config

12
composer.lock generated
View file

@ -306,16 +306,16 @@
},
{
"name": "pablouser1/tikscraper",
"version": "v1.2.2",
"version": "v1.2.3",
"source": {
"type": "git",
"url": "https://github.com/pablouser1/TikScraperPHP.git",
"reference": "a001bc0dce7fbd15f85b15cbe365de436c515457"
"reference": "2ecba60b580979b6be6b58436bce7a55f8bc0d49"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/a001bc0dce7fbd15f85b15cbe365de436c515457",
"reference": "a001bc0dce7fbd15f85b15cbe365de436c515457",
"url": "https://api.github.com/repos/pablouser1/TikScraperPHP/zipball/2ecba60b580979b6be6b58436bce7a55f8bc0d49",
"reference": "2ecba60b580979b6be6b58436bce7a55f8bc0d49",
"shasum": ""
},
"require": {
@ -339,9 +339,9 @@
"description": "Get data from TikTok API",
"support": {
"issues": "https://github.com/pablouser1/TikScraperPHP/issues",
"source": "https://github.com/pablouser1/TikScraperPHP/tree/v1.2.2"
"source": "https://github.com/pablouser1/TikScraperPHP/tree/v1.2.3"
},
"time": "2022-02-13T21:42:57+00:00"
"time": "2022-02-15T12:46:29+00:00"
},
{
"name": "phpoption/phpoption",