コード例 #1
0
 public function testDeleteLastContactslist()
 {
     $mj = new Mailjet(getenv('API_KEY'), getenv('API_SECRET_KEY'));
     $mj->contactslist();
     $lastid = $mj->_response->Data[count($mj->_response->Data) - 1]->ID;
     $params = array("method" => "DELETE", "ID" => $lastid);
     $mj->contactslist($params);
     $this->assertEquals(204, $mj->_response_code);
 }
コード例 #2
0
 function deleteList($listID)
 {
     $mj = new Mailjet();
     $params = array("method" => "DELETE", "ID" => $listID);
     echo "success - deleted list " . $listID;
     return $mj->contactslist($params);
 }
コード例 #3
0
ファイル: c_contact.php プロジェクト: hardouinyann/EnigmaTIC
 private function getList($listID = 2)
 {
     $mj = new Mailjet();
     $params = array("method" => "VIEW", "ID" => $listID);
     $result = $mj->contactslist($params);
     //if(!empty($_SESSION['id'])) $this->debug($result,"getlist");
     /* if ($mj->_response_code == 200)
                     echo "success - got list ".$listID;
                 else
                     echo "error - ".$mj->_response_code;
     */
     return $result;
 }