Closed ryankaka92 closed 3 years ago
Where did you get the "relatedQueries()" method?
You can see a list of supported methods in this file:
/vendor/x-fran/g-trends/index.php
Hello I got it here:
It seems like its getRelatedSearchQueries not relatedQueries please fix it on the homepage.
use Google\GTrends;
# This options are by default if none provided
$options = [
'hl' => 'en-US',
'tz' => -60, # last hour
'geo' => 'US',
];
$gt = new GTrends($options);
print_r( $gt->getRelatedSearchQueries(['unscramble'],0, 'today 3-m') );
Also if I may ask Is this the correct way to get the data for last 4 hours? It doesnt work with 2-d 4-h, 1-h.
It works with longer than 6m
Thank you very much for responding.
Just pushed a fix for getRelatedSearchQueries.
Here an example for one hour: gt->getRelatedSearchQueries(['Donald Trump'], 0, 'now 4-H')
Hey guys did I make a mistake? I installed with composer;
It gives this error: `PHP Fatal error: Uncaught Error: Call to undefined method Google\GTrends::relatedQueries() in /root/gtrends/get.php:17 Stack trace:
0 {main}
thrown in /root/gtrends/get.php on line 17`