Tabnine Logo
NewsletterPublisher.scheduleNewsletter
Code IndexAdd Tabnine to your IDE (free)

How to use
scheduleNewsletter
method
in
com.novoda.enews.NewsletterPublisher

Best Java code snippets using com.novoda.enews.NewsletterPublisher.scheduleNewsletter (Showing top 1 results out of 315)

origin: novoda/spikes

public void publish(String html, LocalDateTime atLocalDateTime) {
  Response<ApiCampaignResult> campaignResultResponse = postCampaign();
  if (campaignResultResponse.isSuccessful()) {
    String id = campaignResultResponse.body().id;
    putCampaignContent(id, html);
    scheduleNewsletter(id, atLocalDateTime);
  } else {
    ResponseBody responseBody = campaignResultResponse.errorBody();
    try {
      System.err.println(responseBody.string());
    } catch (IOException e) {
      throw new IllegalStateException("We failed to debug.", e);
    }
    throw new IllegalStateException("We failed " + campaignResultResponse.code());
  }
}
com.novoda.enewsNewsletterPublisherscheduleNewsletter

Popular methods of NewsletterPublisher

  • publish
  • <init>
  • postCampaign
  • putCampaignContent

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • ImageIO (javax.imageio)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now