Explorar o código

Add api call for accepting terms.

Shane Mc Cormack %!s(int64=7) %!d(string=hai) anos
pai
achega
62be53aee1
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      src/MyDNSHostAPI.php

+ 10 - 0
src/MyDNSHostAPI.php

@@ -205,6 +205,16 @@
 			return $this->api('/users/' . $userid . '/resendwelcome', 'POST', []);
 		}
 
+		/**
+		 * Accept the terms of service.
+		 *
+		 * @param $user (Optional) User ID - defaults to self.
+		 * @return Data from API
+		 */
+		public function acceptTerms($userid = 'self') {
+			return $this->api('/users/' . $userid . '/acceptterms', 'POST', ['acceptterms' => "true"]);
+		}
+
 		/**
 		 * Submit a password reset request
 		 *