mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Make "HTTPRequest::fetchUrl" dynamic
This commit is contained in:
parent
fed6e3cde1
commit
40ff1d7fda
7 changed files with 12 additions and 19 deletions
|
@ -10,7 +10,6 @@ use Friendica\Core\Hook;
|
|||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
function geocoordinates_install()
|
||||
|
@ -53,7 +52,7 @@ function geocoordinates_resolve_item(&$item)
|
|||
return;
|
||||
}
|
||||
|
||||
$s = HTTPRequest::fetchUrl("https://api.opencagedata.com/geocode/v1/json?q=" . $coords[0] . "," . $coords[1] . "&key=" . $key . "&language=" . $language);
|
||||
$s = DI::httpRequest()->fetchUrl("https://api.opencagedata.com/geocode/v1/json?q=" . $coords[0] . "," . $coords[1] . "&key=" . $key . "&language=" . $language);
|
||||
|
||||
if (!$s) {
|
||||
Logger::log("API could not be queried", Logger::DEBUG);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue