Search in sources :

Example 1 with TagSeriesResponse

use of com.cribbstechnologies.clients.mandrill.model.response.tags.TagSeriesResponse in project Java-Mandrill-Wrapper by cribbstechnologies.

the class MandrillTagsRequest method getAllTimeSeries.

public TagSeriesResponse getAllTimeSeries(BaseMandrillRequest tagsRequest) throws RequestFailedException {
    TagSeriesResponse response = new TagSeriesResponse();
    response.setList(((BaseMandrillAnonymousListResponse<TagWithTime>) request.postRequest(tagsRequest, ServiceMethods.Tags.ALL_TIME_SERIES, TagSeriesResponse.class, timeTagReference)).getList());
    return response;
}
Also used : TagWithTime(com.cribbstechnologies.clients.mandrill.model.response.tags.TagWithTime) TagSeriesResponse(com.cribbstechnologies.clients.mandrill.model.response.tags.TagSeriesResponse)

Example 2 with TagSeriesResponse

use of com.cribbstechnologies.clients.mandrill.model.response.tags.TagSeriesResponse in project Java-Mandrill-Wrapper by cribbstechnologies.

the class MandrillTagsRequest method getTimeSeries.

public TagSeriesResponse getTimeSeries(MandrillRequestWithTag tagsRequest) throws RequestFailedException {
    TagSeriesResponse response = new TagSeriesResponse();
    response.setList(((BaseMandrillAnonymousListResponse<TagWithTime>) request.postRequest(tagsRequest, ServiceMethods.Tags.TIME_SERIES, TagSeriesResponse.class, timeTagReference)).getList());
    return response;
}
Also used : TagWithTime(com.cribbstechnologies.clients.mandrill.model.response.tags.TagWithTime) TagSeriesResponse(com.cribbstechnologies.clients.mandrill.model.response.tags.TagSeriesResponse)

Example 3 with TagSeriesResponse

use of com.cribbstechnologies.clients.mandrill.model.response.tags.TagSeriesResponse in project Java-Mandrill-Wrapper by cribbstechnologies.

the class TagsTest method testGetTimeSeries.

@Test
public void testGetTimeSeries() {
    MandrillRequestWithTag request = new MandrillRequestWithTag();
    request.setTag("tag1");
    try {
        TagSeriesResponse response = tagsRequest.getTimeSeries(request);
    } catch (RequestFailedException e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
}
Also used : RequestFailedException(com.cribbstechnologies.clients.mandrill.exception.RequestFailedException) TagSeriesResponse(com.cribbstechnologies.clients.mandrill.model.response.tags.TagSeriesResponse) MandrillRequestWithTag(com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithTag) Test(org.junit.Test)

Aggregations

TagSeriesResponse (com.cribbstechnologies.clients.mandrill.model.response.tags.TagSeriesResponse)3 TagWithTime (com.cribbstechnologies.clients.mandrill.model.response.tags.TagWithTime)2 RequestFailedException (com.cribbstechnologies.clients.mandrill.exception.RequestFailedException)1 MandrillRequestWithTag (com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithTag)1 Test (org.junit.Test)1