Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type Campaign
- type CampaignGetResponse
- type CampaignListParams
- type CampaignListResponse
- type CampaignService
- type CampaignStatus
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type Customer
- type CustomerGetResponse
- type CustomerListParams
- type CustomerListResponse
- type CustomerListResponsePagination
- type CustomerService
- func (r *CustomerService) Get(ctx context.Context, customerID string, opts ...option.RequestOption) (res *CustomerGetResponse, err error)
- func (r *CustomerService) List(ctx context.Context, query CustomerListParams, opts ...option.RequestOption) (res *CustomerListResponse, err error)
- func (r *CustomerService) Update(ctx context.Context, customerID string, body CustomerUpdateParams, ...) (res *CustomerUpdateResponse, err error)
- type CustomerUpdateParams
- type CustomerUpdateResponse
- type Error
- type List
- type ListGetResponse
- type ListListParams
- type ListListResponse
- type ListListResponsePagination
- type ListService
- type ListSubscriberAddParams
- type ListSubscriberAddResponse
- type ListSubscriberListResponse
- type ListSubscriberRemoveParams
- type ListSubscriberRemoveResponse
- type ListSubscriberService
- func (r *ListSubscriberService) Add(ctx context.Context, listID string, body ListSubscriberAddParams, ...) (res *ListSubscriberAddResponse, err error)
- func (r *ListSubscriberService) List(ctx context.Context, listID string, opts ...option.RequestOption) (res *ListSubscriberListResponse, err error)
- func (r *ListSubscriberService) Remove(ctx context.Context, subscriberID string, body ListSubscriberRemoveParams, ...) (res *ListSubscriberRemoveResponse, err error)
- type List_Count
- type Subscriber
- type SubscriberStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (VIBEDROPPER_API_KEY, VIBEDROPPER_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type Campaign ¶
type Campaign struct {
ID string `json:"id"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
ListIDs []string `json:"listIds"`
Name string `json:"name"`
OrgID string `json:"orgId"`
SentAt time.Time `json:"sentAt" api:"nullable" format:"date-time"`
// Any of "DRAFT", "SCHEDULED", "SENDING", "SENT".
Status CampaignStatus `json:"status"`
Subject string `json:"subject"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
ListIDs respjson.Field
Name respjson.Field
OrgID respjson.Field
SentAt respjson.Field
Status respjson.Field
Subject respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Campaign) UnmarshalJSON ¶
type CampaignGetResponse ¶
type CampaignGetResponse struct {
Campaign Campaign `json:"campaign"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Campaign respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CampaignGetResponse) RawJSON ¶
func (r CampaignGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CampaignGetResponse) UnmarshalJSON ¶
func (r *CampaignGetResponse) UnmarshalJSON(data []byte) error
type CampaignListParams ¶ added in v0.2.0
type CampaignListParams struct {
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
Page param.Opt[int64] `query:"page,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CampaignListParams) URLQuery ¶ added in v0.2.0
func (r CampaignListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CampaignListParams's query parameters as `url.Values`.
type CampaignListResponse ¶
type CampaignListResponse struct {
Campaigns []Campaign `json:"campaigns"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Campaigns respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CampaignListResponse) RawJSON ¶
func (r CampaignListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CampaignListResponse) UnmarshalJSON ¶
func (r *CampaignListResponse) UnmarshalJSON(data []byte) error
type CampaignService ¶
type CampaignService struct {
Options []option.RequestOption
}
CampaignService contains methods and other services that help with interacting with the vibedropper API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCampaignService method instead.
func NewCampaignService ¶
func NewCampaignService(opts ...option.RequestOption) (r CampaignService)
NewCampaignService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CampaignService) Get ¶
func (r *CampaignService) Get(ctx context.Context, campaignID string, opts ...option.RequestOption) (res *CampaignGetResponse, err error)
Get campaign
func (*CampaignService) List ¶
func (r *CampaignService) List(ctx context.Context, query CampaignListParams, opts ...option.RequestOption) (res *CampaignListResponse, err error)
List campaigns
type CampaignStatus ¶
type CampaignStatus string
const ( CampaignStatusDraft CampaignStatus = "DRAFT" CampaignStatusScheduled CampaignStatus = "SCHEDULED" CampaignStatusSending CampaignStatus = "SENDING" CampaignStatusSent CampaignStatus = "SENT" )
type Client ¶
type Client struct {
Options []option.RequestOption
Lists ListService
Customers CustomerService
Campaigns CampaignService
}
Client creates a struct with services and top level methods that help with interacting with the vibedropper API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (VIBEDROPPER_API_KEY, VIBEDROPPER_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type Customer ¶
type Customer struct {
ID string `json:"id"`
AddressLine1 string `json:"addressLine1" api:"nullable"`
AddressLine2 string `json:"addressLine2" api:"nullable"`
AverageOrderValue float64 `json:"averageOrderValue"`
City string `json:"city" api:"nullable"`
Country string `json:"country" api:"nullable"`
Email string `json:"email"`
FirstName string `json:"firstName" api:"nullable"`
LastName string `json:"lastName" api:"nullable"`
LastPurchaseDate time.Time `json:"lastPurchaseDate" api:"nullable" format:"date-time"`
Lists []any `json:"lists"`
Name string `json:"name" api:"nullable"`
OrgID string `json:"orgId"`
PickupLocation any `json:"pickupLocation" api:"nullable"`
PostalCode string `json:"postalCode" api:"nullable"`
PurchaseCount int64 `json:"purchaseCount"`
Region any `json:"region" api:"nullable"`
Roles []any `json:"roles"`
State string `json:"state" api:"nullable"`
TotalSpent float64 `json:"totalSpent"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AddressLine1 respjson.Field
AddressLine2 respjson.Field
AverageOrderValue respjson.Field
City respjson.Field
Country respjson.Field
Email respjson.Field
FirstName respjson.Field
LastName respjson.Field
LastPurchaseDate respjson.Field
Lists respjson.Field
Name respjson.Field
OrgID respjson.Field
PickupLocation respjson.Field
PostalCode respjson.Field
PurchaseCount respjson.Field
Region respjson.Field
Roles respjson.Field
State respjson.Field
TotalSpent respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Customer) UnmarshalJSON ¶
type CustomerGetResponse ¶
type CustomerGetResponse struct {
Customer Customer `json:"customer"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Customer respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CustomerGetResponse) RawJSON ¶
func (r CustomerGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomerGetResponse) UnmarshalJSON ¶
func (r *CustomerGetResponse) UnmarshalJSON(data []byte) error
type CustomerListParams ¶
type CustomerListParams struct {
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
Page param.Opt[int64] `query:"page,omitzero" json:"-"`
// Search by name or email
Search param.Opt[string] `query:"search,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CustomerListParams) URLQuery ¶
func (r CustomerListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CustomerListParams's query parameters as `url.Values`.
type CustomerListResponse ¶
type CustomerListResponse struct {
Customers []Customer `json:"customers"`
Pagination CustomerListResponsePagination `json:"pagination"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Customers respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CustomerListResponse) RawJSON ¶
func (r CustomerListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomerListResponse) UnmarshalJSON ¶
func (r *CustomerListResponse) UnmarshalJSON(data []byte) error
type CustomerListResponsePagination ¶
type CustomerListResponsePagination struct {
Limit int64 `json:"limit"`
Page int64 `json:"page"`
Total int64 `json:"total"`
TotalPages int64 `json:"totalPages"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Limit respjson.Field
Page respjson.Field
Total respjson.Field
TotalPages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CustomerListResponsePagination) RawJSON ¶
func (r CustomerListResponsePagination) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomerListResponsePagination) UnmarshalJSON ¶
func (r *CustomerListResponsePagination) UnmarshalJSON(data []byte) error
type CustomerService ¶
type CustomerService struct {
Options []option.RequestOption
}
CustomerService contains methods and other services that help with interacting with the vibedropper API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerService method instead.
func NewCustomerService ¶
func NewCustomerService(opts ...option.RequestOption) (r CustomerService)
NewCustomerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CustomerService) Get ¶
func (r *CustomerService) Get(ctx context.Context, customerID string, opts ...option.RequestOption) (res *CustomerGetResponse, err error)
Get customer
func (*CustomerService) List ¶
func (r *CustomerService) List(ctx context.Context, query CustomerListParams, opts ...option.RequestOption) (res *CustomerListResponse, err error)
List customers
func (*CustomerService) Update ¶
func (r *CustomerService) Update(ctx context.Context, customerID string, body CustomerUpdateParams, opts ...option.RequestOption) (res *CustomerUpdateResponse, err error)
Update customer
type CustomerUpdateParams ¶
type CustomerUpdateParams struct {
AddressLine1 param.Opt[string] `json:"addressLine1,omitzero"`
AddressLine2 param.Opt[string] `json:"addressLine2,omitzero"`
City param.Opt[string] `json:"city,omitzero"`
Country param.Opt[string] `json:"country,omitzero"`
FirstName param.Opt[string] `json:"firstName,omitzero"`
LastName param.Opt[string] `json:"lastName,omitzero"`
PickupLocationID param.Opt[string] `json:"pickupLocationId,omitzero"`
PostalCode param.Opt[string] `json:"postalCode,omitzero"`
RegionID param.Opt[string] `json:"regionId,omitzero"`
State param.Opt[string] `json:"state,omitzero"`
Name param.Opt[string] `json:"name,omitzero"`
// contains filtered or unexported fields
}
func (CustomerUpdateParams) MarshalJSON ¶
func (r CustomerUpdateParams) MarshalJSON() (data []byte, err error)
func (*CustomerUpdateParams) UnmarshalJSON ¶
func (r *CustomerUpdateParams) UnmarshalJSON(data []byte) error
type CustomerUpdateResponse ¶
type CustomerUpdateResponse struct {
Customer Customer `json:"customer"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Customer respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CustomerUpdateResponse) RawJSON ¶
func (r CustomerUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomerUpdateResponse) UnmarshalJSON ¶
func (r *CustomerUpdateResponse) UnmarshalJSON(data []byte) error
type List ¶
type List struct {
ID string `json:"id"`
Count List_Count `json:"_count"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
Description string `json:"description" api:"nullable"`
Name string `json:"name"`
OrgID string `json:"orgId"`
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Count respjson.Field
CreatedAt respjson.Field
Description respjson.Field
Name respjson.Field
OrgID respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*List) UnmarshalJSON ¶
type ListGetResponse ¶
type ListGetResponse struct {
List List `json:"list"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
List respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListGetResponse) RawJSON ¶
func (r ListGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListGetResponse) UnmarshalJSON ¶
func (r *ListGetResponse) UnmarshalJSON(data []byte) error
type ListListParams ¶
type ListListParams struct {
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
Page param.Opt[int64] `query:"page,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ListListParams) URLQuery ¶
func (r ListListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ListListParams's query parameters as `url.Values`.
type ListListResponse ¶
type ListListResponse struct {
Lists []List `json:"lists"`
Pagination ListListResponsePagination `json:"pagination"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Lists respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListResponse) RawJSON ¶
func (r ListListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListResponse) UnmarshalJSON ¶
func (r *ListListResponse) UnmarshalJSON(data []byte) error
type ListListResponsePagination ¶
type ListListResponsePagination struct {
Limit int64 `json:"limit"`
Page int64 `json:"page"`
Total int64 `json:"total"`
TotalPages int64 `json:"totalPages"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Limit respjson.Field
Page respjson.Field
Total respjson.Field
TotalPages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListListResponsePagination) RawJSON ¶
func (r ListListResponsePagination) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListListResponsePagination) UnmarshalJSON ¶
func (r *ListListResponsePagination) UnmarshalJSON(data []byte) error
type ListService ¶
type ListService struct {
Options []option.RequestOption
Subscribers ListSubscriberService
}
ListService contains methods and other services that help with interacting with the vibedropper API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewListService method instead.
func NewListService ¶
func NewListService(opts ...option.RequestOption) (r ListService)
NewListService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ListService) Get ¶
func (r *ListService) Get(ctx context.Context, listID string, opts ...option.RequestOption) (res *ListGetResponse, err error)
Get a list
func (*ListService) List ¶
func (r *ListService) List(ctx context.Context, query ListListParams, opts ...option.RequestOption) (res *ListListResponse, err error)
List lists
type ListSubscriberAddParams ¶
type ListSubscriberAddParams struct {
Email string `json:"email" api:"required" format:"email"`
Name param.Opt[string] `json:"name,omitzero"`
PickupLocationID param.Opt[string] `json:"pickupLocationId,omitzero"`
RegionID param.Opt[string] `json:"regionId,omitzero"`
CustomFields any `json:"customFields,omitzero"`
// contains filtered or unexported fields
}
func (ListSubscriberAddParams) MarshalJSON ¶
func (r ListSubscriberAddParams) MarshalJSON() (data []byte, err error)
func (*ListSubscriberAddParams) UnmarshalJSON ¶
func (r *ListSubscriberAddParams) UnmarshalJSON(data []byte) error
type ListSubscriberAddResponse ¶
type ListSubscriberAddResponse struct {
Subscriber Subscriber `json:"subscriber"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Subscriber respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListSubscriberAddResponse) RawJSON ¶
func (r ListSubscriberAddResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSubscriberAddResponse) UnmarshalJSON ¶
func (r *ListSubscriberAddResponse) UnmarshalJSON(data []byte) error
type ListSubscriberListResponse ¶
type ListSubscriberListResponse struct {
Subscribers []Subscriber `json:"subscribers"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Subscribers respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListSubscriberListResponse) RawJSON ¶
func (r ListSubscriberListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSubscriberListResponse) UnmarshalJSON ¶
func (r *ListSubscriberListResponse) UnmarshalJSON(data []byte) error
type ListSubscriberRemoveParams ¶
type ListSubscriberRemoveParams struct {
ListID string `path:"listId" api:"required" json:"-"`
// contains filtered or unexported fields
}
type ListSubscriberRemoveResponse ¶
type ListSubscriberRemoveResponse struct {
Success bool `json:"success"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ListSubscriberRemoveResponse) RawJSON ¶
func (r ListSubscriberRemoveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSubscriberRemoveResponse) UnmarshalJSON ¶
func (r *ListSubscriberRemoveResponse) UnmarshalJSON(data []byte) error
type ListSubscriberService ¶
type ListSubscriberService struct {
Options []option.RequestOption
}
ListSubscriberService contains methods and other services that help with interacting with the vibedropper API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewListSubscriberService method instead.
func NewListSubscriberService ¶
func NewListSubscriberService(opts ...option.RequestOption) (r ListSubscriberService)
NewListSubscriberService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ListSubscriberService) Add ¶
func (r *ListSubscriberService) Add(ctx context.Context, listID string, body ListSubscriberAddParams, opts ...option.RequestOption) (res *ListSubscriberAddResponse, err error)
Add subscriber to list
func (*ListSubscriberService) List ¶
func (r *ListSubscriberService) List(ctx context.Context, listID string, opts ...option.RequestOption) (res *ListSubscriberListResponse, err error)
List subscribers
func (*ListSubscriberService) Remove ¶
func (r *ListSubscriberService) Remove(ctx context.Context, subscriberID string, body ListSubscriberRemoveParams, opts ...option.RequestOption) (res *ListSubscriberRemoveResponse, err error)
Remove subscriber from list
type List_Count ¶
type List_Count struct {
Subscribers int64 `json:"subscribers"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Subscribers respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (List_Count) RawJSON ¶
func (r List_Count) RawJSON() string
Returns the unmodified JSON received from the API
func (*List_Count) UnmarshalJSON ¶
func (r *List_Count) UnmarshalJSON(data []byte) error
type Subscriber ¶
type Subscriber struct {
ID string `json:"id"`
Customer any `json:"customer" api:"nullable"`
CustomFields any `json:"customFields" api:"nullable"`
Email string `json:"email"`
ListID string `json:"listId"`
Name string `json:"name" api:"nullable"`
// Any of "SUBSCRIBED", "UNSUBSCRIBED", "PENDING", "BOUNCED".
Status SubscriberStatus `json:"status"`
SubscribedAt time.Time `json:"subscribedAt" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Customer respjson.Field
CustomFields respjson.Field
Email respjson.Field
ListID respjson.Field
Name respjson.Field
Status respjson.Field
SubscribedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (Subscriber) RawJSON ¶
func (r Subscriber) RawJSON() string
Returns the unmodified JSON received from the API
func (*Subscriber) UnmarshalJSON ¶
func (r *Subscriber) UnmarshalJSON(data []byte) error
type SubscriberStatus ¶
type SubscriberStatus string
const ( SubscriberStatusSubscribed SubscriberStatus = "SUBSCRIBED" SubscriberStatusUnsubscribed SubscriberStatus = "UNSUBSCRIBED" SubscriberStatusPending SubscriberStatus = "PENDING" SubscriberStatusBounced SubscriberStatus = "BOUNCED" )
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
|
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|
|
shared
|
|