Skip to content

Commit

Permalink
correcting reference to $last_response + rate_limit header
Browse files Browse the repository at this point in the history
fixing #81
  • Loading branch information
daniel-sc committed Nov 3, 2019
1 parent d50bfc8 commit b951c33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Add PodioTagItemField type
* Adding filter API missing file_count parameter
* Add scope to PodioOAuth
* Bugfix: rate limit header parsing (#81)


4.4.0 / 2019-06-02
Expand Down
6 changes: 3 additions & 3 deletions lib/Podio.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,13 @@ public static function parse_headers($headers) {
return $list;
}
public static function rate_limit_remaining() {
if (isset($last_response->headers['x-rate-limit-remaining'])) {
if (isset(self::$last_response->headers['x-rate-limit-remaining'])) {
return self::$last_response->headers['x-rate-limit-remaining'];
}
}
public static function rate_limit() {
if (isset($last_response->headers['x-rate-limit'])) {
return self::$last_response->headers['x-rate-limit'];
if (isset(self::$last_response->headers['x-rate-limit-limit'])) {
return self::$last_response->headers['x-rate-limit-limit'];
}
}

Expand Down

0 comments on commit b951c33

Please sign in to comment.