Media:本類旨在與媒體合作软吐。
usermedia.get: 檢索媒體
user.addmedia: 創(chuàng)建新媒體
user.updatemedia: 更新媒體
user.deletemedia: 刪除媒體
MediaGetTest
package cn.com.yeexun.testzabbix.zabbix4j.example.media;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import cn.com.yeexun.testzabbix.zabbix4j.common.ZabbixApiTestBase;
import com.zabbix4j.media.MediaGetRequest;
import com.zabbix4j.media.MediaGetResponse;
/**
* @author Suguru Yajima
*/
public class MediaGetTest extends ZabbixApiTestBase {
public MediaGetTest() {
super();
}
@Test
public void testGet() throws Exception {
MediaGetRequest request = new MediaGetRequest();
MediaGetRequest.Params params = request.getParams();
params.addUserId(1);
MediaGetResponse response = zabbixApi.media().get(request);
assertNotNull(response);
logger.debug(getGson().toJson(response));
}
}