Sha256: ccb271d0506a351401a5380604224cdfec2efa1259d7d4e269595db9171e727a

Contents?: true

Size: 1.67 KB

Versions: 3

Compression:

Stored size: 1.67 KB

Contents

package org.embulk.input.marketo.rest;

import org.apache.commons.lang3.text.StrSubstitutor;

import java.util.Map;

/**
 * Created by tai.khuu on 9/5/17.
 */
public enum MarketoRESTEndpoint
{
    ACCESS_TOKEN("/oauth/token"),
    CREATE_LEAD_EXTRACT("/bulk/v1/leads/export/create.json"),
    CREATE_ACTIVITY_EXTRACT("/bulk/v1/activities/export/create.json"),
    DESCRIBE_LEAD("/rest/v1/leads/describe.json"),
    START_LEAD_EXPORT_JOB("/bulk/v1/leads/export/${export_id}/enqueue.json"),
    START_ACTIVITY_EXPORT_JOB("/bulk/v1/activities/export/${export_id}/enqueue.json"),
    GET_ACTIVITY_EXPORT_STATUS("/bulk/v1/activities/export/${export_id}/status.json"),
    GET_LEAD_EXPORT_STATUS("/bulk/v1/leads/export/${export_id}/status.json"),
    GET_LEAD_EXPORT_RESULT("/bulk/v1/leads/export/${export_id}/file.json"),
    GET_ACTIVITY_EXPORT_RESULT("/bulk/v1/activities/export/${export_id}/file.json"),
    GET_LISTS("/rest/v1/lists.json"),
    GET_LEADS_BY_LIST("/rest/v1/lists/${list_id}/leads.json"),
    GET_PROGRAMS("/rest/asset/v1/programs.json"),
    GET_LEADS_BY_PROGRAM("/rest/v1/leads/programs/${program_id}.json"),
    GET_CAMPAIGN("/rest/v1/campaigns.json"),
    GET_PROGRAMS_BY_TAG("/rest/asset/v1/program/byTag.json"),
    GET_CUSTOM_OBJECT("/rest/v1/customobjects/${api_name}.json"),
    GET_CUSTOM_OBJECT_DESCRIBE("/rest/v1/customobjects/${api_name}/describe.json");

    private String endpoint;

    MarketoRESTEndpoint(String endpoint)
    {
        this.endpoint = endpoint;
    }

    public String getEndpoint()
    {
        return endpoint;
    }

    public String getEndpoint(Map<String, String> pathParams)
    {
        return StrSubstitutor.replace(endpoint, pathParams);
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
embulk-input-marketo-0.6.15 src/main/java/org/embulk/input/marketo/rest/MarketoRESTEndpoint.java
embulk-input-marketo-0.6.13 src/main/java/org/embulk/input/marketo/rest/MarketoRESTEndpoint.java
embulk-input-marketo-0.6.12 src/main/java/org/embulk/input/marketo/rest/MarketoRESTEndpoint.java