use of com.cribbstechnologies.clients.mandrill.model.response.urls.UrlListResponse in project Java-Mandrill-Wrapper by cribbstechnologies.
the class MandrillUrlsRequest method doSearch.
public UrlListResponse doSearch(MandrillRequestWithQuery searchRequest) throws RequestFailedException {
UrlListResponse response = new UrlListResponse();
response.setList(((BaseMandrillAnonymousListResponse<UrlResponse>) request.postRequest(searchRequest, ServiceMethods.Urls.SEARCH, UrlListResponse.class, urlsListReference)).getList());
return response;
}
use of com.cribbstechnologies.clients.mandrill.model.response.urls.UrlListResponse in project Java-Mandrill-Wrapper by cribbstechnologies.
the class UrlsTest method testQuery.
@Test
public void testQuery() {
MandrillRequestWithQuery request = new MandrillRequestWithQuery();
request.setQ("http://www.google.com");
try {
UrlListResponse response = urlsRequest.doSearch(request);
} catch (RequestFailedException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
use of com.cribbstechnologies.clients.mandrill.model.response.urls.UrlListResponse in project Java-Mandrill-Wrapper by cribbstechnologies.
the class MandrillUrlsRequest method getList.
public UrlListResponse getList(BaseMandrillRequest listRequest) throws RequestFailedException {
UrlListResponse response = new UrlListResponse();
response.setList(((BaseMandrillAnonymousListResponse<UrlResponse>) request.postRequest(listRequest, ServiceMethods.Urls.LIST, UrlListResponse.class, urlsListReference)).getList());
return response;
}
use of com.cribbstechnologies.clients.mandrill.model.response.urls.UrlListResponse in project Java-Mandrill-Wrapper by cribbstechnologies.
the class MandrillUrlsRequest method getTimeSeries.
public UrlListResponse getTimeSeries(MandrillRequestWithUrl seriesRequest) throws RequestFailedException {
UrlListResponse response = new UrlListResponse();
response.setList(((BaseMandrillAnonymousListResponse<UrlResponse>) request.postRequest(seriesRequest, ServiceMethods.Urls.TIME_SERIES, UrlListResponse.class, urlsListReference)).getList());
return response;
}
use of com.cribbstechnologies.clients.mandrill.model.response.urls.UrlListResponse in project Java-Mandrill-Wrapper by cribbstechnologies.
the class UrlsTest method testGetTimeSeries.
@Test
public void testGetTimeSeries() {
MandrillRequestWithUrl request = new MandrillRequestWithUrl();
request.setUrl("http://www.google.com");
try {
UrlListResponse response = urlsRequest.getTimeSeries(request);
} catch (RequestFailedException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
Aggregations