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

Translation with DeepL API, version trunk. 26 lines.

- Page: https://pluginprobe.com/plugins/wpdeepl/trunk/code/client/deeplapi-usage.class.php
- Raw: https://pluginprobe.com/plugins/wpdeepl/trunk/raw/client/deeplapi-usage.class.php
- Modified: 2025-12-17T06:21:10+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/trunk/code/client/deeplapi-usage.class.php#L10-L20`.

```php
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
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'];
 	}
}
```
