All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mailgun.api.v3.MailgunEventsApi Maven / Gradle / Ivy

Go to download

The Mailgun SDK for Java enables Java developers to work with Mailgun API efficiently.

There is a newer version: 1.1.3
Show newest version
package com.mailgun.api.v3;

import com.mailgun.api.MailgunApi;
import com.mailgun.model.events.EventsQueryOptions;
import com.mailgun.model.events.EventsResponse;
import feign.Headers;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import feign.Response;

/**
 * 

* Mailgun tracks every event that happens to your emails and makes this data available to you through the Events API. *

*

* Mailgun retains this detailed data for one day for free accounts and up to 30 days for paid accounts based on the subscription plan. *

* * @see Events API */ @Headers("Accept: application/json") public interface MailgunEventsApi extends MailgunApi { /** *

* Get all events that happen to your emails. *

* * @param domain Name of the domain * @return {@link EventsResponse} */ @RequestLine("GET /{domain}/events") EventsResponse getAllEvents(@Param("domain") String domain); /** *

* Get all events that happen to your emails. *

* * @param domain Name of the domain * @return {@link Response} */ @RequestLine("GET /{domain}/events") Response getAllEventsFeignResponse(@Param("domain") String domain); /** *

* Get specified events that happen to your emails. *

*

* A request should define a time range and can specify a set of filters to apply. *

*

* In response, a page of events is returned along with URLs(Page ID) that can be used to retrieve the next and previous result pages. *

*

* To traverse the entire range, you should keep requesting the next page URLs returned along with result pages until an empty result page is reached. *

* * @param domain Name of the domain * @param queryOptions {@link EventsQueryOptions} * @return {@link EventsResponse} */ @RequestLine("GET /{domain}/events") EventsResponse getEvents(@Param("domain") String domain, @QueryMap EventsQueryOptions queryOptions); /** *

* Get specified events that happen to your emails. *

*

* A request should define a time range and can specify a set of filters to apply. *

*

* In response, a page of events is returned along with URLs(Page ID) that can be used to retrieve the next and previous result pages. *

*

* To traverse the entire range, you should keep requesting the next page URLs returned along with result pages until an empty result page is reached. *

* * @param domain Name of the domain * @param queryOptions {@link EventsQueryOptions} * @return {@link Response} */ @RequestLine("GET /{domain}/events") Response getEventsFeignResponse(@Param("domain") String domain, @QueryMap EventsQueryOptions queryOptions); /** *

* Fetches the next page of log records, assuming that the pageId was returned by the previous request. *

* * @param domain Name of the domain * @param pageId Page ID * @return {@link EventsResponse} */ @RequestLine("GET /{domain}/events/{pageId}") EventsResponse getEvents(@Param("domain") String domain, @Param("pageId") String pageId); /** *

* Fetches the next page of log records, assuming that the pageId was returned by the previous request. *

* * @param domain Name of the domain * @param pageId Page ID * @return {@link Response} */ @RequestLine("GET /{domain}/events/{pageId}") Response getEventsFeignResponse(@Param("domain") String domain, @Param("pageId") String pageId); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy