private function _runRequest($url) { $this->curl_http_client->include_response_headers(1); $response = $this->curl_http_client->fetch_url($url); $data = $this->curl_http_client->get_header_and_body($response); $Log = new \Model_Tracking_Log_Ratelimit(); $Log->parseAndSetResponseValues($data, 'eventbrite'); return $data['body']; }
public static function getCurrentRateLimit($service = 'foursquare') { if ($Log_Ratelimit = \Model_Tracking_Log_Ratelimit::query()->where('service', $service)->where('limit', '!=', 0)->limit(1)->order_by('created_at', 'desc')->get_one()) { return $Log_Ratelimit->remaining; } }