Package com.dyn.client.v3.messaging.handlers

Examples of com.dyn.client.v3.messaging.handlers.DynMessagingErrorHandler


        + send.sendMessage("fromperson@example.org",
            "recipient@example.org", "the subject", "hi text",
            "<p>hi html</p>", "ccuser@example.org",
            "reply-to@example.org", null));

    AccountsApi accounts = dyn.getAccountsApi();

    System.out.println("accounts list : " + accounts.list(0));
    System.out.println("accounts xheaders : " + accounts.getXHeaders());

    RecipientsApi recipients = dyn.getRecipientsApi();

    System.out.println("recipient status : "
        + recipients.status("recip@example.com"));
View Full Code Here


    AccountsApi accounts = dyn.getAccountsApi();

    System.out.println("accounts list : " + accounts.list(0));
    System.out.println("accounts xheaders : " + accounts.getXHeaders());

    RecipientsApi recipients = dyn.getRecipientsApi();

    System.out.println("recipient status : "
        + recipients.status("recip@example.com"));
    System.out.println("recipient activate : "
        + recipients.activate("recip@example.com"));

    Map<String, ReportApi> apis = ImmutableMap
        .<String, ReportApi> builder()
        .put("bounces", dyn.getBounceReportApi())
        .put("clicks", dyn.getClicksReportApi())
View Full Code Here

        .put("sent", dyn.getSentReportApi()).build();

    // test the regular report functionality
    for (Map.Entry<String, ReportApi> entry : apis.entrySet()) {
      String name = entry.getKey();
      ReportApi api = entry.getValue();

      System.out.println(name + " list : "
          + api.list("2014-01-01", "2014-11-01", 0));
      System.out.println(name + " count : "
          + api.count("2014-01-01", "2014-11-01"));
    }

    Map<String, UniqueReportApi> unique = ImmutableMap
        .<String, UniqueReportApi> builder()
        .put("clicks", dyn.getClicksReportApi())
        .put("opens", dyn.getOpensReportApi()).build();

    // unique report functionality
    for (Map.Entry<String, UniqueReportApi> entry : unique.entrySet()) {
      String name = entry.getKey();
      UniqueReportApi api = entry.getValue();

      System.out.println(name + " list unique : "
          + api.listUnique("2014-01-01", "2014-11-01", 0));
      System.out.println(name + " count unique : "
          + api.countUnique("2014-01-01", "2014-11-01"));
    }
  }
View Full Code Here

    ContextBuilder ctx = ContextBuilder.newBuilder(meta);

    ctx.credentials(/* intentionally blank -> */"", "yourapikey");
    DynMessagingApi dyn = ctx.buildApi(DynMessagingApi.class);

    SendMailApi send = dyn.getSendMailApi();
    System.out.println("send : "
        + send.sendMessage("fromperson@example.org",
            "recipient@example.org", "the subject", "hi text",
            "<p>hi html</p>", "ccuser@example.org",
            "reply-to@example.org", null));

    AccountsApi accounts = dyn.getAccountsApi();
View Full Code Here

        .put("opens", dyn.getOpensReportApi()).build();

    // unique report functionality
    for (Map.Entry<String, UniqueReportApi> entry : unique.entrySet()) {
      String name = entry.getKey();
      UniqueReportApi api = entry.getValue();

      System.out.println(name + " list unique : "
          + api.listUnique("2014-01-01", "2014-11-01", 0));
      System.out.println(name + " count unique : "
          + api.countUnique("2014-01-01", "2014-11-01"));
    }
  }
View Full Code Here

   HttpResponse getResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/get_zone.json", APPLICATION_JSON)).build();

   public void testGetWhenResponseIs2xx() {
      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, get, getResponse);
      assertEquals(success.getZoneApi().get("jclouds.org").toString(),
                   new GetZoneResponseTest().expected().toString());
   }
View Full Code Here

   HttpResponse createResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/new_zone.json", APPLICATION_JSON)).build();

   public void testCreateWhenResponseIs2xx() {
      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, create, createResponse);
      assertEquals(success.getZoneApi().scheduleCreate(CreatePrimaryZone.builder()
                                                                        .fqdn("jclouds.org")
                                                                        .contact("jimmy@jclouds.org")
                                                                        .build()), Job.success(285351593l));
   }
View Full Code Here

                                                                        .contact("jimmy@jclouds.org")
                                                                        .build()), Job.success(285351593l));
   }

   public void testCreateWithContactWhenResponseIs2xx() {
      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, create, createResponse);
      assertEquals(success.getZoneApi().scheduleCreateWithContact("jclouds.org", "jimmy@jclouds.org"), Job.success(285351593l));
   }
View Full Code Here

      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, create, createResponse);
      assertEquals(success.getZoneApi().scheduleCreateWithContact("jclouds.org", "jimmy@jclouds.org"), Job.success(285351593l));
   }

   public void testGetWhenResponseIs404() {
      DynTrafficApi fail = requestsSendResponses(createSession, createSessionResponse, get, notFound);
      assertNull(fail.getZoneApi().get("jclouds.org"));
   }
View Full Code Here

   HttpResponse listResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/list_zones.json", APPLICATION_JSON)).build();

   public void testListWhenResponseIs2xx() {
      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, list, listResponse);
      assertEquals(success.getZoneApi().list().toString(),
                   new ListZonesResponseTest().expected().toString());
   }
View Full Code Here

TOP

Related Classes of com.dyn.client.v3.messaging.handlers.DynMessagingErrorHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.