Browse Source

Add getSystemDataValue call.

Shane Mc Cormack 8 years ago
parent
commit
fc6441fb61
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/MyDNSHostAPI.php

+ 12 - 0
src/MyDNSHostAPI.php

@@ -237,6 +237,18 @@
 			return $result;
 		}
 
+		/**
+		 * Get system info.
+		 *
+		 * @return Result from the API.
+		 */
+		public function getSystemDataValue($key) {
+			if ($this->auth === FALSE || empty($key)) { return NULL; }
+
+			$result = $this->api('/system/datavalue/' . $key);
+			return isset($result['response'][$key]) ? $result['response'][$key] : NULL;
+		}
+
 		/**
 		 * Set information a given user id.
 		 *