Skip to content

Events.create missing data parameter #14

@luposlip

Description

@luposlip

Hey there!

Using the sample code, I'm trying to create an Event using the Java API wrapper. I use the following code (with intercom-java 0.0.4):

    Event event = new Event().setEventName("bought-hat")
            .setUserID(user.getUserId())
            .putMetadata("invitee_email", "jayne@serenity.io")
            .putMetadata("found_date", System.currentTimeMillis())
            .putMetadata("new_signup", true);
        Event.create(event);

The last line throws the following exception:

Exception in thread "main" io.intercom.api.ClientException: missing data parameter
at io.intercom.api.HttpClient.throwException(HttpClient.java:198)
at io.intercom.api.HttpClient.handleError(HttpClient.java:154)
at io.intercom.api.HttpClient.runRequest(HttpClient.java:147)
at io.intercom.api.HttpClient.post(HttpClient.java:93)
at io.intercom.api.DataResource.create(DataResource.java:19)
at io.intercom.api.Event.create(Event.java:20)

Looking forward for a bit more stable Java wrapper (perhaps via a small test suite?).

Best regards,
Henrik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions