Skip to content

Commit

Permalink
Add getGlobal() method
Browse files Browse the repository at this point in the history
  • Loading branch information
drewm committed Jan 29, 2019
1 parent 2cc16b3 commit b31a90a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Drip.php
Expand Up @@ -154,6 +154,22 @@ protected function makeRequest($http_verb, $api_method, $args = [], $timeout = 1
}
}

/**
* Make a GET request to a top-level method outside of this account
*
* @param string $api_method
* @param array $args
* @param int $timeout
*
* @return Response
* @throws DripException
*/
public function getGlobal($api_method, $args = [], $timeout = 10)
{
$url = $this->api_endpoint . '/' . $api_method;
return $this->makeRequest('get', $api_method, $args, $timeout, $url);
}

/**
* Make a POST request
*
Expand Down

0 comments on commit b31a90a

Please sign in to comment.