Sfoglia il codice sorgente

Add support for /articles end point.

Shane Mc Cormack 6 anni fa
parent
commit
766233bb98
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. 10 0
      src/MyDNSHostAPI.php

+ 10 - 0
src/MyDNSHostAPI.php

@@ -990,6 +990,16 @@
 			return $this->api(($this->domainAdmin ? '/admin' : '') . '/domains/' . $domain . '/hooks/' . $hookid, 'DELETE');
 		}
 
+		/**
+		 * Get articles.
+		 *
+		 * @return Result from the API.
+		 */
+		public function getArticles() {
+			$result = $this->api('/articles');
+			return isset($result['response']) ? $result['response'] : [];
+		}
+
 		/**
 		 * Get the last response from the API
 		 *