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

Translation with DeepL API, version 2.4.5. 26 lines.

- Page: https://pluginprobe.com/plugins/wpdeepl/2.4.5/code/client/deeplapi-usage.class.php
- Raw: https://pluginprobe.com/plugins/wpdeepl/2.4.5/raw/client/deeplapi-usage.class.php
- Modified: 2025-12-08T03:16:26+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/2.4.5/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 buildBody( $mode, $endpoint ) {

		return false;
	}

	public function getCharacterLimit() {
 		if ( !isset( $this->response ) || !array_key_exists( 'character_limit', $this->response ) ) {
 			return false;
 		}
 		return $this->response['character_limit'];
 	}
}
```
