public function completeEndpoint($options) { $hasQuery = strrpos($this->_endpoint, '?') === false; $separator = $hasQuery ? '?' : '&'; $this->_endpoint .= $separator . http_build_query($options); }