PluginProbe
Translation with DeepL API / trunk
Translation with DeepL API vtrunk
trunk 0.1.20180323 1.0 1.2.5.1 1.5.2.5 1.7.5 2.4.3.12 2.4.3.9 2.4.5
← All changes | client/deeplapi-usage.class.php +8 -3 1.7.5trunk View file →
@@ -1,6 +1,6 @@
1 1 <?php
2 -
2 +if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3 3 class DeepLApiUsage extends DeepLApi {
4 4 protected $endPoint = 'usage';
5 5 public $allow_cache = false;
6 6 protected $http_mode = 'GET';
@@ -5,17 +5,22 @@
5 5 public $allow_cache = false;
6 6 protected $http_mode = 'GET';
7 7
8 8 public function getCurrentCharacterCount() {
9 - if( !isset( $this->response ) || !array_key_exists( 'character_count', $this->response ) ) {
9 + if ( !isset( $this->response ) || !array_key_exists( 'character_count', $this->response ) ) {
10 10 return false;
11 11 }
12 12 return $this->response['character_count'];
13 13 }
14 14
15 + public function buildBody( $mode, $endpoint ) {
16 +
17 + return false;
18 + }
19 +
15 20 public function getCharacterLimit() {
16 - if( !isset( $this->response ) || !array_key_exists( 'character_limit', $this->response ) ) {
21 + if ( !isset( $this->response ) || !array_key_exists( 'character_limit', $this->response ) ) {
17 22 return false;
18 23 }
19 24 return $this->response['character_limit'];
20 25 }
21 26 }