HEX
Server: nginx/1.18.0
System: Linux m1-ws1-ams3 5.4.0-148-generic #165-Ubuntu SMP Tue Apr 18 08:53:12 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /opt/aphex/sites/wazamba.online/wp-content/plugins/wpdeepl/client/deeplapi-usage.class.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'];
 	}
}