Skip to content

Commit 98b610c

Browse files
committed
added isApiVersion() method in http client
1 parent efb8121 commit 98b610c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/Bitbucket/API/Http/Client.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,18 @@ public function setApiVersion($version)
206206
return $this;
207207
}
208208

209+
/**
210+
* Check if specified API version is the one currently in use
211+
*
212+
* @access public
213+
* @param float $version
214+
* @return bool
215+
*/
216+
public function isApiVersion($version)
217+
{
218+
return (abs($this->options['api_version'] - $version) < 0.00001);
219+
}
220+
209221
/**
210222
* {@inheritDoc}
211223
*/

0 commit comments

Comments
 (0)