# wpdeepl/1.0/client/deeplapi-usage.class.php

Translation with DeepL API, version 1.0. 21 lines.

- Page: https://pluginprobe.com/plugins/wpdeepl/1.0/code/client/deeplapi-usage.class.php
- Raw: https://pluginprobe.com/plugins/wpdeepl/1.0/raw/client/deeplapi-usage.class.php
- Modified: 2023-01-28T04:28:04+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpdeepl/1.0/code/client/deeplapi-usage.class.php#L10-L20`.

```php
<?php

class DeepLApiUsage extends DeepLApi {
	protected $endPoint 	= 'usage';
 	public $allow_cache 	= false;
 	protected $http_mode 	= 'GET';

 	public function getCurrentCharacterCount() {
		if( !isset( $this->response ) || !array_key_exists( 'character_count', $this->response ) ) {
			return false;
		}
		return $this->response['character_count'];
	}

	public function getCharacterLimit() {
 		if( !isset( $this->response ) || !array_key_exists( 'character_limit', $this->response ) ) {
 			return false;
 		}
 		return $this->response['character_limit'];
 	}
}
```
