Documentation ¶
Index ¶
- Variables
- func GetDataMap(keys []string, values []string) map[string]interface{}
- func WithRetry(ctx context.Context, r RetryFunc) error
- type Client
- func (c Client) CancelExportLeads(exportID string) error
- func (c Client) CreateExportLeads(fields []string, startDate string, endDate string) (string, error)
- func (c Client) EnqueueExportLeads(exportID string) (string, error)
- func (c Client) FileExportLeads(ctx context.Context, endpoint string, exportID string) (*[]byte, error)
- func (c Client) FilterLeads(fileterType string, filterValues []int, fields []string, nextPageToken string) (*minimarketo.Response, error)
- func (c Client) GetAllFolders(maxDepth int) ([]FolderResult, error)
- func (c Client) GetAuthToken() (string, error)
- func (c Client) GetDeletedLeads(nextPageToken string) (*json.RawMessage, error)
- func (c Client) GetLeadByID(id int, fields []string) (*json.RawMessage, error)
- func (c Client) GetLeadChanges(nextPageToken string, fields []string) (*minimarketo.Response, error)
- func (c Client) GetNextPageToken(sinceTime time.Time) (string, error)
- func (c Client) StatusOfExportLeads(exportID string) (StatusOfExportResult, error)
- type CreateExportResult
- type FolderResult
- type RetryFunc
- type StatusOfExportResult
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetDataMap ¶
creates map from given keys and values.
Types ¶
type Client ¶
type Client struct {
minimarketo.Client
}
custom wrapper client for minimarketo client
func NewClient ¶
func NewClient(config minimarketo.ClientConfig) (Client, error)
returns new marketo client with new token.
func (Client) CancelExportLeads ¶
cancels export job.
func (Client) CreateExportLeads ¶
func (c Client) CreateExportLeads(fields []string, startDate string, endDate string) (string, error)
creates New exportLeads job for given time range with requested fields. Maximum time range will be 31 days. return export id and error.
func (Client) EnqueueExportLeads ¶
enqueues export job.
func (Client) FileExportLeads ¶
func (c Client) FileExportLeads(ctx context.Context, endpoint string, exportID string) (*[]byte, error)
returns export job result in CSV format.
func (Client) FilterLeads ¶
func (c Client) FilterLeads(fileterType string, filterValues []int, fields []string, nextPageToken string) (*minimarketo.Response, error)
returns filterd leads from marketo rest api
func (Client) GetAllFolders ¶
func (c Client) GetAllFolders(maxDepth int) ([]FolderResult, error)
returns all folders from marketo.
func (Client) GetAuthToken ¶
returns token for marketo rest api.
func (Client) GetDeletedLeads ¶
func (c Client) GetDeletedLeads(nextPageToken string) (*json.RawMessage, error)
returns deleted leads from marketo rest api.
func (Client) GetLeadByID ¶
returns Lead record from marketo rest api.
func (Client) GetLeadChanges ¶
func (c Client) GetLeadChanges(nextPageToken string, fields []string) (*minimarketo.Response, error)
returns updated leads from marketo rest api.
func (Client) GetNextPageToken ¶
returnss nextPageToken from marketo rest api.
func (Client) StatusOfExportLeads ¶
func (c Client) StatusOfExportLeads(exportID string) (StatusOfExportResult, error)
returns current status of export job with error.
type CreateExportResult ¶
type FolderResult ¶
type StatusOfExportResult ¶
type StatusOfExportResult struct { ExportID string `json:"exportId"` Format string `json:"format"` Status string `json:"status"` CreatedAt time.Time `json:"createdAt"` QueuedAt time.Time `json:"queuedAt"` StartedAt time.Time `json:"startedAt"` FinishedAt time.Time `json:"finishedAt"` NumberOfRecords int `json:"numberOfRecords"` FileSize int `json:"fileSize"` FileChecksum string `json:"fileChecksum"` }