postforme

package module
v0.1.0-alpha.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

README

Post For Me Go API Library

Go Reference

The Post For Me Go library provides convenient access to the Post For Me REST API from applications written in Go.

It is generated with Stainless.

MCP Server

Use the Post For Me MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

Add to Cursor Install in VS Code

Note: You may need to set environment variables in your MCP client.

Installation

import (
	"github.com/DayMoonDevelopment/post-for-me-go" // imported as postforme
)

Or to pin the version:

go get -u 'github.com/DayMoonDevelopment/[email protected]'

Requirements

This library requires Go 1.22+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/DayMoonDevelopment/post-for-me-go"
	"github.com/DayMoonDevelopment/post-for-me-go/option"
)

func main() {
	client := postforme.NewClient(
		option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("POST_FOR_ME_API_KEY")
	)
	socialPost, err := client.SocialPosts.New(context.TODO(), postforme.SocialPostNewParams{
		CreateSocialPost: postforme.CreateSocialPostParam{
			Caption:        "caption",
			SocialAccounts: []string{"string"},
		},
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", socialPost.ID)
}

Request fields

The postforme library uses the omitzero semantics from the Go 1.24+ encoding/json release for request fields.

Required primitive fields (int64, string, etc.) feature the tag `json:"...,required"`. These fields are always serialized, even their zero values.

Optional primitive types are wrapped in a param.Opt[T]. These fields can be set with the provided constructors, postforme.String(string), postforme.Int(int64), etc.

Any param.Opt[T], map, slice, struct or string enum uses the tag `json:"...,omitzero"`. Its zero value is considered omitted.

The param.IsOmitted(any) function can confirm the presence of any omitzero field.

p := postforme.ExampleParams{
	ID:   "id_xxx",                // required property
	Name: postforme.String("..."), // optional property

	Point: postforme.Point{
		X: 0,                // required field will serialize as 0
		Y: postforme.Int(1), // optional field will serialize as 1
		// ... omitted non-required fields will not be serialized
	},

	Origin: postforme.Origin{}, // the zero value of [Origin] is considered omitted
}

To send null instead of a param.Opt[T], use param.Null[T](). To send null instead of a struct T, use param.NullStruct[T]().

p.Name = param.Null[string]()       // 'null' instead of string
p.Point = param.NullStruct[Point]() // 'null' instead of struct

param.IsNull(p.Name)  // true
param.IsNull(p.Point) // true

Request structs contain a .SetExtraFields(map[string]any) method which can send non-conforming fields in the request body. Extra fields overwrite any struct fields with a matching key. For security reasons, only use SetExtraFields with trusted data.

To send a custom value instead of a struct, use param.Override[T](value).

// In cases where the API specifies a given type,
// but you want to send something else, use [SetExtraFields]:
p.SetExtraFields(map[string]any{
	"x": 0.01, // send "x" as a float instead of int
})

// Send a number instead of an object
custom := param.Override[postforme.FooParams](12)
Request unions

Unions are represented as a struct with fields prefixed by "Of" for each of its variants, only one field can be non-zero. The non-zero field will be serialized.

Sub-properties of the union can be accessed via methods on the union struct. These methods return a mutable pointer to the underlying data, if present.

// Only one field can be non-zero, use param.IsOmitted() to check if a field is set
type AnimalUnionParam struct {
	OfCat *Cat `json:",omitzero,inline`
	OfDog *Dog `json:",omitzero,inline`
}

animal := AnimalUnionParam{
	OfCat: &Cat{
		Name: "Whiskers",
		Owner: PersonParam{
			Address: AddressParam{Street: "3333 Coyote Hill Rd", Zip: 0},
		},
	},
}

// Mutating a field
if address := animal.GetOwner().GetAddress(); address != nil {
	address.ZipCode = 94304
}
Response objects

All fields in response structs are ordinary value types (not pointers or wrappers). Response structs also include a special JSON field containing metadata about each property.

type Animal struct {
	Name   string `json:"name,nullable"`
	Owners int    `json:"owners"`
	Age    int    `json:"age"`
	JSON   struct {
		Name        respjson.Field
		Owner       respjson.Field
		Age         respjson.Field
		ExtraFields map[string]respjson.Field
	} `json:"-"`
}

To handle optional data, use the .Valid() method on the JSON field. .Valid() returns true if a field is not null, not present, or couldn't be marshaled.

If .Valid() is false, the corresponding field will simply be its zero value.

raw := `{"owners": 1, "name": null}`

var res Animal
json.Unmarshal([]byte(raw), &res)

// Accessing regular fields

res.Owners // 1
res.Name   // ""
res.Age    // 0

// Optional field checks

res.JSON.Owners.Valid() // true
res.JSON.Name.Valid()   // false
res.JSON.Age.Valid()    // false

// Raw JSON values

res.JSON.Owners.Raw()                  // "1"
res.JSON.Name.Raw() == "null"          // true
res.JSON.Name.Raw() == respjson.Null   // true
res.JSON.Age.Raw() == ""               // true
res.JSON.Age.Raw() == respjson.Omitted // true

These .JSON structs also include an ExtraFields map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
Response Unions

In responses, unions are represented by a flattened struct containing all possible fields from each of the object variants. To convert it to a variant use the .AsFooVariant() method or the .AsAny() method if present.

If a response value union contains primitive values, primitive fields will be alongside the properties but prefixed with Of and feature the tag json:"...,inline".

type AnimalUnion struct {
	// From variants [Dog], [Cat]
	Owner Person `json:"owner"`
	// From variant [Dog]
	DogBreed string `json:"dog_breed"`
	// From variant [Cat]
	CatBreed string `json:"cat_breed"`
	// ...

	JSON struct {
		Owner respjson.Field
		// ...
	} `json:"-"`
}

// If animal variant
if animal.Owner.Address.ZipCode == "" {
	panic("missing zip code")
}

// Switch on the variant
switch variant := animal.AsAny().(type) {
case Dog:
case Cat:
default:
	panic("unexpected type")
}
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := postforme.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.SocialPosts.New(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

The request option option.WithDebugLog(nil) may be helpful while debugging.

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

Errors

When the API returns a non-success status code, we return an error with type *postforme.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.SocialPosts.New(context.TODO(), postforme.SocialPostNewParams{
	CreateSocialPost: postforme.CreateSocialPostParam{
		Caption:        "caption",
		SocialAccounts: []string{"string"},
	},
})
if err != nil {
	var apierr *postforme.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/v1/social-posts": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.SocialPosts.New(
	ctx,
	postforme.SocialPostNewParams{
		CreateSocialPost: postforme.CreateSocialPostParam{
			Caption:        "caption",
			SocialAccounts: []string{"string"},
		},
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as io.Reader. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper postforme.File(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := postforme.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.SocialPosts.New(
	context.TODO(),
	postforme.SocialPostNewParams{
		CreateSocialPost: postforme.CreateSocialPostParam{
			Caption:        "caption",
			SocialAccounts: []string{"string"},
		},
	},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
socialPost, err := client.SocialPosts.New(
	context.TODO(),
	postforme.SocialPostNewParams{
		CreateSocialPost: postforme.CreateSocialPostParam{
			Caption:        "caption",
			SocialAccounts: []string{"string"},
		},
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", socialPost)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]any

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   "id_xxxx",
    Data: FooNewParamsData{
        FirstName: postforme.String("John"),
    },
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := postforme.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) param.Opt[bool]

func BoolPtr

func BoolPtr(v bool) *bool

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (POST_FOR_ME_API_KEY, POST_FOR_ME_BASE_URL). This should be used to initialize new clients.

func File

func File(rdr io.Reader, filename string, contentType string) file

func Float

func Float(f float64) param.Opt[float64]

func FloatPtr

func FloatPtr(v float64) *float64

func Int

func Int(i int64) param.Opt[int64]

func IntPtr

func IntPtr(v int64) *int64

func Opt

func Opt[T comparable](v T) param.Opt[T]

func Ptr

func Ptr[T any](v T) *T

func String

func String(s string) param.Opt[string]

func StringPtr

func StringPtr(v string) *string

func Time

func Time(t time.Time) param.Opt[time.Time]

func TimePtr

func TimePtr(v time.Time) *time.Time

Types

type BlueskyConfigurationDto

type BlueskyConfigurationDto struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// Overrides the `media` from the post
	Media []BlueskyConfigurationDtoMedia `json:"media,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Caption     respjson.Field
		Media       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BlueskyConfigurationDto) RawJSON

func (r BlueskyConfigurationDto) RawJSON() string

Returns the unmodified JSON received from the API

func (BlueskyConfigurationDto) ToParam

ToParam converts this BlueskyConfigurationDto to a BlueskyConfigurationDtoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with BlueskyConfigurationDtoParam.Overrides()

func (*BlueskyConfigurationDto) UnmarshalJSON

func (r *BlueskyConfigurationDto) UnmarshalJSON(data []byte) error

type BlueskyConfigurationDtoMedia

type BlueskyConfigurationDtoMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []BlueskyConfigurationDtoMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BlueskyConfigurationDtoMedia) RawJSON

Returns the unmodified JSON received from the API

func (*BlueskyConfigurationDtoMedia) UnmarshalJSON

func (r *BlueskyConfigurationDtoMedia) UnmarshalJSON(data []byte) error

type BlueskyConfigurationDtoMediaParam

type BlueskyConfigurationDtoMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []BlueskyConfigurationDtoMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (BlueskyConfigurationDtoMediaParam) MarshalJSON

func (r BlueskyConfigurationDtoMediaParam) MarshalJSON() (data []byte, err error)

func (*BlueskyConfigurationDtoMediaParam) UnmarshalJSON

func (r *BlueskyConfigurationDtoMediaParam) UnmarshalJSON(data []byte) error

type BlueskyConfigurationDtoMediaTag

type BlueskyConfigurationDtoMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BlueskyConfigurationDtoMediaTag) RawJSON

Returns the unmodified JSON received from the API

func (*BlueskyConfigurationDtoMediaTag) UnmarshalJSON

func (r *BlueskyConfigurationDtoMediaTag) UnmarshalJSON(data []byte) error

type BlueskyConfigurationDtoMediaTagParam

type BlueskyConfigurationDtoMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (BlueskyConfigurationDtoMediaTagParam) MarshalJSON

func (r BlueskyConfigurationDtoMediaTagParam) MarshalJSON() (data []byte, err error)

func (*BlueskyConfigurationDtoMediaTagParam) UnmarshalJSON

func (r *BlueskyConfigurationDtoMediaTagParam) UnmarshalJSON(data []byte) error

type BlueskyConfigurationDtoParam

type BlueskyConfigurationDtoParam struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// Overrides the `media` from the post
	Media []BlueskyConfigurationDtoMediaParam `json:"media,omitzero"`
	// contains filtered or unexported fields
}

func (BlueskyConfigurationDtoParam) MarshalJSON

func (r BlueskyConfigurationDtoParam) MarshalJSON() (data []byte, err error)

func (*BlueskyConfigurationDtoParam) UnmarshalJSON

func (r *BlueskyConfigurationDtoParam) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	Options            []option.RequestOption
	Media              MediaService
	SocialPosts        SocialPostService
	SocialPostResults  SocialPostResultService
	SocialAccounts     SocialAccountService
	SocialAccountFeeds SocialAccountFeedService
}

Client creates a struct with services and top level methods that help with interacting with the post-for-me 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 (POST_FOR_ME_API_KEY, POST_FOR_ME_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.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type CreateSocialPostAccountConfigurationConfigurationMediaParam

type CreateSocialPostAccountConfigurationConfigurationMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []CreateSocialPostAccountConfigurationConfigurationMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (CreateSocialPostAccountConfigurationConfigurationMediaParam) MarshalJSON

func (*CreateSocialPostAccountConfigurationConfigurationMediaParam) UnmarshalJSON

type CreateSocialPostAccountConfigurationConfigurationMediaTagParam

type CreateSocialPostAccountConfigurationConfigurationMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (CreateSocialPostAccountConfigurationConfigurationMediaTagParam) MarshalJSON

func (*CreateSocialPostAccountConfigurationConfigurationMediaTagParam) UnmarshalJSON

type CreateSocialPostAccountConfigurationConfigurationParam

type CreateSocialPostAccountConfigurationConfigurationParam struct {
	// Allow comments on TikTok
	AllowComment param.Opt[bool] `json:"allow_comment,omitzero"`
	// Allow duets on TikTok
	AllowDuet param.Opt[bool] `json:"allow_duet,omitzero"`
	// Allow stitch on TikTok
	AllowStitch param.Opt[bool] `json:"allow_stitch,omitzero"`
	// Will automatically add music to photo posts on TikTok
	AutoAddMusic param.Opt[bool] `json:"auto_add_music,omitzero"`
	// Disclose branded content on TikTok
	DiscloseBrandedContent param.Opt[bool] `json:"disclose_branded_content,omitzero"`
	// Disclose your brand on TikTok
	DiscloseYourBrand param.Opt[bool] `json:"disclose_your_brand,omitzero"`
	// Flag content as AI generated on TikTok
	IsAIGenerated param.Opt[bool] `json:"is_ai_generated,omitzero"`
	// Will create a draft upload to TikTok, posting will need to be completed from
	// within the app
	IsDraft param.Opt[bool] `json:"is_draft,omitzero"`
	// Pinterest post link
	Link param.Opt[string] `json:"link,omitzero"`
	// Page id with a location that you want to tag the image or video with (Instagram
	// and Facebook)
	Location param.Opt[string] `json:"location,omitzero"`
	// If true will notify YouTube the video is intended for kids, defaults to false
	MadeForKids param.Opt[bool] `json:"made_for_kids,omitzero"`
	// If false Instagram video posts will only be shown in the Reels tab
	ShareToFeed param.Opt[bool] `json:"share_to_feed,omitzero"`
	// Overrides the `title` from the post
	Title param.Opt[string] `json:"title,omitzero"`
	// Id of the twitter community to post to
	CommunityID param.Opt[string] `json:"community_id,omitzero"`
	// Id of the tweet you want to quote
	QuoteTweetID param.Opt[string] `json:"quote_tweet_id,omitzero"`
	// Pinterest board IDs
	BoardIDs []string `json:"board_ids,omitzero"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// List of page ids or users to invite as collaborators for a Video Reel (Instagram
	// and Facebook)
	Collaborators [][]any `json:"collaborators,omitzero"`
	// Overrides the `media` from the post
	Media []CreateSocialPostAccountConfigurationConfigurationMediaParam `json:"media,omitzero"`
	// Post placement for Facebook/Instagram/Threads
	//
	// Any of "reels", "timeline", "stories".
	Placement string `json:"placement,omitzero"`
	// Sets the privacy status for TikTok (private, public), or YouTube (private,
	// public, unlisted)
	//
	// Any of "public", "private", "unlisted".
	PrivacyStatus string `json:"privacy_status,omitzero"`
	// Who can reply to the tweet
	//
	// Any of "following", "mentionedUsers", "subscribers", "verified".
	ReplySettings string `json:"reply_settings,omitzero"`
	// Instagram trial reel type, when passed will be created as a trial reel. If
	// manual the trial reel can be manually graduated in the native app. If perfomance
	// the trial reel will be automatically graduated if the trial reel performs well.
	//
	// Any of "manual", "performance".
	TrialReelType string `json:"trial_reel_type,omitzero"`
	// Poll options for the twitter
	Poll CreateSocialPostAccountConfigurationConfigurationPollParam `json:"poll,omitzero"`
	// contains filtered or unexported fields
}

Configuration for the social account

func (CreateSocialPostAccountConfigurationConfigurationParam) MarshalJSON

func (*CreateSocialPostAccountConfigurationConfigurationParam) UnmarshalJSON

type CreateSocialPostAccountConfigurationConfigurationPollParam

type CreateSocialPostAccountConfigurationConfigurationPollParam struct {
	// Duration of the poll in minutes
	DurationMinutes float64 `json:"duration_minutes,required"`
	// The choices of the poll, requiring 2-4 options
	Options []string `json:"options,omitzero,required"`
	// Who can reply to the tweet
	//
	// Any of "following", "mentionedUsers", "subscribers", "verified".
	ReplySettings string `json:"reply_settings,omitzero"`
	// contains filtered or unexported fields
}

Poll options for the twitter

The properties DurationMinutes, Options are required.

func (CreateSocialPostAccountConfigurationConfigurationPollParam) MarshalJSON

func (*CreateSocialPostAccountConfigurationConfigurationPollParam) UnmarshalJSON

type CreateSocialPostAccountConfigurationParam

type CreateSocialPostAccountConfigurationParam struct {
	// Configuration for the social account
	Configuration CreateSocialPostAccountConfigurationConfigurationParam `json:"configuration,omitzero,required"`
	// ID of the social account, you want to apply the configuration to
	SocialAccountID string `json:"social_account_id,required"`
	// contains filtered or unexported fields
}

The properties Configuration, SocialAccountID are required.

func (CreateSocialPostAccountConfigurationParam) MarshalJSON

func (r CreateSocialPostAccountConfigurationParam) MarshalJSON() (data []byte, err error)

func (*CreateSocialPostAccountConfigurationParam) UnmarshalJSON

func (r *CreateSocialPostAccountConfigurationParam) UnmarshalJSON(data []byte) error

type CreateSocialPostMediaParam

type CreateSocialPostMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []CreateSocialPostMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (CreateSocialPostMediaParam) MarshalJSON

func (r CreateSocialPostMediaParam) MarshalJSON() (data []byte, err error)

func (*CreateSocialPostMediaParam) UnmarshalJSON

func (r *CreateSocialPostMediaParam) UnmarshalJSON(data []byte) error

type CreateSocialPostMediaTagParam

type CreateSocialPostMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (CreateSocialPostMediaTagParam) MarshalJSON

func (r CreateSocialPostMediaTagParam) MarshalJSON() (data []byte, err error)

func (*CreateSocialPostMediaTagParam) UnmarshalJSON

func (r *CreateSocialPostMediaTagParam) UnmarshalJSON(data []byte) error

type CreateSocialPostParam

type CreateSocialPostParam struct {
	// Caption text for the post
	Caption string `json:"caption,required"`
	// Array of social account IDs for posting
	SocialAccounts []string `json:"social_accounts,omitzero,required"`
	// Array of social account IDs for posting
	ExternalID param.Opt[string] `json:"external_id,omitzero"`
	// If isDraft is set then the post will not be processed
	IsDraft param.Opt[bool] `json:"isDraft,omitzero"`
	// Scheduled date and time for the post, setting to null or undefined will post
	// instantly
	ScheduledAt param.Opt[time.Time] `json:"scheduled_at,omitzero" format:"date-time"`
	// Account-specific configurations for the post
	AccountConfigurations []CreateSocialPostAccountConfigurationParam `json:"account_configurations,omitzero"`
	// Array of media URLs associated with the post
	Media []CreateSocialPostMediaParam `json:"media,omitzero"`
	// Platform-specific configurations for the post
	PlatformConfigurations PlatformConfigurationsDtoParam `json:"platform_configurations,omitzero"`
	// contains filtered or unexported fields
}

The properties Caption, SocialAccounts are required.

func (CreateSocialPostParam) MarshalJSON

func (r CreateSocialPostParam) MarshalJSON() (data []byte, err error)

func (*CreateSocialPostParam) UnmarshalJSON

func (r *CreateSocialPostParam) UnmarshalJSON(data []byte) error

type Error

type Error = apierror.Error

type FacebookConfigurationDto

type FacebookConfigurationDto struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// List of page ids to invite as collaborators for a Video Reel
	Collaborators [][]any `json:"collaborators,nullable"`
	// Page id with a location that you want to tag the image or video with
	Location string `json:"location,nullable"`
	// Overrides the `media` from the post
	Media []FacebookConfigurationDtoMedia `json:"media,nullable"`
	// Facebook post placement
	//
	// Any of "reels", "stories", "timeline".
	Placement FacebookConfigurationDtoPlacement `json:"placement,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Caption       respjson.Field
		Collaborators respjson.Field
		Location      respjson.Field
		Media         respjson.Field
		Placement     respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FacebookConfigurationDto) RawJSON

func (r FacebookConfigurationDto) RawJSON() string

Returns the unmodified JSON received from the API

func (FacebookConfigurationDto) ToParam

ToParam converts this FacebookConfigurationDto to a FacebookConfigurationDtoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with FacebookConfigurationDtoParam.Overrides()

func (*FacebookConfigurationDto) UnmarshalJSON

func (r *FacebookConfigurationDto) UnmarshalJSON(data []byte) error

type FacebookConfigurationDtoMedia

type FacebookConfigurationDtoMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []FacebookConfigurationDtoMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FacebookConfigurationDtoMedia) RawJSON

Returns the unmodified JSON received from the API

func (*FacebookConfigurationDtoMedia) UnmarshalJSON

func (r *FacebookConfigurationDtoMedia) UnmarshalJSON(data []byte) error

type FacebookConfigurationDtoMediaParam

type FacebookConfigurationDtoMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []FacebookConfigurationDtoMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (FacebookConfigurationDtoMediaParam) MarshalJSON

func (r FacebookConfigurationDtoMediaParam) MarshalJSON() (data []byte, err error)

func (*FacebookConfigurationDtoMediaParam) UnmarshalJSON

func (r *FacebookConfigurationDtoMediaParam) UnmarshalJSON(data []byte) error

type FacebookConfigurationDtoMediaTag

type FacebookConfigurationDtoMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FacebookConfigurationDtoMediaTag) RawJSON

Returns the unmodified JSON received from the API

func (*FacebookConfigurationDtoMediaTag) UnmarshalJSON

func (r *FacebookConfigurationDtoMediaTag) UnmarshalJSON(data []byte) error

type FacebookConfigurationDtoMediaTagParam

type FacebookConfigurationDtoMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (FacebookConfigurationDtoMediaTagParam) MarshalJSON

func (r FacebookConfigurationDtoMediaTagParam) MarshalJSON() (data []byte, err error)

func (*FacebookConfigurationDtoMediaTagParam) UnmarshalJSON

func (r *FacebookConfigurationDtoMediaTagParam) UnmarshalJSON(data []byte) error

type FacebookConfigurationDtoParam

type FacebookConfigurationDtoParam struct {
	// Page id with a location that you want to tag the image or video with
	Location param.Opt[string] `json:"location,omitzero"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// List of page ids to invite as collaborators for a Video Reel
	Collaborators [][]any `json:"collaborators,omitzero"`
	// Overrides the `media` from the post
	Media []FacebookConfigurationDtoMediaParam `json:"media,omitzero"`
	// Facebook post placement
	//
	// Any of "reels", "stories", "timeline".
	Placement FacebookConfigurationDtoPlacement `json:"placement,omitzero"`
	// contains filtered or unexported fields
}

func (FacebookConfigurationDtoParam) MarshalJSON

func (r FacebookConfigurationDtoParam) MarshalJSON() (data []byte, err error)

func (*FacebookConfigurationDtoParam) UnmarshalJSON

func (r *FacebookConfigurationDtoParam) UnmarshalJSON(data []byte) error

type FacebookConfigurationDtoPlacement

type FacebookConfigurationDtoPlacement string

Facebook post placement

const (
	FacebookConfigurationDtoPlacementReels    FacebookConfigurationDtoPlacement = "reels"
	FacebookConfigurationDtoPlacementStories  FacebookConfigurationDtoPlacement = "stories"
	FacebookConfigurationDtoPlacementTimeline FacebookConfigurationDtoPlacement = "timeline"
)

type InstagramConfigurationDto

type InstagramConfigurationDto struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// Instagram usernames to be tagged as a collaborator
	Collaborators []string `json:"collaborators,nullable"`
	// Page id with a location that you want to tag the image or video with
	Location string `json:"location,nullable"`
	// Overrides the `media` from the post
	Media []InstagramConfigurationDtoMedia `json:"media,nullable"`
	// Instagram post placement
	//
	// Any of "reels", "stories", "timeline".
	Placement InstagramConfigurationDtoPlacement `json:"placement,nullable"`
	// If false video posts will only be shown in the Reels tab
	ShareToFeed bool `json:"share_to_feed,nullable"`
	// Instagram trial reel type, when passed will be created as a trial reel. If
	// manual the trial reel can be manually graduated in the native app. If perfomance
	// the trial reel will be automatically graduated if the trial reel performs well.
	//
	// Any of "manual", "performance".
	TrialReelType InstagramConfigurationDtoTrialReelType `json:"trial_reel_type,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Caption       respjson.Field
		Collaborators respjson.Field
		Location      respjson.Field
		Media         respjson.Field
		Placement     respjson.Field
		ShareToFeed   respjson.Field
		TrialReelType respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstagramConfigurationDto) RawJSON

func (r InstagramConfigurationDto) RawJSON() string

Returns the unmodified JSON received from the API

func (InstagramConfigurationDto) ToParam

ToParam converts this InstagramConfigurationDto to a InstagramConfigurationDtoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with InstagramConfigurationDtoParam.Overrides()

func (*InstagramConfigurationDto) UnmarshalJSON

func (r *InstagramConfigurationDto) UnmarshalJSON(data []byte) error

type InstagramConfigurationDtoMedia

type InstagramConfigurationDtoMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []InstagramConfigurationDtoMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstagramConfigurationDtoMedia) RawJSON

Returns the unmodified JSON received from the API

func (*InstagramConfigurationDtoMedia) UnmarshalJSON

func (r *InstagramConfigurationDtoMedia) UnmarshalJSON(data []byte) error

type InstagramConfigurationDtoMediaParam

type InstagramConfigurationDtoMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []InstagramConfigurationDtoMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (InstagramConfigurationDtoMediaParam) MarshalJSON

func (r InstagramConfigurationDtoMediaParam) MarshalJSON() (data []byte, err error)

func (*InstagramConfigurationDtoMediaParam) UnmarshalJSON

func (r *InstagramConfigurationDtoMediaParam) UnmarshalJSON(data []byte) error

type InstagramConfigurationDtoMediaTag

type InstagramConfigurationDtoMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstagramConfigurationDtoMediaTag) RawJSON

Returns the unmodified JSON received from the API

func (*InstagramConfigurationDtoMediaTag) UnmarshalJSON

func (r *InstagramConfigurationDtoMediaTag) UnmarshalJSON(data []byte) error

type InstagramConfigurationDtoMediaTagParam

type InstagramConfigurationDtoMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (InstagramConfigurationDtoMediaTagParam) MarshalJSON

func (r InstagramConfigurationDtoMediaTagParam) MarshalJSON() (data []byte, err error)

func (*InstagramConfigurationDtoMediaTagParam) UnmarshalJSON

func (r *InstagramConfigurationDtoMediaTagParam) UnmarshalJSON(data []byte) error

type InstagramConfigurationDtoParam

type InstagramConfigurationDtoParam struct {
	// Page id with a location that you want to tag the image or video with
	Location param.Opt[string] `json:"location,omitzero"`
	// If false video posts will only be shown in the Reels tab
	ShareToFeed param.Opt[bool] `json:"share_to_feed,omitzero"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// Instagram usernames to be tagged as a collaborator
	Collaborators []string `json:"collaborators,omitzero"`
	// Overrides the `media` from the post
	Media []InstagramConfigurationDtoMediaParam `json:"media,omitzero"`
	// Instagram post placement
	//
	// Any of "reels", "stories", "timeline".
	Placement InstagramConfigurationDtoPlacement `json:"placement,omitzero"`
	// Instagram trial reel type, when passed will be created as a trial reel. If
	// manual the trial reel can be manually graduated in the native app. If perfomance
	// the trial reel will be automatically graduated if the trial reel performs well.
	//
	// Any of "manual", "performance".
	TrialReelType InstagramConfigurationDtoTrialReelType `json:"trial_reel_type,omitzero"`
	// contains filtered or unexported fields
}

func (InstagramConfigurationDtoParam) MarshalJSON

func (r InstagramConfigurationDtoParam) MarshalJSON() (data []byte, err error)

func (*InstagramConfigurationDtoParam) UnmarshalJSON

func (r *InstagramConfigurationDtoParam) UnmarshalJSON(data []byte) error

type InstagramConfigurationDtoPlacement

type InstagramConfigurationDtoPlacement string

Instagram post placement

const (
	InstagramConfigurationDtoPlacementReels    InstagramConfigurationDtoPlacement = "reels"
	InstagramConfigurationDtoPlacementStories  InstagramConfigurationDtoPlacement = "stories"
	InstagramConfigurationDtoPlacementTimeline InstagramConfigurationDtoPlacement = "timeline"
)

type InstagramConfigurationDtoTrialReelType

type InstagramConfigurationDtoTrialReelType string

Instagram trial reel type, when passed will be created as a trial reel. If manual the trial reel can be manually graduated in the native app. If perfomance the trial reel will be automatically graduated if the trial reel performs well.

const (
	InstagramConfigurationDtoTrialReelTypeManual      InstagramConfigurationDtoTrialReelType = "manual"
	InstagramConfigurationDtoTrialReelTypePerformance InstagramConfigurationDtoTrialReelType = "performance"
)

type LinkedinConfigurationDto

type LinkedinConfigurationDto struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// Overrides the `media` from the post
	Media []LinkedinConfigurationDtoMedia `json:"media,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Caption     respjson.Field
		Media       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LinkedinConfigurationDto) RawJSON

func (r LinkedinConfigurationDto) RawJSON() string

Returns the unmodified JSON received from the API

func (LinkedinConfigurationDto) ToParam

ToParam converts this LinkedinConfigurationDto to a LinkedinConfigurationDtoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with LinkedinConfigurationDtoParam.Overrides()

func (*LinkedinConfigurationDto) UnmarshalJSON

func (r *LinkedinConfigurationDto) UnmarshalJSON(data []byte) error

type LinkedinConfigurationDtoMedia

type LinkedinConfigurationDtoMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []LinkedinConfigurationDtoMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LinkedinConfigurationDtoMedia) RawJSON

Returns the unmodified JSON received from the API

func (*LinkedinConfigurationDtoMedia) UnmarshalJSON

func (r *LinkedinConfigurationDtoMedia) UnmarshalJSON(data []byte) error

type LinkedinConfigurationDtoMediaParam

type LinkedinConfigurationDtoMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []LinkedinConfigurationDtoMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (LinkedinConfigurationDtoMediaParam) MarshalJSON

func (r LinkedinConfigurationDtoMediaParam) MarshalJSON() (data []byte, err error)

func (*LinkedinConfigurationDtoMediaParam) UnmarshalJSON

func (r *LinkedinConfigurationDtoMediaParam) UnmarshalJSON(data []byte) error

type LinkedinConfigurationDtoMediaTag

type LinkedinConfigurationDtoMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LinkedinConfigurationDtoMediaTag) RawJSON

Returns the unmodified JSON received from the API

func (*LinkedinConfigurationDtoMediaTag) UnmarshalJSON

func (r *LinkedinConfigurationDtoMediaTag) UnmarshalJSON(data []byte) error

type LinkedinConfigurationDtoMediaTagParam

type LinkedinConfigurationDtoMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (LinkedinConfigurationDtoMediaTagParam) MarshalJSON

func (r LinkedinConfigurationDtoMediaTagParam) MarshalJSON() (data []byte, err error)

func (*LinkedinConfigurationDtoMediaTagParam) UnmarshalJSON

func (r *LinkedinConfigurationDtoMediaTagParam) UnmarshalJSON(data []byte) error

type LinkedinConfigurationDtoParam

type LinkedinConfigurationDtoParam struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// Overrides the `media` from the post
	Media []LinkedinConfigurationDtoMediaParam `json:"media,omitzero"`
	// contains filtered or unexported fields
}

func (LinkedinConfigurationDtoParam) MarshalJSON

func (r LinkedinConfigurationDtoParam) MarshalJSON() (data []byte, err error)

func (*LinkedinConfigurationDtoParam) UnmarshalJSON

func (r *LinkedinConfigurationDtoParam) UnmarshalJSON(data []byte) error

type MediaNewUploadURLResponse

type MediaNewUploadURLResponse struct {
	// The public URL for the media, to use once file has been uploaded
	MediaURL string `json:"media_url,required"`
	// The signed upload URL for the client to upload the file
	UploadURL string `json:"upload_url,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MediaURL    respjson.Field
		UploadURL   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MediaNewUploadURLResponse) RawJSON

func (r MediaNewUploadURLResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MediaNewUploadURLResponse) UnmarshalJSON

func (r *MediaNewUploadURLResponse) UnmarshalJSON(data []byte) error

type MediaService

type MediaService struct {
	Options []option.RequestOption
}

MediaService contains methods and other services that help with interacting with the post-for-me 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 NewMediaService method instead.

func NewMediaService

func NewMediaService(opts ...option.RequestOption) (r MediaService)

NewMediaService 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 (*MediaService) NewUploadURL

func (r *MediaService) NewUploadURL(ctx context.Context, opts ...option.RequestOption) (res *MediaNewUploadURLResponse, err error)

To upload media to attach to your post, make a `POST` request to the `/media/create-upload-url` endpoint.

You'll receive the public url of your media item (which can be used when making a post) and will include an `upload_url` which is a signed URL of the storage location for uploading your file to.

This URL is unique and publicly signed for a short time, so make sure to upload your files in a timely manner.

**Example flow using JavaScript and the Fetch API:**

**Request an upload URL**

```js // Step 1: Request an upload URL from your API const response = await fetch(

"https://api.postforme.dev/v1/media/create-upload-url",
{
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
}

);

const { media_url, upload_url } = await response.json(); ```

**Upload your file to the signed URL**

```js // Step 2: Upload your file to the signed URL const file = /* your File or Blob object, e.g., from an <input type="file"> */;

await fetch(upload_url, {
  method: 'PUT',
  headers: {
    'Content-Type': 'image/jpeg'
  },
  body: file
});

```

**Use the `media_url` when creating your post**

```js
// Step 3: Use the `media_url` when creating your post
const response = await fetch('https://api.postforme.dev/v1/social-posts', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    social_accounts: ['spc_...', ...],
    caption: 'My caption',
    media: [
      {
        url: media_url
      }
    ]
  })
});
```

type PinterestConfigurationDto

type PinterestConfigurationDto struct {
	// Pinterest board IDs
	BoardIDs []string `json:"board_ids,nullable"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// Pinterest post link
	Link string `json:"link,nullable"`
	// Overrides the `media` from the post
	Media []PinterestConfigurationDtoMedia `json:"media,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BoardIDs    respjson.Field
		Caption     respjson.Field
		Link        respjson.Field
		Media       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PinterestConfigurationDto) RawJSON

func (r PinterestConfigurationDto) RawJSON() string

Returns the unmodified JSON received from the API

func (PinterestConfigurationDto) ToParam

ToParam converts this PinterestConfigurationDto to a PinterestConfigurationDtoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PinterestConfigurationDtoParam.Overrides()

func (*PinterestConfigurationDto) UnmarshalJSON

func (r *PinterestConfigurationDto) UnmarshalJSON(data []byte) error

type PinterestConfigurationDtoMedia

type PinterestConfigurationDtoMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []PinterestConfigurationDtoMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PinterestConfigurationDtoMedia) RawJSON

Returns the unmodified JSON received from the API

func (*PinterestConfigurationDtoMedia) UnmarshalJSON

func (r *PinterestConfigurationDtoMedia) UnmarshalJSON(data []byte) error

type PinterestConfigurationDtoMediaParam

type PinterestConfigurationDtoMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []PinterestConfigurationDtoMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (PinterestConfigurationDtoMediaParam) MarshalJSON

func (r PinterestConfigurationDtoMediaParam) MarshalJSON() (data []byte, err error)

func (*PinterestConfigurationDtoMediaParam) UnmarshalJSON

func (r *PinterestConfigurationDtoMediaParam) UnmarshalJSON(data []byte) error

type PinterestConfigurationDtoMediaTag

type PinterestConfigurationDtoMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PinterestConfigurationDtoMediaTag) RawJSON

Returns the unmodified JSON received from the API

func (*PinterestConfigurationDtoMediaTag) UnmarshalJSON

func (r *PinterestConfigurationDtoMediaTag) UnmarshalJSON(data []byte) error

type PinterestConfigurationDtoMediaTagParam

type PinterestConfigurationDtoMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (PinterestConfigurationDtoMediaTagParam) MarshalJSON

func (r PinterestConfigurationDtoMediaTagParam) MarshalJSON() (data []byte, err error)

func (*PinterestConfigurationDtoMediaTagParam) UnmarshalJSON

func (r *PinterestConfigurationDtoMediaTagParam) UnmarshalJSON(data []byte) error

type PinterestConfigurationDtoParam

type PinterestConfigurationDtoParam struct {
	// Pinterest post link
	Link param.Opt[string] `json:"link,omitzero"`
	// Pinterest board IDs
	BoardIDs []string `json:"board_ids,omitzero"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// Overrides the `media` from the post
	Media []PinterestConfigurationDtoMediaParam `json:"media,omitzero"`
	// contains filtered or unexported fields
}

func (PinterestConfigurationDtoParam) MarshalJSON

func (r PinterestConfigurationDtoParam) MarshalJSON() (data []byte, err error)

func (*PinterestConfigurationDtoParam) UnmarshalJSON

func (r *PinterestConfigurationDtoParam) UnmarshalJSON(data []byte) error

type PlatformConfigurationsDto

type PlatformConfigurationsDto struct {
	// Bluesky configuration
	Bluesky BlueskyConfigurationDto `json:"bluesky,nullable"`
	// Facebook configuration
	Facebook FacebookConfigurationDto `json:"facebook,nullable"`
	// Instagram configuration
	Instagram InstagramConfigurationDto `json:"instagram,nullable"`
	// LinkedIn configuration
	Linkedin LinkedinConfigurationDto `json:"linkedin,nullable"`
	// Pinterest configuration
	Pinterest PinterestConfigurationDto `json:"pinterest,nullable"`
	// Threads configuration
	Threads ThreadsConfigurationDto `json:"threads,nullable"`
	// TikTok configuration
	Tiktok TiktokConfiguration `json:"tiktok,nullable"`
	// TikTok configuration
	TiktokBusiness TiktokConfiguration `json:"tiktok_business,nullable"`
	// Twitter configuration
	X TwitterConfigurationDto `json:"x,nullable"`
	// YouTube configuration
	Youtube YoutubeConfigurationDto `json:"youtube,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Bluesky        respjson.Field
		Facebook       respjson.Field
		Instagram      respjson.Field
		Linkedin       respjson.Field
		Pinterest      respjson.Field
		Threads        respjson.Field
		Tiktok         respjson.Field
		TiktokBusiness respjson.Field
		X              respjson.Field
		Youtube        respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformConfigurationsDto) RawJSON

func (r PlatformConfigurationsDto) RawJSON() string

Returns the unmodified JSON received from the API

func (PlatformConfigurationsDto) ToParam

ToParam converts this PlatformConfigurationsDto to a PlatformConfigurationsDtoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PlatformConfigurationsDtoParam.Overrides()

func (*PlatformConfigurationsDto) UnmarshalJSON

func (r *PlatformConfigurationsDto) UnmarshalJSON(data []byte) error

type PlatformConfigurationsDtoParam

type PlatformConfigurationsDtoParam struct {
	// Bluesky configuration
	Bluesky BlueskyConfigurationDtoParam `json:"bluesky,omitzero"`
	// Facebook configuration
	Facebook FacebookConfigurationDtoParam `json:"facebook,omitzero"`
	// Instagram configuration
	Instagram InstagramConfigurationDtoParam `json:"instagram,omitzero"`
	// LinkedIn configuration
	Linkedin LinkedinConfigurationDtoParam `json:"linkedin,omitzero"`
	// Pinterest configuration
	Pinterest PinterestConfigurationDtoParam `json:"pinterest,omitzero"`
	// Threads configuration
	Threads ThreadsConfigurationDtoParam `json:"threads,omitzero"`
	// TikTok configuration
	Tiktok TiktokConfigurationParam `json:"tiktok,omitzero"`
	// TikTok configuration
	TiktokBusiness TiktokConfigurationParam `json:"tiktok_business,omitzero"`
	// Twitter configuration
	X TwitterConfigurationDtoParam `json:"x,omitzero"`
	// YouTube configuration
	Youtube YoutubeConfigurationDtoParam `json:"youtube,omitzero"`
	// contains filtered or unexported fields
}

func (PlatformConfigurationsDtoParam) MarshalJSON

func (r PlatformConfigurationsDtoParam) MarshalJSON() (data []byte, err error)

func (*PlatformConfigurationsDtoParam) UnmarshalJSON

func (r *PlatformConfigurationsDtoParam) UnmarshalJSON(data []byte) error

type PlatformPost

type PlatformPost struct {
	// Caption or text content of the post
	Caption string `json:"caption,required"`
	// Array of media items attached to the post
	Media [][]any `json:"media,required"`
	// Social media platform name
	Platform string `json:"platform,required"`
	// Platform-specific account ID
	PlatformAccountID string `json:"platform_account_id,required"`
	// Platform-specific post ID
	PlatformPostID string `json:"platform_post_id,required"`
	// URL to the post on the platform
	PlatformURL string `json:"platform_url,required"`
	// ID of the social account
	SocialAccountID string `json:"social_account_id,required"`
	// External account ID from the platform
	ExternalAccountID string `json:"external_account_id,nullable"`
	// External post ID from the platform
	ExternalPostID string `json:"external_post_id,nullable"`
	// Post metrics and analytics data
	Metrics PlatformPostMetricsUnion `json:"metrics"`
	// Date the post was published
	PostedAt time.Time `json:"posted_at" format:"date-time"`
	// ID of the social post
	SocialPostID string `json:"social_post_id,nullable"`
	// ID of the social post result
	SocialPostResultID string `json:"social_post_result_id,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Caption            respjson.Field
		Media              respjson.Field
		Platform           respjson.Field
		PlatformAccountID  respjson.Field
		PlatformPostID     respjson.Field
		PlatformURL        respjson.Field
		SocialAccountID    respjson.Field
		ExternalAccountID  respjson.Field
		ExternalPostID     respjson.Field
		Metrics            respjson.Field
		PostedAt           respjson.Field
		SocialPostID       respjson.Field
		SocialPostResultID respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPost) RawJSON

func (r PlatformPost) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlatformPost) UnmarshalJSON

func (r *PlatformPost) UnmarshalJSON(data []byte) error

type PlatformPostMetricsBlueskyPostMetricsDto

type PlatformPostMetricsBlueskyPostMetricsDto struct {
	// Number of likes on the post
	LikeCount float64 `json:"likeCount,required"`
	// Number of quotes of the post
	QuoteCount float64 `json:"quoteCount,required"`
	// Number of replies on the post
	ReplyCount float64 `json:"replyCount,required"`
	// Number of reposts of the post
	RepostCount float64 `json:"repostCount,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		LikeCount   respjson.Field
		QuoteCount  respjson.Field
		ReplyCount  respjson.Field
		RepostCount respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsBlueskyPostMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsBlueskyPostMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsBlueskyPostMetricsDto) UnmarshalJSON(data []byte) error

type PlatformPostMetricsFacebookPostMetricsDto

type PlatformPostMetricsFacebookPostMetricsDto struct {
	// Total activity breakdown by action type
	ActivityByActionType []PlatformPostMetricsFacebookPostMetricsDtoActivityByActionType `json:"activity_by_action_type"`
	// Unique users activity breakdown by action type
	ActivityByActionTypeUnique []PlatformPostMetricsFacebookPostMetricsDtoActivityByActionTypeUnique `json:"activity_by_action_type_unique"`
	// Number of comments (from post object)
	Comments float64 `json:"comments"`
	// Number of fans who saw the post
	FanReach float64 `json:"fan_reach"`
	// Number of times the photo or video was viewed
	MediaViews float64 `json:"media_views"`
	// Number of people who saw the post via non-viral distribution
	NonviralReach float64 `json:"nonviral_reach"`
	// Number of people who saw the post via organic distribution
	OrganicReach float64 `json:"organic_reach"`
	// Number of people who saw the post via paid distribution
	PaidReach float64 `json:"paid_reach"`
	// Total number of unique people who saw the post
	Reach float64 `json:"reach"`
	// Number of anger reactions
	ReactionsAnger float64 `json:"reactions_anger"`
	// Breakdown of all reaction types
	ReactionsByType any `json:"reactions_by_type"`
	// Number of haha reactions
	ReactionsHaha float64 `json:"reactions_haha"`
	// Number of like reactions
	ReactionsLike float64 `json:"reactions_like"`
	// Number of love reactions
	ReactionsLove float64 `json:"reactions_love"`
	// Number of sad reactions
	ReactionsSorry float64 `json:"reactions_sorry"`
	// Total number of reactions (all types)
	ReactionsTotal float64 `json:"reactions_total"`
	// Number of wow reactions
	ReactionsWow float64 `json:"reactions_wow"`
	// Number of shares (from post object)
	Shares float64 `json:"shares"`
	// Average time video was viewed in milliseconds
	VideoAvgTimeWatched float64 `json:"video_avg_time_watched"`
	// Number of times video was viewed to 95% organically
	VideoCompleteViewsOrganic float64 `json:"video_complete_views_organic"`
	// Number of unique people who viewed video to 95% organically
	VideoCompleteViewsOrganicUnique float64 `json:"video_complete_views_organic_unique"`
	// Number of times video was viewed to 95% via paid distribution
	VideoCompleteViewsPaid float64 `json:"video_complete_views_paid"`
	// Number of unique people who viewed video to 95% via paid distribution
	VideoCompleteViewsPaidUnique float64 `json:"video_complete_views_paid_unique"`
	// Length of the video in milliseconds
	VideoLength float64 `json:"video_length"`
	// Video retention graph for autoplayed views
	VideoRetentionGraphAutoplayed []PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphAutoplayed `json:"video_retention_graph_autoplayed"`
	// Video retention graph for clicked-to-play views
	VideoRetentionGraphClickedToPlay []PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphClickedToPlay `json:"video_retention_graph_clicked_to_play"`
	// Number of unique people who performed social actions on the video
	VideoSocialActionsUnique float64 `json:"video_social_actions_unique"`
	// Total time video was viewed in milliseconds
	VideoViewTime float64 `json:"video_view_time"`
	// Video view time breakdown by age and gender
	VideoViewTimeByAgeGender []PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByAgeGender `json:"video_view_time_by_age_gender"`
	// Video view time breakdown by country
	VideoViewTimeByCountry []PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByCountry `json:"video_view_time_by_country"`
	// Video view time breakdown by distribution type
	VideoViewTimeByDistributionType any `json:"video_view_time_by_distribution_type"`
	// Video view time breakdown by region
	VideoViewTimeByRegion []PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByRegion `json:"video_view_time_by_region"`
	// Total time video was viewed in milliseconds via organic distribution
	VideoViewTimeOrganic float64 `json:"video_view_time_organic"`
	// Number of times video was viewed for 3+ seconds
	VideoViews float64 `json:"video_views"`
	// Number of times video was viewed for 15+ seconds
	VideoViews15s float64 `json:"video_views_15s"`
	// Number of times video was viewed for 60+ seconds (excludes videos shorter than
	// 60s)
	VideoViews60s float64 `json:"video_views_60s"`
	// Number of times video was autoplayed for 3+ seconds
	VideoViewsAutoplayed float64 `json:"video_views_autoplayed"`
	// Video views breakdown by distribution type
	VideoViewsByDistributionType any `json:"video_views_by_distribution_type"`
	// Number of times video was clicked to play for 3+ seconds
	VideoViewsClickedToPlay float64 `json:"video_views_clicked_to_play"`
	// Number of times video was viewed for 3+ seconds organically
	VideoViewsOrganic float64 `json:"video_views_organic"`
	// Number of unique people who viewed the video for 3+ seconds organically
	VideoViewsOrganicUnique float64 `json:"video_views_organic_unique"`
	// Number of times video was viewed for 3+ seconds via paid distribution
	VideoViewsPaid float64 `json:"video_views_paid"`
	// Number of unique people who viewed the video for 3+ seconds via paid
	// distribution
	VideoViewsPaidUnique float64 `json:"video_views_paid_unique"`
	// Number of times video was viewed with sound on
	VideoViewsSoundOn float64 `json:"video_views_sound_on"`
	// Number of unique people who viewed the video for 3+ seconds
	VideoViewsUnique float64 `json:"video_views_unique"`
	// Number of people who saw the post in News Feed via viral reach
	ViralReach float64 `json:"viral_reach"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActivityByActionType             respjson.Field
		ActivityByActionTypeUnique       respjson.Field
		Comments                         respjson.Field
		FanReach                         respjson.Field
		MediaViews                       respjson.Field
		NonviralReach                    respjson.Field
		OrganicReach                     respjson.Field
		PaidReach                        respjson.Field
		Reach                            respjson.Field
		ReactionsAnger                   respjson.Field
		ReactionsByType                  respjson.Field
		ReactionsHaha                    respjson.Field
		ReactionsLike                    respjson.Field
		ReactionsLove                    respjson.Field
		ReactionsSorry                   respjson.Field
		ReactionsTotal                   respjson.Field
		ReactionsWow                     respjson.Field
		Shares                           respjson.Field
		VideoAvgTimeWatched              respjson.Field
		VideoCompleteViewsOrganic        respjson.Field
		VideoCompleteViewsOrganicUnique  respjson.Field
		VideoCompleteViewsPaid           respjson.Field
		VideoCompleteViewsPaidUnique     respjson.Field
		VideoLength                      respjson.Field
		VideoRetentionGraphAutoplayed    respjson.Field
		VideoRetentionGraphClickedToPlay respjson.Field
		VideoSocialActionsUnique         respjson.Field
		VideoViewTime                    respjson.Field
		VideoViewTimeByAgeGender         respjson.Field
		VideoViewTimeByCountry           respjson.Field
		VideoViewTimeByDistributionType  respjson.Field
		VideoViewTimeByRegion            respjson.Field
		VideoViewTimeOrganic             respjson.Field
		VideoViews                       respjson.Field
		VideoViews15s                    respjson.Field
		VideoViews60s                    respjson.Field
		VideoViewsAutoplayed             respjson.Field
		VideoViewsByDistributionType     respjson.Field
		VideoViewsClickedToPlay          respjson.Field
		VideoViewsOrganic                respjson.Field
		VideoViewsOrganicUnique          respjson.Field
		VideoViewsPaid                   respjson.Field
		VideoViewsPaidUnique             respjson.Field
		VideoViewsSoundOn                respjson.Field
		VideoViewsUnique                 respjson.Field
		ViralReach                       respjson.Field
		ExtraFields                      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsFacebookPostMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsFacebookPostMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsFacebookPostMetricsDto) UnmarshalJSON(data []byte) error

type PlatformPostMetricsFacebookPostMetricsDtoActivityByActionType

type PlatformPostMetricsFacebookPostMetricsDtoActivityByActionType struct {
	// Action type (e.g., like, comment, share)
	ActionType string `json:"action_type,required"`
	// Number of actions
	Value float64 `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActionType  respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsFacebookPostMetricsDtoActivityByActionType) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsFacebookPostMetricsDtoActivityByActionType) UnmarshalJSON

type PlatformPostMetricsFacebookPostMetricsDtoActivityByActionTypeUnique

type PlatformPostMetricsFacebookPostMetricsDtoActivityByActionTypeUnique struct {
	// Action type (e.g., like, comment, share)
	ActionType string `json:"action_type,required"`
	// Number of actions
	Value float64 `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActionType  respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsFacebookPostMetricsDtoActivityByActionTypeUnique) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsFacebookPostMetricsDtoActivityByActionTypeUnique) UnmarshalJSON

type PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphAutoplayed

type PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphAutoplayed struct {
	// Percentage of viewers at this time
	Rate float64 `json:"rate,required"`
	// Time in seconds
	Time float64 `json:"time,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Rate        respjson.Field
		Time        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphAutoplayed) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphAutoplayed) UnmarshalJSON

type PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphClickedToPlay

type PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphClickedToPlay struct {
	// Percentage of viewers at this time
	Rate float64 `json:"rate,required"`
	// Time in seconds
	Time float64 `json:"time,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Rate        respjson.Field
		Time        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphClickedToPlay) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphClickedToPlay) UnmarshalJSON

type PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByAgeGender

type PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByAgeGender struct {
	// Demographic key (e.g., age_gender, region, country)
	Key string `json:"key,required"`
	// Total view time in milliseconds
	Value float64 `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Key         respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByAgeGender) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByAgeGender) UnmarshalJSON

type PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByCountry

type PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByCountry struct {
	// Demographic key (e.g., age_gender, region, country)
	Key string `json:"key,required"`
	// Total view time in milliseconds
	Value float64 `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Key         respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByCountry) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByCountry) UnmarshalJSON

type PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByRegion

type PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByRegion struct {
	// Demographic key (e.g., age_gender, region, country)
	Key string `json:"key,required"`
	// Total view time in milliseconds
	Value float64 `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Key         respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByRegion) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByRegion) UnmarshalJSON

type PlatformPostMetricsInstagramPostMetricsDto

type PlatformPostMetricsInstagramPostMetricsDto struct {
	// Number of comments on the post
	Comments float64 `json:"comments"`
	// Number of new follows from this post
	Follows float64 `json:"follows"`
	// Average watch time for Reels (in milliseconds)
	IgReelsAvgWatchTime float64 `json:"ig_reels_avg_watch_time"`
	// Total watch time for Reels (in milliseconds)
	IgReelsVideoViewTotalTime float64 `json:"ig_reels_video_view_total_time"`
	// Number of likes on the post
	Likes float64 `json:"likes"`
	// Navigation actions taken on the media
	Navigation float64 `json:"navigation"`
	// Profile activity generated from this post
	ProfileActivity float64 `json:"profile_activity"`
	// Number of profile visits from this post
	ProfileVisits float64 `json:"profile_visits"`
	// Total number of unique accounts that have seen the media
	Reach float64 `json:"reach"`
	// Number of replies to the story (story media only)
	Replies float64 `json:"replies"`
	// Total number of unique accounts that have saved the media
	Saved float64 `json:"saved"`
	// Total number of shares of the media
	Shares float64 `json:"shares"`
	// Total interactions on the post
	TotalInteractions float64 `json:"total_interactions"`
	// Number of views on the post
	Views float64 `json:"views"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Comments                  respjson.Field
		Follows                   respjson.Field
		IgReelsAvgWatchTime       respjson.Field
		IgReelsVideoViewTotalTime respjson.Field
		Likes                     respjson.Field
		Navigation                respjson.Field
		ProfileActivity           respjson.Field
		ProfileVisits             respjson.Field
		Reach                     respjson.Field
		Replies                   respjson.Field
		Saved                     respjson.Field
		Shares                    respjson.Field
		TotalInteractions         respjson.Field
		Views                     respjson.Field
		ExtraFields               map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsInstagramPostMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsInstagramPostMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsInstagramPostMetricsDto) UnmarshalJSON(data []byte) error

type PlatformPostMetricsLinkedInPostMetricsDto

type PlatformPostMetricsLinkedInPostMetricsDto struct {
	// Number of clicks
	ClickCount float64 `json:"clickCount"`
	// Number of comments
	CommentCount float64 `json:"commentCount"`
	// Engagement rate
	Engagement float64 `json:"engagement"`
	// Number of impressions
	ImpressionCount float64 `json:"impressionCount"`
	// Number of likes
	LikeCount float64 `json:"likeCount"`
	// Number of shares
	ShareCount float64 `json:"shareCount"`
	// TIME_WATCHED: The time the video was watched in milliseconds. Video auto-looping
	// will continue to increase this metric for each subsequent play
	TimeWatched float64 `json:"timeWatched"`
	// TIME_WATCHED_FOR_VIDEO_VIEWS: The time watched in milliseconds for video
	// play-pause cycles that are at least 3 seconds. Video auto-looping will continue
	// to increase this metric for each subsequent play. Analytics data for this metric
	// will be available for six months
	TimeWatchedForVideoViews float64 `json:"timeWatchedForVideoViews"`
	// VIDEO_VIEW: Video views with play-pause cycles for at least 3 seconds.
	// Auto-looping videos are counted as one when loaded. Each subsequent auto-looped
	// play doesn't increase this metric. Analytics data for this metric won't be
	// available after six months
	VideoView float64 `json:"videoView"`
	// VIEWER: Unique viewers who made engaged plays on the video. Auto-looping videos
	// are counted as one when loaded. Each subsequent auto-looped play doesn't
	// increase this metric. Analytics data for this metric won't be available after
	// six months
	Viewer float64 `json:"viewer"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ClickCount               respjson.Field
		CommentCount             respjson.Field
		Engagement               respjson.Field
		ImpressionCount          respjson.Field
		LikeCount                respjson.Field
		ShareCount               respjson.Field
		TimeWatched              respjson.Field
		TimeWatchedForVideoViews respjson.Field
		VideoView                respjson.Field
		Viewer                   respjson.Field
		ExtraFields              map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsLinkedInPostMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsLinkedInPostMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsLinkedInPostMetricsDto) UnmarshalJSON(data []byte) error

type PlatformPostMetricsPinterestPostMetricsDto

type PlatformPostMetricsPinterestPostMetricsDto struct {
	// Last 90 days of Pin metrics
	Number90d PlatformPostMetricsPinterestPostMetricsDto90d `json:"90d"`
	// Lifetime Pin metrics
	LifetimeMetrics PlatformPostMetricsPinterestPostMetricsDtoLifetimeMetrics `json:"lifetime_metrics"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Number90d       respjson.Field
		LifetimeMetrics respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsPinterestPostMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsPinterestPostMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsPinterestPostMetricsDto) UnmarshalJSON(data []byte) error

type PlatformPostMetricsPinterestPostMetricsDto90d

type PlatformPostMetricsPinterestPostMetricsDto90d struct {
	// Number of comments on the Pin
	Comment float64 `json:"comment"`
	// Number of times the Pin was shown (impressions)
	Impression float64 `json:"impression"`
	// The last time Pinterest updated these metrics
	LastUpdated string `json:"last_updated"`
	// Number of clicks from the Pin to an external destination (outbound clicks)
	OutboundClick float64 `json:"outbound_click"`
	// Number of clicks on the Pin to view it in closeup (Pin clicks)
	PinClick float64 `json:"pin_click"`
	// Number of visits to the author's profile driven from the Pin
	ProfileVisit any `json:"profile_visit,nullable"`
	// Total number of reactions on the Pin
	Reaction float64 `json:"reaction"`
	// Number of saves of the Pin
	Save float64 `json:"save"`
	// Number of follows driven from the Pin
	UserFollow any `json:"user_follow,nullable"`
	// Number of video views of at least 10 seconds
	Video10sViews float64 `json:"video_10s_views"`
	// Average watch time for the video
	VideoAverageTime float64 `json:"video_average_time"`
	// Number of video views that reached 95% completion
	VideoP95Views float64 `json:"video_p95_views"`
	// Total watch time for the video
	VideoTotalTime float64 `json:"video_total_time"`
	// Number of video views
	VideoViews float64 `json:"video_views"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Comment          respjson.Field
		Impression       respjson.Field
		LastUpdated      respjson.Field
		OutboundClick    respjson.Field
		PinClick         respjson.Field
		ProfileVisit     respjson.Field
		Reaction         respjson.Field
		Save             respjson.Field
		UserFollow       respjson.Field
		Video10sViews    respjson.Field
		VideoAverageTime respjson.Field
		VideoP95Views    respjson.Field
		VideoTotalTime   respjson.Field
		VideoViews       respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Last 90 days of Pin metrics

func (PlatformPostMetricsPinterestPostMetricsDto90d) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsPinterestPostMetricsDto90d) UnmarshalJSON

func (r *PlatformPostMetricsPinterestPostMetricsDto90d) UnmarshalJSON(data []byte) error

type PlatformPostMetricsPinterestPostMetricsDtoLifetimeMetrics

type PlatformPostMetricsPinterestPostMetricsDtoLifetimeMetrics struct {
	// Number of comments on the Pin
	Comment float64 `json:"comment"`
	// Number of times the Pin was shown (impressions)
	Impression float64 `json:"impression"`
	// The last time Pinterest updated these metrics
	LastUpdated string `json:"last_updated"`
	// Number of clicks from the Pin to an external destination (outbound clicks)
	OutboundClick float64 `json:"outbound_click"`
	// Number of clicks on the Pin to view it in closeup (Pin clicks)
	PinClick float64 `json:"pin_click"`
	// Number of visits to the author's profile driven from the Pin
	ProfileVisit any `json:"profile_visit,nullable"`
	// Total number of reactions on the Pin
	Reaction float64 `json:"reaction"`
	// Number of saves of the Pin
	Save float64 `json:"save"`
	// Number of follows driven from the Pin
	UserFollow any `json:"user_follow,nullable"`
	// Number of video views of at least 10 seconds
	Video10sViews float64 `json:"video_10s_views"`
	// Average watch time for the video
	VideoAverageTime float64 `json:"video_average_time"`
	// Number of video views that reached 95% completion
	VideoP95Views float64 `json:"video_p95_views"`
	// Total watch time for the video
	VideoTotalTime float64 `json:"video_total_time"`
	// Number of video views
	VideoViews float64 `json:"video_views"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Comment          respjson.Field
		Impression       respjson.Field
		LastUpdated      respjson.Field
		OutboundClick    respjson.Field
		PinClick         respjson.Field
		ProfileVisit     respjson.Field
		Reaction         respjson.Field
		Save             respjson.Field
		UserFollow       respjson.Field
		Video10sViews    respjson.Field
		VideoAverageTime respjson.Field
		VideoP95Views    respjson.Field
		VideoTotalTime   respjson.Field
		VideoViews       respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Lifetime Pin metrics

func (PlatformPostMetricsPinterestPostMetricsDtoLifetimeMetrics) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsPinterestPostMetricsDtoLifetimeMetrics) UnmarshalJSON

type PlatformPostMetricsThreadsPostMetricsDto

type PlatformPostMetricsThreadsPostMetricsDto struct {
	// Number of likes on the post
	Likes float64 `json:"likes,required"`
	// Number of quotes of the post
	Quotes float64 `json:"quotes,required"`
	// Number of replies on the post
	Replies float64 `json:"replies,required"`
	// Number of reposts of the post
	Reposts float64 `json:"reposts,required"`
	// Number of shares of the post
	Shares float64 `json:"shares,required"`
	// Number of views on the post
	Views float64 `json:"views,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Likes       respjson.Field
		Quotes      respjson.Field
		Replies     respjson.Field
		Reposts     respjson.Field
		Shares      respjson.Field
		Views       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsThreadsPostMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsThreadsPostMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsThreadsPostMetricsDto) UnmarshalJSON(data []byte) error

type PlatformPostMetricsTikTokBusinessMetricsDto

type PlatformPostMetricsTikTokBusinessMetricsDto struct {
	// Number of address clicks
	AddressClicks float64 `json:"address_clicks,required"`
	// Number of app download clicks
	AppDownloadClicks float64 `json:"app_download_clicks,required"`
	// Audience cities breakdown
	AudienceCities []PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCity `json:"audience_cities,required"`
	// Audience countries breakdown
	AudienceCountries []PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCountry `json:"audience_countries,required"`
	// Audience genders breakdown
	AudienceGenders []PlatformPostMetricsTikTokBusinessMetricsDtoAudienceGender `json:"audience_genders,required"`
	// Audience types breakdown
	AudienceTypes []PlatformPostMetricsTikTokBusinessMetricsDtoAudienceType `json:"audience_types,required"`
	// Average time watched in seconds
	AverageTimeWatched float64 `json:"average_time_watched,required"`
	// Number of comments on the post
	Comments float64 `json:"comments,required"`
	// Number of email clicks
	EmailClicks float64 `json:"email_clicks,required"`
	// Engagement likes data by percentage and time
	EngagementLikes []PlatformPostMetricsTikTokBusinessMetricsDtoEngagementLike `json:"engagement_likes,required"`
	// Number of favorites on the post
	Favorites float64 `json:"favorites,required"`
	// Rate of full video watches as a percentage
	FullVideoWatchedRate float64 `json:"full_video_watched_rate,required"`
	// Impression sources breakdown
	ImpressionSources []PlatformPostMetricsTikTokBusinessMetricsDtoImpressionSource `json:"impression_sources,required"`
	// Number of lead submissions
	LeadSubmissions float64 `json:"lead_submissions,required"`
	// Number of likes on the post
	Likes float64 `json:"likes,required"`
	// Number of new followers gained from the post
	NewFollowers float64 `json:"new_followers,required"`
	// Number of phone number clicks
	PhoneNumberClicks float64 `json:"phone_number_clicks,required"`
	// Number of profile views generated
	ProfileViews float64 `json:"profile_views,required"`
	// Total reach of the post
	Reach float64 `json:"reach,required"`
	// Number of shares on the post
	Shares float64 `json:"shares,required"`
	// Total time watched in seconds
	TotalTimeWatched float64 `json:"total_time_watched,required"`
	// Video view retention data by percentage and time
	VideoViewRetention []PlatformPostMetricsTikTokBusinessMetricsDtoVideoViewRetention `json:"video_view_retention,required"`
	// Total number of video views
	VideoViews float64 `json:"video_views,required"`
	// Number of website clicks
	WebsiteClicks float64 `json:"website_clicks,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AddressClicks        respjson.Field
		AppDownloadClicks    respjson.Field
		AudienceCities       respjson.Field
		AudienceCountries    respjson.Field
		AudienceGenders      respjson.Field
		AudienceTypes        respjson.Field
		AverageTimeWatched   respjson.Field
		Comments             respjson.Field
		EmailClicks          respjson.Field
		EngagementLikes      respjson.Field
		Favorites            respjson.Field
		FullVideoWatchedRate respjson.Field
		ImpressionSources    respjson.Field
		LeadSubmissions      respjson.Field
		Likes                respjson.Field
		NewFollowers         respjson.Field
		PhoneNumberClicks    respjson.Field
		ProfileViews         respjson.Field
		Reach                respjson.Field
		Shares               respjson.Field
		TotalTimeWatched     respjson.Field
		VideoViewRetention   respjson.Field
		VideoViews           respjson.Field
		WebsiteClicks        respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTikTokBusinessMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTikTokBusinessMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsTikTokBusinessMetricsDto) UnmarshalJSON(data []byte) error

type PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCity

type PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCity struct {
	// City name
	CityName string `json:"city_name,required"`
	// Percentage of audience from this city
	Percentage float64 `json:"percentage,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CityName    respjson.Field
		Percentage  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCity) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCity) UnmarshalJSON

type PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCountry

type PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCountry struct {
	// Country name
	Country string `json:"country,required"`
	// Percentage of audience from this country
	Percentage float64 `json:"percentage,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		Percentage  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCountry) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCountry) UnmarshalJSON

type PlatformPostMetricsTikTokBusinessMetricsDtoAudienceGender

type PlatformPostMetricsTikTokBusinessMetricsDtoAudienceGender struct {
	// Gender category
	Gender string `json:"gender,required"`
	// Percentage of audience of this gender
	Percentage float64 `json:"percentage,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Gender      respjson.Field
		Percentage  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTikTokBusinessMetricsDtoAudienceGender) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTikTokBusinessMetricsDtoAudienceGender) UnmarshalJSON

type PlatformPostMetricsTikTokBusinessMetricsDtoAudienceType

type PlatformPostMetricsTikTokBusinessMetricsDtoAudienceType struct {
	// Percentage of audience of this type
	Percentage float64 `json:"percentage,required"`
	// Type of audience
	Type string `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Percentage  respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTikTokBusinessMetricsDtoAudienceType) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTikTokBusinessMetricsDtoAudienceType) UnmarshalJSON

type PlatformPostMetricsTikTokBusinessMetricsDtoEngagementLike

type PlatformPostMetricsTikTokBusinessMetricsDtoEngagementLike struct {
	// Percentage value for the metric
	Percentage float64 `json:"percentage,required"`
	// Time in seconds for the metric
	Second string `json:"second,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Percentage  respjson.Field
		Second      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTikTokBusinessMetricsDtoEngagementLike) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTikTokBusinessMetricsDtoEngagementLike) UnmarshalJSON

type PlatformPostMetricsTikTokBusinessMetricsDtoImpressionSource

type PlatformPostMetricsTikTokBusinessMetricsDtoImpressionSource struct {
	// Name of the impression source
	ImpressionSource string `json:"impression_source,required"`
	// Percentage of impressions from this source
	Percentage float64 `json:"percentage,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ImpressionSource respjson.Field
		Percentage       respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTikTokBusinessMetricsDtoImpressionSource) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTikTokBusinessMetricsDtoImpressionSource) UnmarshalJSON

type PlatformPostMetricsTikTokBusinessMetricsDtoVideoViewRetention

type PlatformPostMetricsTikTokBusinessMetricsDtoVideoViewRetention struct {
	// Percentage value for the metric
	Percentage float64 `json:"percentage,required"`
	// Time in seconds for the metric
	Second string `json:"second,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Percentage  respjson.Field
		Second      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTikTokBusinessMetricsDtoVideoViewRetention) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTikTokBusinessMetricsDtoVideoViewRetention) UnmarshalJSON

type PlatformPostMetricsTikTokPostMetricsDto

type PlatformPostMetricsTikTokPostMetricsDto struct {
	// Number of comments on the video
	CommentCount float64 `json:"comment_count,required"`
	// Number of likes on the video
	LikeCount float64 `json:"like_count,required"`
	// Number of shares of the video
	ShareCount float64 `json:"share_count,required"`
	// Number of views on the video
	ViewCount float64 `json:"view_count,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CommentCount respjson.Field
		LikeCount    respjson.Field
		ShareCount   respjson.Field
		ViewCount    respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTikTokPostMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTikTokPostMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsTikTokPostMetricsDto) UnmarshalJSON(data []byte) error

type PlatformPostMetricsTwitterPostMetricsDto

type PlatformPostMetricsTwitterPostMetricsDto struct {
	// Non-public metrics for the Tweet (available to the Tweet owner or advertisers)
	NonPublicMetrics PlatformPostMetricsTwitterPostMetricsDtoNonPublicMetrics `json:"non_public_metrics"`
	// Organic metrics for the Tweet (available to the Tweet owner)
	OrganicMetrics PlatformPostMetricsTwitterPostMetricsDtoOrganicMetrics `json:"organic_metrics"`
	// Publicly available metrics for the Tweet
	PublicMetrics PlatformPostMetricsTwitterPostMetricsDtoPublicMetrics `json:"public_metrics"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		NonPublicMetrics respjson.Field
		OrganicMetrics   respjson.Field
		PublicMetrics    respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsTwitterPostMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTwitterPostMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsTwitterPostMetricsDto) UnmarshalJSON(data []byte) error

type PlatformPostMetricsTwitterPostMetricsDtoNonPublicMetrics

type PlatformPostMetricsTwitterPostMetricsDtoNonPublicMetrics struct {
	// Number of times this Tweet has been viewed via promoted distribution
	ImpressionCount float64 `json:"impression_count,required"`
	// Number of clicks on links in this Tweet via promoted distribution
	URLLinkClicks float64 `json:"url_link_clicks,required"`
	// Number of clicks on the author's profile via promoted distribution
	UserProfileClicks float64 `json:"user_profile_clicks,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ImpressionCount   respjson.Field
		URLLinkClicks     respjson.Field
		UserProfileClicks respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Non-public metrics for the Tweet (available to the Tweet owner or advertisers)

func (PlatformPostMetricsTwitterPostMetricsDtoNonPublicMetrics) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTwitterPostMetricsDtoNonPublicMetrics) UnmarshalJSON

type PlatformPostMetricsTwitterPostMetricsDtoOrganicMetrics

type PlatformPostMetricsTwitterPostMetricsDtoOrganicMetrics struct {
	// Number of times this Tweet has been viewed organically
	ImpressionCount float64 `json:"impression_count,required"`
	// Number of Likes of this Tweet from organic distribution
	LikeCount float64 `json:"like_count,required"`
	// Number of Replies of this Tweet from organic distribution
	ReplyCount float64 `json:"reply_count,required"`
	// Number of Retweets of this Tweet from organic distribution
	RetweetCount float64 `json:"retweet_count,required"`
	// Number of clicks on links in this Tweet from organic distribution
	URLLinkClicks float64 `json:"url_link_clicks,required"`
	// Number of clicks on the author's profile from organic distribution
	UserProfileClicks float64 `json:"user_profile_clicks,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ImpressionCount   respjson.Field
		LikeCount         respjson.Field
		ReplyCount        respjson.Field
		RetweetCount      respjson.Field
		URLLinkClicks     respjson.Field
		UserProfileClicks respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Organic metrics for the Tweet (available to the Tweet owner)

func (PlatformPostMetricsTwitterPostMetricsDtoOrganicMetrics) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTwitterPostMetricsDtoOrganicMetrics) UnmarshalJSON

type PlatformPostMetricsTwitterPostMetricsDtoPublicMetrics

type PlatformPostMetricsTwitterPostMetricsDtoPublicMetrics struct {
	// Number of times this Tweet has been bookmarked
	BookmarkCount float64 `json:"bookmark_count,required"`
	// Number of times this Tweet has been viewed
	ImpressionCount float64 `json:"impression_count,required"`
	// Number of Likes of this Tweet
	LikeCount float64 `json:"like_count,required"`
	// Number of Quotes of this Tweet
	QuoteCount float64 `json:"quote_count,required"`
	// Number of Replies of this Tweet
	ReplyCount float64 `json:"reply_count,required"`
	// Number of Retweets of this Tweet
	RetweetCount float64 `json:"retweet_count,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BookmarkCount   respjson.Field
		ImpressionCount respjson.Field
		LikeCount       respjson.Field
		QuoteCount      respjson.Field
		ReplyCount      respjson.Field
		RetweetCount    respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Publicly available metrics for the Tweet

func (PlatformPostMetricsTwitterPostMetricsDtoPublicMetrics) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsTwitterPostMetricsDtoPublicMetrics) UnmarshalJSON

type PlatformPostMetricsUnion

type PlatformPostMetricsUnion struct {
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	AddressClicks float64 `json:"address_clicks"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	AppDownloadClicks float64 `json:"app_download_clicks"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	AudienceCities []PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCity `json:"audience_cities"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	AudienceCountries []PlatformPostMetricsTikTokBusinessMetricsDtoAudienceCountry `json:"audience_countries"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	AudienceGenders []PlatformPostMetricsTikTokBusinessMetricsDtoAudienceGender `json:"audience_genders"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	AudienceTypes []PlatformPostMetricsTikTokBusinessMetricsDtoAudienceType `json:"audience_types"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	AverageTimeWatched float64 `json:"average_time_watched"`
	Comments           float64 `json:"comments"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	EmailClicks float64 `json:"email_clicks"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	EngagementLikes []PlatformPostMetricsTikTokBusinessMetricsDtoEngagementLike `json:"engagement_likes"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	Favorites float64 `json:"favorites"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	FullVideoWatchedRate float64 `json:"full_video_watched_rate"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	ImpressionSources []PlatformPostMetricsTikTokBusinessMetricsDtoImpressionSource `json:"impression_sources"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	LeadSubmissions float64 `json:"lead_submissions"`
	Likes           float64 `json:"likes"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	NewFollowers float64 `json:"new_followers"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	PhoneNumberClicks float64 `json:"phone_number_clicks"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	ProfileViews float64 `json:"profile_views"`
	Reach        float64 `json:"reach"`
	Shares       float64 `json:"shares"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	TotalTimeWatched float64 `json:"total_time_watched"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	VideoViewRetention []PlatformPostMetricsTikTokBusinessMetricsDtoVideoViewRetention `json:"video_view_retention"`
	VideoViews         float64                                                         `json:"video_views"`
	// This field is from variant [PlatformPostMetricsTikTokBusinessMetricsDto].
	WebsiteClicks float64 `json:"website_clicks"`
	CommentCount  float64 `json:"comment_count"`
	LikeCount     float64 `json:"like_count"`
	ShareCount    float64 `json:"share_count"`
	// This field is from variant [PlatformPostMetricsTikTokPostMetricsDto].
	ViewCount float64 `json:"view_count"`
	// This field is from variant [PlatformPostMetricsInstagramPostMetricsDto].
	Follows float64 `json:"follows"`
	// This field is from variant [PlatformPostMetricsInstagramPostMetricsDto].
	IgReelsAvgWatchTime float64 `json:"ig_reels_avg_watch_time"`
	// This field is from variant [PlatformPostMetricsInstagramPostMetricsDto].
	IgReelsVideoViewTotalTime float64 `json:"ig_reels_video_view_total_time"`
	// This field is from variant [PlatformPostMetricsInstagramPostMetricsDto].
	Navigation float64 `json:"navigation"`
	// This field is from variant [PlatformPostMetricsInstagramPostMetricsDto].
	ProfileActivity float64 `json:"profile_activity"`
	// This field is from variant [PlatformPostMetricsInstagramPostMetricsDto].
	ProfileVisits float64 `json:"profile_visits"`
	Replies       float64 `json:"replies"`
	// This field is from variant [PlatformPostMetricsInstagramPostMetricsDto].
	Saved float64 `json:"saved"`
	// This field is from variant [PlatformPostMetricsInstagramPostMetricsDto].
	TotalInteractions float64 `json:"total_interactions"`
	Views             float64 `json:"views"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	Dislikes float64 `json:"dislikes"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	AnnotationClickableImpressions float64 `json:"annotationClickableImpressions"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	AnnotationClicks float64 `json:"annotationClicks"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	AnnotationClickThroughRate float64 `json:"annotationClickThroughRate"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	AnnotationClosableImpressions float64 `json:"annotationClosableImpressions"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	AnnotationCloseRate float64 `json:"annotationCloseRate"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	AnnotationCloses float64 `json:"annotationCloses"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	AnnotationImpressions float64 `json:"annotationImpressions"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	AverageViewDuration float64 `json:"averageViewDuration"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	AverageViewPercentage float64 `json:"averageViewPercentage"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	CardClickRate float64 `json:"cardClickRate"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	CardClicks float64 `json:"cardClicks"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	CardImpressions float64 `json:"cardImpressions"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	CardTeaserClickRate float64 `json:"cardTeaserClickRate"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	CardTeaserClicks float64 `json:"cardTeaserClicks"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	CardTeaserImpressions float64 `json:"cardTeaserImpressions"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	EngagedViews float64 `json:"engagedViews"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	EstimatedMinutesWatched float64 `json:"estimatedMinutesWatched"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	EstimatedRedMinutesWatched float64 `json:"estimatedRedMinutesWatched"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	RedViews float64 `json:"redViews"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	SubscribersGained float64 `json:"subscribersGained"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	SubscribersLost float64 `json:"subscribersLost"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	VideosAddedToPlaylists float64 `json:"videosAddedToPlaylists"`
	// This field is from variant [PlatformPostMetricsYouTubePostMetricsDto].
	VideosRemovedFromPlaylists float64 `json:"videosRemovedFromPlaylists"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ActivityByActionType []PlatformPostMetricsFacebookPostMetricsDtoActivityByActionType `json:"activity_by_action_type"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ActivityByActionTypeUnique []PlatformPostMetricsFacebookPostMetricsDtoActivityByActionTypeUnique `json:"activity_by_action_type_unique"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	FanReach float64 `json:"fan_reach"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	MediaViews float64 `json:"media_views"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	NonviralReach float64 `json:"nonviral_reach"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	OrganicReach float64 `json:"organic_reach"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	PaidReach float64 `json:"paid_reach"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ReactionsAnger float64 `json:"reactions_anger"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ReactionsByType any `json:"reactions_by_type"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ReactionsHaha float64 `json:"reactions_haha"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ReactionsLike float64 `json:"reactions_like"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ReactionsLove float64 `json:"reactions_love"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ReactionsSorry float64 `json:"reactions_sorry"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ReactionsTotal float64 `json:"reactions_total"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ReactionsWow float64 `json:"reactions_wow"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoAvgTimeWatched float64 `json:"video_avg_time_watched"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoCompleteViewsOrganic float64 `json:"video_complete_views_organic"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoCompleteViewsOrganicUnique float64 `json:"video_complete_views_organic_unique"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoCompleteViewsPaid float64 `json:"video_complete_views_paid"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoCompleteViewsPaidUnique float64 `json:"video_complete_views_paid_unique"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoLength float64 `json:"video_length"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoRetentionGraphAutoplayed []PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphAutoplayed `json:"video_retention_graph_autoplayed"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoRetentionGraphClickedToPlay []PlatformPostMetricsFacebookPostMetricsDtoVideoRetentionGraphClickedToPlay `json:"video_retention_graph_clicked_to_play"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoSocialActionsUnique float64 `json:"video_social_actions_unique"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewTime float64 `json:"video_view_time"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewTimeByAgeGender []PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByAgeGender `json:"video_view_time_by_age_gender"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewTimeByCountry []PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByCountry `json:"video_view_time_by_country"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewTimeByDistributionType any `json:"video_view_time_by_distribution_type"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewTimeByRegion []PlatformPostMetricsFacebookPostMetricsDtoVideoViewTimeByRegion `json:"video_view_time_by_region"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewTimeOrganic float64 `json:"video_view_time_organic"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViews15s float64 `json:"video_views_15s"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViews60s float64 `json:"video_views_60s"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewsAutoplayed float64 `json:"video_views_autoplayed"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewsByDistributionType any `json:"video_views_by_distribution_type"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewsClickedToPlay float64 `json:"video_views_clicked_to_play"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewsOrganic float64 `json:"video_views_organic"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewsOrganicUnique float64 `json:"video_views_organic_unique"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewsPaid float64 `json:"video_views_paid"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewsPaidUnique float64 `json:"video_views_paid_unique"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewsSoundOn float64 `json:"video_views_sound_on"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	VideoViewsUnique float64 `json:"video_views_unique"`
	// This field is from variant [PlatformPostMetricsFacebookPostMetricsDto].
	ViralReach float64 `json:"viral_reach"`
	// This field is from variant [PlatformPostMetricsTwitterPostMetricsDto].
	NonPublicMetrics PlatformPostMetricsTwitterPostMetricsDtoNonPublicMetrics `json:"non_public_metrics"`
	// This field is from variant [PlatformPostMetricsTwitterPostMetricsDto].
	OrganicMetrics PlatformPostMetricsTwitterPostMetricsDtoOrganicMetrics `json:"organic_metrics"`
	// This field is from variant [PlatformPostMetricsTwitterPostMetricsDto].
	PublicMetrics PlatformPostMetricsTwitterPostMetricsDtoPublicMetrics `json:"public_metrics"`
	// This field is from variant [PlatformPostMetricsThreadsPostMetricsDto].
	Quotes float64 `json:"quotes"`
	// This field is from variant [PlatformPostMetricsThreadsPostMetricsDto].
	Reposts float64 `json:"reposts"`
	// This field is from variant [PlatformPostMetricsLinkedInPostMetricsDto].
	ClickCount float64 `json:"clickCount"`
	// This field is from variant [PlatformPostMetricsLinkedInPostMetricsDto].
	Engagement float64 `json:"engagement"`
	// This field is from variant [PlatformPostMetricsLinkedInPostMetricsDto].
	ImpressionCount float64 `json:"impressionCount"`
	// This field is from variant [PlatformPostMetricsLinkedInPostMetricsDto].
	TimeWatched float64 `json:"timeWatched"`
	// This field is from variant [PlatformPostMetricsLinkedInPostMetricsDto].
	TimeWatchedForVideoViews float64 `json:"timeWatchedForVideoViews"`
	// This field is from variant [PlatformPostMetricsLinkedInPostMetricsDto].
	VideoView float64 `json:"videoView"`
	// This field is from variant [PlatformPostMetricsLinkedInPostMetricsDto].
	Viewer float64 `json:"viewer"`
	// This field is from variant [PlatformPostMetricsBlueskyPostMetricsDto].
	QuoteCount float64 `json:"quoteCount"`
	// This field is from variant [PlatformPostMetricsBlueskyPostMetricsDto].
	ReplyCount float64 `json:"replyCount"`
	// This field is from variant [PlatformPostMetricsBlueskyPostMetricsDto].
	RepostCount float64 `json:"repostCount"`
	// This field is from variant [PlatformPostMetricsPinterestPostMetricsDto].
	Number90d PlatformPostMetricsPinterestPostMetricsDto90d `json:"90d"`
	// This field is from variant [PlatformPostMetricsPinterestPostMetricsDto].
	LifetimeMetrics PlatformPostMetricsPinterestPostMetricsDtoLifetimeMetrics `json:"lifetime_metrics"`
	JSON            struct {
		AddressClicks                    respjson.Field
		AppDownloadClicks                respjson.Field
		AudienceCities                   respjson.Field
		AudienceCountries                respjson.Field
		AudienceGenders                  respjson.Field
		AudienceTypes                    respjson.Field
		AverageTimeWatched               respjson.Field
		Comments                         respjson.Field
		EmailClicks                      respjson.Field
		EngagementLikes                  respjson.Field
		Favorites                        respjson.Field
		FullVideoWatchedRate             respjson.Field
		ImpressionSources                respjson.Field
		LeadSubmissions                  respjson.Field
		Likes                            respjson.Field
		NewFollowers                     respjson.Field
		PhoneNumberClicks                respjson.Field
		ProfileViews                     respjson.Field
		Reach                            respjson.Field
		Shares                           respjson.Field
		TotalTimeWatched                 respjson.Field
		VideoViewRetention               respjson.Field
		VideoViews                       respjson.Field
		WebsiteClicks                    respjson.Field
		CommentCount                     respjson.Field
		LikeCount                        respjson.Field
		ShareCount                       respjson.Field
		ViewCount                        respjson.Field
		Follows                          respjson.Field
		IgReelsAvgWatchTime              respjson.Field
		IgReelsVideoViewTotalTime        respjson.Field
		Navigation                       respjson.Field
		ProfileActivity                  respjson.Field
		ProfileVisits                    respjson.Field
		Replies                          respjson.Field
		Saved                            respjson.Field
		TotalInteractions                respjson.Field
		Views                            respjson.Field
		Dislikes                         respjson.Field
		AnnotationClickableImpressions   respjson.Field
		AnnotationClicks                 respjson.Field
		AnnotationClickThroughRate       respjson.Field
		AnnotationClosableImpressions    respjson.Field
		AnnotationCloseRate              respjson.Field
		AnnotationCloses                 respjson.Field
		AnnotationImpressions            respjson.Field
		AverageViewDuration              respjson.Field
		AverageViewPercentage            respjson.Field
		CardClickRate                    respjson.Field
		CardClicks                       respjson.Field
		CardImpressions                  respjson.Field
		CardTeaserClickRate              respjson.Field
		CardTeaserClicks                 respjson.Field
		CardTeaserImpressions            respjson.Field
		EngagedViews                     respjson.Field
		EstimatedMinutesWatched          respjson.Field
		EstimatedRedMinutesWatched       respjson.Field
		RedViews                         respjson.Field
		SubscribersGained                respjson.Field
		SubscribersLost                  respjson.Field
		VideosAddedToPlaylists           respjson.Field
		VideosRemovedFromPlaylists       respjson.Field
		ActivityByActionType             respjson.Field
		ActivityByActionTypeUnique       respjson.Field
		FanReach                         respjson.Field
		MediaViews                       respjson.Field
		NonviralReach                    respjson.Field
		OrganicReach                     respjson.Field
		PaidReach                        respjson.Field
		ReactionsAnger                   respjson.Field
		ReactionsByType                  respjson.Field
		ReactionsHaha                    respjson.Field
		ReactionsLike                    respjson.Field
		ReactionsLove                    respjson.Field
		ReactionsSorry                   respjson.Field
		ReactionsTotal                   respjson.Field
		ReactionsWow                     respjson.Field
		VideoAvgTimeWatched              respjson.Field
		VideoCompleteViewsOrganic        respjson.Field
		VideoCompleteViewsOrganicUnique  respjson.Field
		VideoCompleteViewsPaid           respjson.Field
		VideoCompleteViewsPaidUnique     respjson.Field
		VideoLength                      respjson.Field
		VideoRetentionGraphAutoplayed    respjson.Field
		VideoRetentionGraphClickedToPlay respjson.Field
		VideoSocialActionsUnique         respjson.Field
		VideoViewTime                    respjson.Field
		VideoViewTimeByAgeGender         respjson.Field
		VideoViewTimeByCountry           respjson.Field
		VideoViewTimeByDistributionType  respjson.Field
		VideoViewTimeByRegion            respjson.Field
		VideoViewTimeOrganic             respjson.Field
		VideoViews15s                    respjson.Field
		VideoViews60s                    respjson.Field
		VideoViewsAutoplayed             respjson.Field
		VideoViewsByDistributionType     respjson.Field
		VideoViewsClickedToPlay          respjson.Field
		VideoViewsOrganic                respjson.Field
		VideoViewsOrganicUnique          respjson.Field
		VideoViewsPaid                   respjson.Field
		VideoViewsPaidUnique             respjson.Field
		VideoViewsSoundOn                respjson.Field
		VideoViewsUnique                 respjson.Field
		ViralReach                       respjson.Field
		NonPublicMetrics                 respjson.Field
		OrganicMetrics                   respjson.Field
		PublicMetrics                    respjson.Field
		Quotes                           respjson.Field
		Reposts                          respjson.Field
		ClickCount                       respjson.Field
		Engagement                       respjson.Field
		ImpressionCount                  respjson.Field
		TimeWatched                      respjson.Field
		TimeWatchedForVideoViews         respjson.Field
		VideoView                        respjson.Field
		Viewer                           respjson.Field
		QuoteCount                       respjson.Field
		ReplyCount                       respjson.Field
		RepostCount                      respjson.Field
		Number90d                        respjson.Field
		LifetimeMetrics                  respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

PlatformPostMetricsUnion contains all possible properties and values from PlatformPostMetricsTikTokBusinessMetricsDto, PlatformPostMetricsTikTokPostMetricsDto, PlatformPostMetricsInstagramPostMetricsDto, PlatformPostMetricsYouTubePostMetricsDto, PlatformPostMetricsFacebookPostMetricsDto, PlatformPostMetricsTwitterPostMetricsDto, PlatformPostMetricsThreadsPostMetricsDto, PlatformPostMetricsLinkedInPostMetricsDto, PlatformPostMetricsBlueskyPostMetricsDto, PlatformPostMetricsPinterestPostMetricsDto.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (PlatformPostMetricsUnion) AsPlatformPostMetricsBlueskyPostMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsBlueskyPostMetricsDto() (v PlatformPostMetricsBlueskyPostMetricsDto)

func (PlatformPostMetricsUnion) AsPlatformPostMetricsFacebookPostMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsFacebookPostMetricsDto() (v PlatformPostMetricsFacebookPostMetricsDto)

func (PlatformPostMetricsUnion) AsPlatformPostMetricsInstagramPostMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsInstagramPostMetricsDto() (v PlatformPostMetricsInstagramPostMetricsDto)

func (PlatformPostMetricsUnion) AsPlatformPostMetricsLinkedInPostMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsLinkedInPostMetricsDto() (v PlatformPostMetricsLinkedInPostMetricsDto)

func (PlatformPostMetricsUnion) AsPlatformPostMetricsPinterestPostMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsPinterestPostMetricsDto() (v PlatformPostMetricsPinterestPostMetricsDto)

func (PlatformPostMetricsUnion) AsPlatformPostMetricsThreadsPostMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsThreadsPostMetricsDto() (v PlatformPostMetricsThreadsPostMetricsDto)

func (PlatformPostMetricsUnion) AsPlatformPostMetricsTikTokBusinessMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsTikTokBusinessMetricsDto() (v PlatformPostMetricsTikTokBusinessMetricsDto)

func (PlatformPostMetricsUnion) AsPlatformPostMetricsTikTokPostMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsTikTokPostMetricsDto() (v PlatformPostMetricsTikTokPostMetricsDto)

func (PlatformPostMetricsUnion) AsPlatformPostMetricsTwitterPostMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsTwitterPostMetricsDto() (v PlatformPostMetricsTwitterPostMetricsDto)

func (PlatformPostMetricsUnion) AsPlatformPostMetricsYouTubePostMetricsDto

func (u PlatformPostMetricsUnion) AsPlatformPostMetricsYouTubePostMetricsDto() (v PlatformPostMetricsYouTubePostMetricsDto)

func (PlatformPostMetricsUnion) RawJSON

func (u PlatformPostMetricsUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsUnion) UnmarshalJSON

func (r *PlatformPostMetricsUnion) UnmarshalJSON(data []byte) error

type PlatformPostMetricsYouTubePostMetricsDto

type PlatformPostMetricsYouTubePostMetricsDto struct {
	// Number of comments on the video
	Comments float64 `json:"comments,required"`
	// Number of dislikes on the video
	Dislikes float64 `json:"dislikes,required"`
	// Number of likes on the video
	Likes float64 `json:"likes,required"`
	// Number of views on the video
	Views float64 `json:"views,required"`
	// Number of clickable annotation impressions
	AnnotationClickableImpressions float64 `json:"annotationClickableImpressions"`
	// Number of annotation clicks
	AnnotationClicks float64 `json:"annotationClicks"`
	// Annotation click-through rate
	AnnotationClickThroughRate float64 `json:"annotationClickThroughRate"`
	// Number of closable annotation impressions
	AnnotationClosableImpressions float64 `json:"annotationClosableImpressions"`
	// Annotation close rate
	AnnotationCloseRate float64 `json:"annotationCloseRate"`
	// Number of annotation closes
	AnnotationCloses float64 `json:"annotationCloses"`
	// Number of annotation impressions
	AnnotationImpressions float64 `json:"annotationImpressions"`
	// Average view duration in seconds
	AverageViewDuration float64 `json:"averageViewDuration"`
	// Average percentage of the video watched
	AverageViewPercentage float64 `json:"averageViewPercentage"`
	// Card click-through rate
	CardClickRate float64 `json:"cardClickRate"`
	// Number of card clicks
	CardClicks float64 `json:"cardClicks"`
	// Number of card impressions
	CardImpressions float64 `json:"cardImpressions"`
	// Card teaser click-through rate
	CardTeaserClickRate float64 `json:"cardTeaserClickRate"`
	// Number of card teaser clicks
	CardTeaserClicks float64 `json:"cardTeaserClicks"`
	// Number of card teaser impressions
	CardTeaserImpressions float64 `json:"cardTeaserImpressions"`
	// Number of engaged views
	EngagedViews float64 `json:"engagedViews"`
	// Estimated minutes watched
	EstimatedMinutesWatched float64 `json:"estimatedMinutesWatched"`
	// Estimated minutes watched by YouTube Premium (Red) members
	EstimatedRedMinutesWatched float64 `json:"estimatedRedMinutesWatched"`
	// Number of views from YouTube Premium (Red) members
	RedViews float64 `json:"redViews"`
	// Number of shares
	Shares float64 `json:"shares"`
	// Subscribers gained
	SubscribersGained float64 `json:"subscribersGained"`
	// Subscribers lost
	SubscribersLost float64 `json:"subscribersLost"`
	// Number of times the video was added to playlists
	VideosAddedToPlaylists float64 `json:"videosAddedToPlaylists"`
	// Number of times the video was removed from playlists
	VideosRemovedFromPlaylists float64 `json:"videosRemovedFromPlaylists"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Comments                       respjson.Field
		Dislikes                       respjson.Field
		Likes                          respjson.Field
		Views                          respjson.Field
		AnnotationClickableImpressions respjson.Field
		AnnotationClicks               respjson.Field
		AnnotationClickThroughRate     respjson.Field
		AnnotationClosableImpressions  respjson.Field
		AnnotationCloseRate            respjson.Field
		AnnotationCloses               respjson.Field
		AnnotationImpressions          respjson.Field
		AverageViewDuration            respjson.Field
		AverageViewPercentage          respjson.Field
		CardClickRate                  respjson.Field
		CardClicks                     respjson.Field
		CardImpressions                respjson.Field
		CardTeaserClickRate            respjson.Field
		CardTeaserClicks               respjson.Field
		CardTeaserImpressions          respjson.Field
		EngagedViews                   respjson.Field
		EstimatedMinutesWatched        respjson.Field
		EstimatedRedMinutesWatched     respjson.Field
		RedViews                       respjson.Field
		Shares                         respjson.Field
		SubscribersGained              respjson.Field
		SubscribersLost                respjson.Field
		VideosAddedToPlaylists         respjson.Field
		VideosRemovedFromPlaylists     respjson.Field
		ExtraFields                    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlatformPostMetricsYouTubePostMetricsDto) RawJSON

Returns the unmodified JSON received from the API

func (*PlatformPostMetricsYouTubePostMetricsDto) UnmarshalJSON

func (r *PlatformPostMetricsYouTubePostMetricsDto) UnmarshalJSON(data []byte) error

type SocialAccount

type SocialAccount struct {
	// The unique identifier of the social account
	ID string `json:"id,required"`
	// The access token of the social account
	AccessToken string `json:"access_token,required"`
	// The access token expiration date of the social account
	AccessTokenExpiresAt time.Time `json:"access_token_expires_at,required" format:"date-time"`
	// The external id of the social account
	ExternalID string `json:"external_id,required"`
	// The metadata of the social account
	Metadata any `json:"metadata,required"`
	// The platform of the social account
	Platform string `json:"platform,required"`
	// The platform's profile photo of the social account
	ProfilePhotoURL string `json:"profile_photo_url,required"`
	// The refresh token of the social account
	RefreshToken string `json:"refresh_token,required"`
	// The refresh token expiration date of the social account
	RefreshTokenExpiresAt time.Time `json:"refresh_token_expires_at,required" format:"date-time"`
	// Status of the account
	//
	// Any of "connected", "disconnected".
	Status SocialAccountStatus `json:"status,required"`
	// The platform's id of the social account
	UserID string `json:"user_id,required"`
	// The platform's username of the social account
	Username string `json:"username,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                    respjson.Field
		AccessToken           respjson.Field
		AccessTokenExpiresAt  respjson.Field
		ExternalID            respjson.Field
		Metadata              respjson.Field
		Platform              respjson.Field
		ProfilePhotoURL       respjson.Field
		RefreshToken          respjson.Field
		RefreshTokenExpiresAt respjson.Field
		Status                respjson.Field
		UserID                respjson.Field
		Username              respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialAccount) RawJSON

func (r SocialAccount) RawJSON() string

Returns the unmodified JSON received from the API

func (*SocialAccount) UnmarshalJSON

func (r *SocialAccount) UnmarshalJSON(data []byte) error

type SocialAccountDisconnectResponse

type SocialAccountDisconnectResponse struct {
	// The unique identifier of the social account
	ID string `json:"id,required"`
	// The access token of the social account
	AccessToken string `json:"access_token,required"`
	// The access token expiration date of the social account
	AccessTokenExpiresAt time.Time `json:"access_token_expires_at,required" format:"date-time"`
	// The external id of the social account
	ExternalID string `json:"external_id,required"`
	// The metadata of the social account
	Metadata any `json:"metadata,required"`
	// The platform of the social account
	Platform string `json:"platform,required"`
	// The platform's profile photo of the social account
	ProfilePhotoURL string `json:"profile_photo_url,required"`
	// The refresh token of the social account
	RefreshToken string `json:"refresh_token,required"`
	// The refresh token expiration date of the social account
	RefreshTokenExpiresAt time.Time `json:"refresh_token_expires_at,required" format:"date-time"`
	// Status of the account
	//
	// Any of "disconnected".
	Status SocialAccountDisconnectResponseStatus `json:"status,required"`
	// The platform's id of the social account
	UserID string `json:"user_id,required"`
	// The platform's username of the social account
	Username string `json:"username,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                    respjson.Field
		AccessToken           respjson.Field
		AccessTokenExpiresAt  respjson.Field
		ExternalID            respjson.Field
		Metadata              respjson.Field
		Platform              respjson.Field
		ProfilePhotoURL       respjson.Field
		RefreshToken          respjson.Field
		RefreshTokenExpiresAt respjson.Field
		Status                respjson.Field
		UserID                respjson.Field
		Username              respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialAccountDisconnectResponse) RawJSON

Returns the unmodified JSON received from the API

func (*SocialAccountDisconnectResponse) UnmarshalJSON

func (r *SocialAccountDisconnectResponse) UnmarshalJSON(data []byte) error

type SocialAccountDisconnectResponseStatus

type SocialAccountDisconnectResponseStatus string

Status of the account

const (
	SocialAccountDisconnectResponseStatusDisconnected SocialAccountDisconnectResponseStatus = "disconnected"
)

type SocialAccountFeedListParams

type SocialAccountFeedListParams struct {
	// Cursor identifying next page of results
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Number of items to return; Note: some platforms will have different max limits,
	// in the case the provided limit is over the platform's limit we will return the
	// max allowed by the platform.
	Limit param.Opt[float64] `query:"limit,omitzero" json:"-"`
	// Expand additional data in the response. Currently supports: "metrics" to include
	// post analytics data.
	//
	// Any of "metrics".
	Expand []string `query:"expand,omitzero" json:"-"`
	// Filter by Post for Me Social Postexternal ID. Multiple values imply OR logic
	// (e.g., ?external_post_id=xxxxxx&external_post_id=yyyyyy).
	ExternalPostID []string `query:"external_post_id,omitzero" json:"-"`
	// Filter by the platform's id(s). Multiple values imply OR logic (e.g.,
	// ?social_post_id=spr_xxxxxx&social_post_id=spr_yyyyyy).
	PlatformPostID []string `query:"platform_post_id,omitzero" json:"-"`
	// Filter by Post for Me Social Post id(s). Multiple values imply OR logic (e.g.,
	// ?social_post_id=sp_xxxxxx&social_post_id=sp_yyyyyy).
	SocialPostID []string `query:"social_post_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SocialAccountFeedListParams) URLQuery

func (r SocialAccountFeedListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SocialAccountFeedListParams's query parameters as `url.Values`.

type SocialAccountFeedListResponse

type SocialAccountFeedListResponse struct {
	Data []PlatformPost                    `json:"data,required"`
	Meta SocialAccountFeedListResponseMeta `json:"meta,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Meta        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialAccountFeedListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*SocialAccountFeedListResponse) UnmarshalJSON

func (r *SocialAccountFeedListResponse) UnmarshalJSON(data []byte) error

type SocialAccountFeedListResponseMeta

type SocialAccountFeedListResponseMeta struct {
	// Id representing the next page of items
	Cursor string `json:"cursor,required"`
	// Maximum number of items returned.
	Limit float64 `json:"limit,required"`
	// URL to the next page of results, or null if none.
	Next string `json:"next,required"`
	// Indicates if there are more results or not
	HasMore bool `json:"has_more"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cursor      respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		HasMore     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialAccountFeedListResponseMeta) RawJSON

Returns the unmodified JSON received from the API

func (*SocialAccountFeedListResponseMeta) UnmarshalJSON

func (r *SocialAccountFeedListResponseMeta) UnmarshalJSON(data []byte) error

type SocialAccountFeedService

type SocialAccountFeedService struct {
	Options []option.RequestOption
}

SocialAccountFeedService contains methods and other services that help with interacting with the post-for-me 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 NewSocialAccountFeedService method instead.

func NewSocialAccountFeedService

func NewSocialAccountFeedService(opts ...option.RequestOption) (r SocialAccountFeedService)

NewSocialAccountFeedService 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 (*SocialAccountFeedService) List

Get a paginated result for the social account based on the applied filters

type SocialAccountListParams

type SocialAccountListParams struct {
	// Number of items to return
	Limit param.Opt[float64] `query:"limit,omitzero" json:"-"`
	// Number of items to skip
	Offset param.Opt[float64] `query:"offset,omitzero" json:"-"`
	// Filter by id(s). Multiple values imply OR logic (e.g.,
	// ?id=spc_xxxxxx&id=spc_yyyyyy).
	ID []string `query:"id,omitzero" json:"-"`
	// Filter by externalId(s). Multiple values imply OR logic (e.g.,
	// ?externalId=test&externalId=test2).
	ExternalID []string `query:"external_id,omitzero" json:"-"`
	// Filter by platform(s). Multiple values imply OR logic (e.g.,
	// ?platform=x&platform=facebook).
	Platform []string `query:"platform,omitzero" json:"-"`
	// Filter by username(s). Multiple values imply OR logic (e.g.,
	// ?username=test&username=test2).
	Username []string `query:"username,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SocialAccountListParams) URLQuery

func (r SocialAccountListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SocialAccountListParams's query parameters as `url.Values`.

type SocialAccountListResponse

type SocialAccountListResponse struct {
	Data []SocialAccount               `json:"data,required"`
	Meta SocialAccountListResponseMeta `json:"meta,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Meta        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialAccountListResponse) RawJSON

func (r SocialAccountListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SocialAccountListResponse) UnmarshalJSON

func (r *SocialAccountListResponse) UnmarshalJSON(data []byte) error

type SocialAccountListResponseMeta

type SocialAccountListResponseMeta struct {
	// Maximum number of items returned.
	Limit float64 `json:"limit,required"`
	// URL to the next page of results, or null if none.
	Next string `json:"next,required"`
	// Number of items skipped.
	Offset float64 `json:"offset,required"`
	// Total number of items available.
	Total float64 `json:"total,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Total       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialAccountListResponseMeta) RawJSON

Returns the unmodified JSON received from the API

func (*SocialAccountListResponseMeta) UnmarshalJSON

func (r *SocialAccountListResponseMeta) UnmarshalJSON(data []byte) error

type SocialAccountNewAuthURLParams

type SocialAccountNewAuthURLParams struct {
	// The social account provider
	Platform string `json:"platform,required"`
	// Your unique identifier for the social account
	ExternalID param.Opt[string] `json:"external_id,omitzero"`
	// Override the default redirect URL for the OAuth flow. If provided, this URL will
	// be used instead of our redirect URL. Make sure this URL is included in your
	// app's authorized redirect urls. This override will not work when using our
	// system credientals.
	RedirectURLOverride param.Opt[string] `json:"redirect_url_override,omitzero"`
	// List of permissions you want to allow. Will default to only post permissions.
	// You must include the "feeds" permission to request an account feed and metrics
	//
	// Any of "posts", "feeds".
	Permissions []string `json:"permissions,omitzero"`
	// Additional data needed for the provider
	PlatformData SocialAccountNewAuthURLParamsPlatformData `json:"platform_data,omitzero"`
	// contains filtered or unexported fields
}

func (SocialAccountNewAuthURLParams) MarshalJSON

func (r SocialAccountNewAuthURLParams) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParams) UnmarshalJSON

func (r *SocialAccountNewAuthURLParams) UnmarshalJSON(data []byte) error

type SocialAccountNewAuthURLParamsPlatformData

type SocialAccountNewAuthURLParamsPlatformData struct {
	// Additional data needed for connecting bluesky accounts
	Bluesky SocialAccountNewAuthURLParamsPlatformDataBluesky `json:"bluesky,omitzero"`
	// Additional data for connecting facebook accounts
	Facebook SocialAccountNewAuthURLParamsPlatformDataFacebook `json:"facebook,omitzero"`
	// Additional data for connecting instagram accounts
	Instagram SocialAccountNewAuthURLParamsPlatformDataInstagram `json:"instagram,omitzero"`
	// Additional data for connecting linkedin accounts
	Linkedin SocialAccountNewAuthURLParamsPlatformDataLinkedin `json:"linkedin,omitzero"`
	// Additional data for connecting Pinterest accounts
	Pinterest SocialAccountNewAuthURLParamsPlatformDataPinterest `json:"pinterest,omitzero"`
	// Additional data for connecting Threads accounts
	Threads SocialAccountNewAuthURLParamsPlatformDataThreads `json:"threads,omitzero"`
	// Additional data for connecting TikTok accounts
	Tiktok SocialAccountNewAuthURLParamsPlatformDataTiktok `json:"tiktok,omitzero"`
	// Additional data for connecting TikTok Business accounts
	TiktokBusiness SocialAccountNewAuthURLParamsPlatformDataTiktokBusiness `json:"tiktok_business,omitzero"`
	// Additional data for connecting YouTube accounts
	Youtube SocialAccountNewAuthURLParamsPlatformDataYoutube `json:"youtube,omitzero"`
	// contains filtered or unexported fields
}

Additional data needed for the provider

func (SocialAccountNewAuthURLParamsPlatformData) MarshalJSON

func (r SocialAccountNewAuthURLParamsPlatformData) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParamsPlatformData) UnmarshalJSON

func (r *SocialAccountNewAuthURLParamsPlatformData) UnmarshalJSON(data []byte) error

type SocialAccountNewAuthURLParamsPlatformDataBluesky

type SocialAccountNewAuthURLParamsPlatformDataBluesky struct {
	// The app password of the account
	AppPassword string `json:"app_password,required"`
	// The handle of the account
	Handle string `json:"handle,required"`
	// contains filtered or unexported fields
}

Additional data needed for connecting bluesky accounts

The properties AppPassword, Handle are required.

func (SocialAccountNewAuthURLParamsPlatformDataBluesky) MarshalJSON

func (r SocialAccountNewAuthURLParamsPlatformDataBluesky) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParamsPlatformDataBluesky) UnmarshalJSON

type SocialAccountNewAuthURLParamsPlatformDataFacebook

type SocialAccountNewAuthURLParamsPlatformDataFacebook struct {
	// Override the default permissions/scopes requested during OAuth. Default scopes:
	// public_profile, pages_show_list, pages_read_engagement, pages_manage_posts,
	// business_management
	PermissionOverrides [][]any `json:"permission_overrides,omitzero"`
	// contains filtered or unexported fields
}

Additional data for connecting facebook accounts

func (SocialAccountNewAuthURLParamsPlatformDataFacebook) MarshalJSON

func (r SocialAccountNewAuthURLParamsPlatformDataFacebook) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParamsPlatformDataFacebook) UnmarshalJSON

type SocialAccountNewAuthURLParamsPlatformDataInstagram

type SocialAccountNewAuthURLParamsPlatformDataInstagram struct {
	// The type of connection; instagram for using login with instagram, facebook for
	// using login with facebook.
	//
	// Any of "instagram", "facebook".
	ConnectionType string `json:"connection_type,omitzero,required"`
	// Override the default permissions/scopes requested during OAuth. Default
	// instagram scopes: instagram_business_basic, instagram_business_content_publish.
	// Default facebook scopes: instagram_basic, instagram_content_publish,
	// pages_show_list, public_profile, business_management
	PermissionOverrides [][]any `json:"permission_overrides,omitzero"`
	// contains filtered or unexported fields
}

Additional data for connecting instagram accounts

The property ConnectionType is required.

func (SocialAccountNewAuthURLParamsPlatformDataInstagram) MarshalJSON

func (r SocialAccountNewAuthURLParamsPlatformDataInstagram) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParamsPlatformDataInstagram) UnmarshalJSON

type SocialAccountNewAuthURLParamsPlatformDataLinkedin

type SocialAccountNewAuthURLParamsPlatformDataLinkedin struct {
	// The type of connection; If using our provided credentials always use
	// "organization". If using your own crednetials then only use "organization" if
	// you are using the Community API
	//
	// Any of "personal", "organization".
	ConnectionType string `json:"connection_type,omitzero,required"`
	// Override the default permissions/scopes requested during OAuth. Default personal
	// scopes: openid, w_member_social, profile, email. Default organization scopes:
	// r_basicprofile, w_member_social, r_organization_social, w_organization_social,
	// rw_organization_admin
	PermissionOverrides [][]any `json:"permission_overrides,omitzero"`
	// contains filtered or unexported fields
}

Additional data for connecting linkedin accounts

The property ConnectionType is required.

func (SocialAccountNewAuthURLParamsPlatformDataLinkedin) MarshalJSON

func (r SocialAccountNewAuthURLParamsPlatformDataLinkedin) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParamsPlatformDataLinkedin) UnmarshalJSON

type SocialAccountNewAuthURLParamsPlatformDataPinterest

type SocialAccountNewAuthURLParamsPlatformDataPinterest struct {
	// Override the default permissions/scopes requested during OAuth. Default scopes:
	// boards:read, boards:write, pins:read, pins:write, user_accounts:read
	PermissionOverrides [][]any `json:"permission_overrides,omitzero"`
	// contains filtered or unexported fields
}

Additional data for connecting Pinterest accounts

func (SocialAccountNewAuthURLParamsPlatformDataPinterest) MarshalJSON

func (r SocialAccountNewAuthURLParamsPlatformDataPinterest) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParamsPlatformDataPinterest) UnmarshalJSON

type SocialAccountNewAuthURLParamsPlatformDataThreads

type SocialAccountNewAuthURLParamsPlatformDataThreads struct {
	// Override the default permissions/scopes requested during OAuth. Default scopes:
	// threads_basic, threads_content_publish
	PermissionOverrides [][]any `json:"permission_overrides,omitzero"`
	// contains filtered or unexported fields
}

Additional data for connecting Threads accounts

func (SocialAccountNewAuthURLParamsPlatformDataThreads) MarshalJSON

func (r SocialAccountNewAuthURLParamsPlatformDataThreads) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParamsPlatformDataThreads) UnmarshalJSON

type SocialAccountNewAuthURLParamsPlatformDataTiktok

type SocialAccountNewAuthURLParamsPlatformDataTiktok struct {
	// Override the default permissions/scopes requested during OAuth. Default scopes:
	// user.info.basic, video.list, video.upload, video.publish
	PermissionOverrides [][]any `json:"permission_overrides,omitzero"`
	// contains filtered or unexported fields
}

Additional data for connecting TikTok accounts

func (SocialAccountNewAuthURLParamsPlatformDataTiktok) MarshalJSON

func (r SocialAccountNewAuthURLParamsPlatformDataTiktok) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParamsPlatformDataTiktok) UnmarshalJSON

type SocialAccountNewAuthURLParamsPlatformDataTiktokBusiness

type SocialAccountNewAuthURLParamsPlatformDataTiktokBusiness struct {
	// Override the default permissions/scopes requested during OAuth. Default scopes:
	// user.info.basic, user.info.username, user.info.stats, user.info.profile,
	// user.account.type, user.insights, video.list, video.insights, comment.list,
	// comment.list.manage, video.publish, video.upload, biz.spark.auth,
	// discovery.search.words
	PermissionOverrides [][]any `json:"permission_overrides,omitzero"`
	// contains filtered or unexported fields
}

Additional data for connecting TikTok Business accounts

func (SocialAccountNewAuthURLParamsPlatformDataTiktokBusiness) MarshalJSON

func (*SocialAccountNewAuthURLParamsPlatformDataTiktokBusiness) UnmarshalJSON

type SocialAccountNewAuthURLParamsPlatformDataYoutube

type SocialAccountNewAuthURLParamsPlatformDataYoutube struct {
	// Override the default permissions/scopes requested during OAuth. Default scopes:
	// https://www.googleapis.com/auth/youtube.force-ssl,
	// https://www.googleapis.com/auth/youtube.upload,
	// https://www.googleapis.com/auth/youtube.readonly,
	// https://www.googleapis.com/auth/userinfo.profile
	PermissionOverrides [][]any `json:"permission_overrides,omitzero"`
	// contains filtered or unexported fields
}

Additional data for connecting YouTube accounts

func (SocialAccountNewAuthURLParamsPlatformDataYoutube) MarshalJSON

func (r SocialAccountNewAuthURLParamsPlatformDataYoutube) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewAuthURLParamsPlatformDataYoutube) UnmarshalJSON

type SocialAccountNewAuthURLResponse

type SocialAccountNewAuthURLResponse struct {
	// The social account provider
	Platform string `json:"platform,required"`
	// The url to redirect the user to, in order to connect their account
	URL string `json:"url,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Platform    respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialAccountNewAuthURLResponse) RawJSON

Returns the unmodified JSON received from the API

func (*SocialAccountNewAuthURLResponse) UnmarshalJSON

func (r *SocialAccountNewAuthURLResponse) UnmarshalJSON(data []byte) error

type SocialAccountNewParams

type SocialAccountNewParams struct {
	// The access token of the social account
	AccessToken string `json:"access_token,required"`
	// The access token expiration date of the social account
	AccessTokenExpiresAt time.Time `json:"access_token_expires_at,required" format:"date-time"`
	// The platform of the social account
	//
	// Any of "facebook", "instagram", "x", "tiktok", "youtube", "pinterest",
	// "linkedin", "bluesky", "threads", "tiktok_business".
	Platform SocialAccountNewParamsPlatform `json:"platform,omitzero,required"`
	// The user id of the social account
	UserID string `json:"user_id,required"`
	// The external id of the social account
	ExternalID param.Opt[string] `json:"external_id,omitzero"`
	// The refresh token of the social account
	RefreshToken param.Opt[string] `json:"refresh_token,omitzero"`
	// The refresh token expiration date of the social account
	RefreshTokenExpiresAt param.Opt[time.Time] `json:"refresh_token_expires_at,omitzero" format:"date-time"`
	// The platform's username of the social account
	Username param.Opt[string] `json:"username,omitzero"`
	// The metadata of the social account
	Metadata any `json:"metadata,omitzero"`
	// contains filtered or unexported fields
}

func (SocialAccountNewParams) MarshalJSON

func (r SocialAccountNewParams) MarshalJSON() (data []byte, err error)

func (*SocialAccountNewParams) UnmarshalJSON

func (r *SocialAccountNewParams) UnmarshalJSON(data []byte) error

type SocialAccountNewParamsPlatform

type SocialAccountNewParamsPlatform string

The platform of the social account

const (
	SocialAccountNewParamsPlatformFacebook       SocialAccountNewParamsPlatform = "facebook"
	SocialAccountNewParamsPlatformInstagram      SocialAccountNewParamsPlatform = "instagram"
	SocialAccountNewParamsPlatformX              SocialAccountNewParamsPlatform = "x"
	SocialAccountNewParamsPlatformTiktok         SocialAccountNewParamsPlatform = "tiktok"
	SocialAccountNewParamsPlatformYoutube        SocialAccountNewParamsPlatform = "youtube"
	SocialAccountNewParamsPlatformPinterest      SocialAccountNewParamsPlatform = "pinterest"
	SocialAccountNewParamsPlatformLinkedin       SocialAccountNewParamsPlatform = "linkedin"
	SocialAccountNewParamsPlatformBluesky        SocialAccountNewParamsPlatform = "bluesky"
	SocialAccountNewParamsPlatformThreads        SocialAccountNewParamsPlatform = "threads"
	SocialAccountNewParamsPlatformTiktokBusiness SocialAccountNewParamsPlatform = "tiktok_business"
)

type SocialAccountService

type SocialAccountService struct {
	Options []option.RequestOption
}

SocialAccountService contains methods and other services that help with interacting with the post-for-me 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 NewSocialAccountService method instead.

func NewSocialAccountService

func NewSocialAccountService(opts ...option.RequestOption) (r SocialAccountService)

NewSocialAccountService 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 (*SocialAccountService) Disconnect

Disconnecting an account with remove all auth tokens and mark the account as disconnected. The record of the account will be kept and can be retrieved and reconnected by the owner of the account.

func (*SocialAccountService) Get

func (r *SocialAccountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *SocialAccount, err error)

Get social account by ID

func (*SocialAccountService) List

Get a paginated result for social accounts based on the applied filters

func (*SocialAccountService) New

If a social account with the same platform and user_id already exists, it will be updated. If not, a new social account will be created.

func (*SocialAccountService) NewAuthURL

Generates a URL that initiates the authentication flow for a user's social media account. When visited, the user is redirected to the selected social platform's login/authorization page. Upon successful authentication, they are redirected back to your application

func (*SocialAccountService) Update

Update social account

type SocialAccountStatus

type SocialAccountStatus string

Status of the account

const (
	SocialAccountStatusConnected    SocialAccountStatus = "connected"
	SocialAccountStatusDisconnected SocialAccountStatus = "disconnected"
)

type SocialAccountUpdateParams

type SocialAccountUpdateParams struct {
	// The platform's external id of the social account
	ExternalID param.Opt[string] `json:"external_id,omitzero"`
	// The platform's username of the social account
	Username param.Opt[string] `json:"username,omitzero"`
	// contains filtered or unexported fields
}

func (SocialAccountUpdateParams) MarshalJSON

func (r SocialAccountUpdateParams) MarshalJSON() (data []byte, err error)

func (*SocialAccountUpdateParams) UnmarshalJSON

func (r *SocialAccountUpdateParams) UnmarshalJSON(data []byte) error

type SocialPost

type SocialPost struct {
	// Unique identifier of the post
	ID string `json:"id,required"`
	// Account-specific configurations for the post
	AccountConfigurations []SocialPostAccountConfiguration `json:"account_configurations,required"`
	// Caption text for the post
	Caption string `json:"caption,required"`
	// Timestamp when the post was created
	CreatedAt string `json:"created_at,required"`
	// Provided unique identifier of the post
	ExternalID string `json:"external_id,required"`
	// Array of media URLs associated with the post
	Media []SocialPostMedia `json:"media,required"`
	// Platform-specific configurations for the post
	PlatformConfigurations PlatformConfigurationsDto `json:"platform_configurations,required"`
	// Scheduled date and time for the post
	ScheduledAt string `json:"scheduled_at,required"`
	// Array of social account IDs for posting
	SocialAccounts []SocialAccount `json:"social_accounts,required"`
	// Current status of the post: draft, processed, scheduled, or processing
	//
	// Any of "draft", "scheduled", "processing", "processed".
	Status SocialPostStatus `json:"status,required"`
	// Timestamp when the post was last updated
	UpdatedAt string `json:"updated_at,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                     respjson.Field
		AccountConfigurations  respjson.Field
		Caption                respjson.Field
		CreatedAt              respjson.Field
		ExternalID             respjson.Field
		Media                  respjson.Field
		PlatformConfigurations respjson.Field
		ScheduledAt            respjson.Field
		SocialAccounts         respjson.Field
		Status                 respjson.Field
		UpdatedAt              respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPost) RawJSON

func (r SocialPost) RawJSON() string

Returns the unmodified JSON received from the API

func (*SocialPost) UnmarshalJSON

func (r *SocialPost) UnmarshalJSON(data []byte) error

type SocialPostAccountConfiguration

type SocialPostAccountConfiguration struct {
	// Configuration for the social account
	Configuration SocialPostAccountConfigurationConfiguration `json:"configuration,required"`
	// ID of the social account, you want to apply the configuration to
	SocialAccountID string `json:"social_account_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Configuration   respjson.Field
		SocialAccountID respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostAccountConfiguration) RawJSON

Returns the unmodified JSON received from the API

func (*SocialPostAccountConfiguration) UnmarshalJSON

func (r *SocialPostAccountConfiguration) UnmarshalJSON(data []byte) error

type SocialPostAccountConfigurationConfiguration

type SocialPostAccountConfigurationConfiguration struct {
	// Allow comments on TikTok
	AllowComment bool `json:"allow_comment,nullable"`
	// Allow duets on TikTok
	AllowDuet bool `json:"allow_duet,nullable"`
	// Allow stitch on TikTok
	AllowStitch bool `json:"allow_stitch,nullable"`
	// Will automatically add music to photo posts on TikTok
	AutoAddMusic bool `json:"auto_add_music,nullable"`
	// Pinterest board IDs
	BoardIDs []string `json:"board_ids,nullable"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// List of page ids or users to invite as collaborators for a Video Reel (Instagram
	// and Facebook)
	Collaborators [][]any `json:"collaborators,nullable"`
	// Id of the twitter community to post to
	CommunityID string `json:"community_id"`
	// Disclose branded content on TikTok
	DiscloseBrandedContent bool `json:"disclose_branded_content,nullable"`
	// Disclose your brand on TikTok
	DiscloseYourBrand bool `json:"disclose_your_brand,nullable"`
	// Flag content as AI generated on TikTok
	IsAIGenerated bool `json:"is_ai_generated,nullable"`
	// Will create a draft upload to TikTok, posting will need to be completed from
	// within the app
	IsDraft bool `json:"is_draft,nullable"`
	// Pinterest post link
	Link string `json:"link,nullable"`
	// Page id with a location that you want to tag the image or video with (Instagram
	// and Facebook)
	Location string `json:"location,nullable"`
	// If true will notify YouTube the video is intended for kids, defaults to false
	MadeForKids bool `json:"made_for_kids,nullable"`
	// Overrides the `media` from the post
	Media []SocialPostAccountConfigurationConfigurationMedia `json:"media,nullable"`
	// Post placement for Facebook/Instagram/Threads
	//
	// Any of "reels", "timeline", "stories".
	Placement string `json:"placement,nullable"`
	// Poll options for the twitter
	Poll SocialPostAccountConfigurationConfigurationPoll `json:"poll"`
	// Sets the privacy status for TikTok (private, public), or YouTube (private,
	// public, unlisted)
	//
	// Any of "public", "private", "unlisted".
	PrivacyStatus string `json:"privacy_status,nullable"`
	// Id of the tweet you want to quote
	QuoteTweetID string `json:"quote_tweet_id"`
	// Who can reply to the tweet
	//
	// Any of "following", "mentionedUsers", "subscribers", "verified".
	ReplySettings string `json:"reply_settings,nullable"`
	// If false Instagram video posts will only be shown in the Reels tab
	ShareToFeed bool `json:"share_to_feed,nullable"`
	// Overrides the `title` from the post
	Title string `json:"title,nullable"`
	// Instagram trial reel type, when passed will be created as a trial reel. If
	// manual the trial reel can be manually graduated in the native app. If perfomance
	// the trial reel will be automatically graduated if the trial reel performs well.
	//
	// Any of "manual", "performance".
	TrialReelType string `json:"trial_reel_type,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowComment           respjson.Field
		AllowDuet              respjson.Field
		AllowStitch            respjson.Field
		AutoAddMusic           respjson.Field
		BoardIDs               respjson.Field
		Caption                respjson.Field
		Collaborators          respjson.Field
		CommunityID            respjson.Field
		DiscloseBrandedContent respjson.Field
		DiscloseYourBrand      respjson.Field
		IsAIGenerated          respjson.Field
		IsDraft                respjson.Field
		Link                   respjson.Field
		Location               respjson.Field
		MadeForKids            respjson.Field
		Media                  respjson.Field
		Placement              respjson.Field
		Poll                   respjson.Field
		PrivacyStatus          respjson.Field
		QuoteTweetID           respjson.Field
		ReplySettings          respjson.Field
		ShareToFeed            respjson.Field
		Title                  respjson.Field
		TrialReelType          respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for the social account

func (SocialPostAccountConfigurationConfiguration) RawJSON

Returns the unmodified JSON received from the API

func (*SocialPostAccountConfigurationConfiguration) UnmarshalJSON

func (r *SocialPostAccountConfigurationConfiguration) UnmarshalJSON(data []byte) error

type SocialPostAccountConfigurationConfigurationMedia

type SocialPostAccountConfigurationConfigurationMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []SocialPostAccountConfigurationConfigurationMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostAccountConfigurationConfigurationMedia) RawJSON

Returns the unmodified JSON received from the API

func (*SocialPostAccountConfigurationConfigurationMedia) UnmarshalJSON

type SocialPostAccountConfigurationConfigurationMediaTag

type SocialPostAccountConfigurationConfigurationMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostAccountConfigurationConfigurationMediaTag) RawJSON

Returns the unmodified JSON received from the API

func (*SocialPostAccountConfigurationConfigurationMediaTag) UnmarshalJSON

type SocialPostAccountConfigurationConfigurationPoll

type SocialPostAccountConfigurationConfigurationPoll struct {
	// Duration of the poll in minutes
	DurationMinutes float64 `json:"duration_minutes,required"`
	// The choices of the poll, requiring 2-4 options
	Options []string `json:"options,required"`
	// Who can reply to the tweet
	//
	// Any of "following", "mentionedUsers", "subscribers", "verified".
	ReplySettings string `json:"reply_settings"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DurationMinutes respjson.Field
		Options         respjson.Field
		ReplySettings   respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Poll options for the twitter

func (SocialPostAccountConfigurationConfigurationPoll) RawJSON

Returns the unmodified JSON received from the API

func (*SocialPostAccountConfigurationConfigurationPoll) UnmarshalJSON

type SocialPostDeleteResponse

type SocialPostDeleteResponse struct {
	// Whether or not the entity was deleted
	Success bool `json:"success,required"`
	// 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 (SocialPostDeleteResponse) RawJSON

func (r SocialPostDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SocialPostDeleteResponse) UnmarshalJSON

func (r *SocialPostDeleteResponse) UnmarshalJSON(data []byte) error

type SocialPostListParams

type SocialPostListParams struct {
	// Number of items to return
	Limit param.Opt[float64] `query:"limit,omitzero" json:"-"`
	// Number of items to skip
	Offset param.Opt[float64] `query:"offset,omitzero" json:"-"`
	// Filter by external ID. Multiple values imply OR logic.
	ExternalID []string `query:"external_id,omitzero" json:"-"`
	// Filter by platforms. Multiple values imply OR logic.
	//
	// Any of "bluesky", "facebook", "instagram", "linkedin", "pinterest", "threads",
	// "tiktok", "x", "youtube".
	Platform []string `query:"platform,omitzero" json:"-"`
	// Filter by social account ID. Multiple values imply OR logic.
	SocialAccountID []string `query:"social_account_id,omitzero" json:"-"`
	// Filter by post status. Multiple values imply OR logic.
	//
	// Any of "draft", "scheduled", "processing", "processed".
	Status []string `query:"status,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SocialPostListParams) URLQuery

func (r SocialPostListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SocialPostListParams's query parameters as `url.Values`.

type SocialPostListResponse

type SocialPostListResponse struct {
	Data []SocialPost               `json:"data,required"`
	Meta SocialPostListResponseMeta `json:"meta,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Meta        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostListResponse) RawJSON

func (r SocialPostListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SocialPostListResponse) UnmarshalJSON

func (r *SocialPostListResponse) UnmarshalJSON(data []byte) error

type SocialPostListResponseMeta

type SocialPostListResponseMeta struct {
	// Maximum number of items returned.
	Limit float64 `json:"limit,required"`
	// URL to the next page of results, or null if none.
	Next string `json:"next,required"`
	// Number of items skipped.
	Offset float64 `json:"offset,required"`
	// Total number of items available.
	Total float64 `json:"total,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Total       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostListResponseMeta) RawJSON

func (r SocialPostListResponseMeta) RawJSON() string

Returns the unmodified JSON received from the API

func (*SocialPostListResponseMeta) UnmarshalJSON

func (r *SocialPostListResponseMeta) UnmarshalJSON(data []byte) error

type SocialPostMedia

type SocialPostMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []SocialPostMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostMedia) RawJSON

func (r SocialPostMedia) RawJSON() string

Returns the unmodified JSON received from the API

func (*SocialPostMedia) UnmarshalJSON

func (r *SocialPostMedia) UnmarshalJSON(data []byte) error

type SocialPostMediaTag

type SocialPostMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostMediaTag) RawJSON

func (r SocialPostMediaTag) RawJSON() string

Returns the unmodified JSON received from the API

func (*SocialPostMediaTag) UnmarshalJSON

func (r *SocialPostMediaTag) UnmarshalJSON(data []byte) error

type SocialPostNewParams

type SocialPostNewParams struct {
	CreateSocialPost CreateSocialPostParam
	// contains filtered or unexported fields
}

func (SocialPostNewParams) MarshalJSON

func (r SocialPostNewParams) MarshalJSON() (data []byte, err error)

func (*SocialPostNewParams) UnmarshalJSON

func (r *SocialPostNewParams) UnmarshalJSON(data []byte) error

type SocialPostResult

type SocialPostResult struct {
	// The unique identifier of the post result
	ID string `json:"id,required"`
	// Detailed logs from the post
	Details any `json:"details,required"`
	// Error message if the post failed
	Error any `json:"error,required"`
	// Platform-specific data
	PlatformData SocialPostResultPlatformData `json:"platform_data,required"`
	// The ID of the associated post
	PostID string `json:"post_id,required"`
	// The ID of the associated social account
	SocialAccountID string `json:"social_account_id,required"`
	// Indicates if the post was successful
	Success bool `json:"success,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		Details         respjson.Field
		Error           respjson.Field
		PlatformData    respjson.Field
		PostID          respjson.Field
		SocialAccountID respjson.Field
		Success         respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostResult) RawJSON

func (r SocialPostResult) RawJSON() string

Returns the unmodified JSON received from the API

func (*SocialPostResult) UnmarshalJSON

func (r *SocialPostResult) UnmarshalJSON(data []byte) error

type SocialPostResultListParams

type SocialPostResultListParams struct {
	// Number of items to return
	Limit param.Opt[float64] `query:"limit,omitzero" json:"-"`
	// Number of items to skip
	Offset param.Opt[float64] `query:"offset,omitzero" json:"-"`
	// Filter by platform(s). Multiple values imply OR logic (e.g.,
	// ?platform=x&platform=facebook).
	Platform []string `query:"platform,omitzero" json:"-"`
	// Filter by post IDs. Multiple values imply OR logic (e.g.,
	// ?post_id=123&post_id=456).
	PostID []string `query:"post_id,omitzero" json:"-"`
	// Filter by social account ID(s). Multiple values imply OR logic (e.g.,
	// ?social_account_id=123&social_account_id=456).
	SocialAccountID []string `query:"social_account_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SocialPostResultListParams) URLQuery

func (r SocialPostResultListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SocialPostResultListParams's query parameters as `url.Values`.

type SocialPostResultListResponse

type SocialPostResultListResponse struct {
	Data []SocialPostResult               `json:"data,required"`
	Meta SocialPostResultListResponseMeta `json:"meta,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Meta        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostResultListResponse) RawJSON

Returns the unmodified JSON received from the API

func (*SocialPostResultListResponse) UnmarshalJSON

func (r *SocialPostResultListResponse) UnmarshalJSON(data []byte) error

type SocialPostResultListResponseMeta

type SocialPostResultListResponseMeta struct {
	// Maximum number of items returned.
	Limit float64 `json:"limit,required"`
	// URL to the next page of results, or null if none.
	Next string `json:"next,required"`
	// Number of items skipped.
	Offset float64 `json:"offset,required"`
	// Total number of items available.
	Total float64 `json:"total,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Total       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SocialPostResultListResponseMeta) RawJSON

Returns the unmodified JSON received from the API

func (*SocialPostResultListResponseMeta) UnmarshalJSON

func (r *SocialPostResultListResponseMeta) UnmarshalJSON(data []byte) error

type SocialPostResultPlatformData

type SocialPostResultPlatformData struct {
	// Platform-specific ID
	ID string `json:"id"`
	// URL of the posted content
	URL string `json:"url"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Platform-specific data

func (SocialPostResultPlatformData) RawJSON

Returns the unmodified JSON received from the API

func (*SocialPostResultPlatformData) UnmarshalJSON

func (r *SocialPostResultPlatformData) UnmarshalJSON(data []byte) error

type SocialPostResultService

type SocialPostResultService struct {
	Options []option.RequestOption
}

SocialPostResultService contains methods and other services that help with interacting with the post-for-me 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 NewSocialPostResultService method instead.

func NewSocialPostResultService

func NewSocialPostResultService(opts ...option.RequestOption) (r SocialPostResultService)

NewSocialPostResultService 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 (*SocialPostResultService) Get

Get post result by ID

func (*SocialPostResultService) List

Get a paginated result for post results based on the applied filters

type SocialPostService

type SocialPostService struct {
	Options []option.RequestOption
}

SocialPostService contains methods and other services that help with interacting with the post-for-me 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 NewSocialPostService method instead.

func NewSocialPostService

func NewSocialPostService(opts ...option.RequestOption) (r SocialPostService)

NewSocialPostService 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 (*SocialPostService) Delete

Delete Post

func (*SocialPostService) Get

func (r *SocialPostService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *SocialPost, err error)

Get Post by ID

func (*SocialPostService) List

Get a paginated result for posts based on the applied filters

func (*SocialPostService) New

Create Post

func (*SocialPostService) Update

func (r *SocialPostService) Update(ctx context.Context, id string, body SocialPostUpdateParams, opts ...option.RequestOption) (res *SocialPost, err error)

Update Post

type SocialPostStatus

type SocialPostStatus string

Current status of the post: draft, processed, scheduled, or processing

const (
	SocialPostStatusDraft      SocialPostStatus = "draft"
	SocialPostStatusScheduled  SocialPostStatus = "scheduled"
	SocialPostStatusProcessing SocialPostStatus = "processing"
	SocialPostStatusProcessed  SocialPostStatus = "processed"
)

type SocialPostUpdateParams

type SocialPostUpdateParams struct {
	CreateSocialPost CreateSocialPostParam
	// contains filtered or unexported fields
}

func (SocialPostUpdateParams) MarshalJSON

func (r SocialPostUpdateParams) MarshalJSON() (data []byte, err error)

func (*SocialPostUpdateParams) UnmarshalJSON

func (r *SocialPostUpdateParams) UnmarshalJSON(data []byte) error

type ThreadsConfigurationDto

type ThreadsConfigurationDto struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// Overrides the `media` from the post
	Media []ThreadsConfigurationDtoMedia `json:"media,nullable"`
	// Threads post placement
	//
	// Any of "reels", "timeline".
	Placement ThreadsConfigurationDtoPlacement `json:"placement,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Caption     respjson.Field
		Media       respjson.Field
		Placement   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ThreadsConfigurationDto) RawJSON

func (r ThreadsConfigurationDto) RawJSON() string

Returns the unmodified JSON received from the API

func (ThreadsConfigurationDto) ToParam

ToParam converts this ThreadsConfigurationDto to a ThreadsConfigurationDtoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ThreadsConfigurationDtoParam.Overrides()

func (*ThreadsConfigurationDto) UnmarshalJSON

func (r *ThreadsConfigurationDto) UnmarshalJSON(data []byte) error

type ThreadsConfigurationDtoMedia

type ThreadsConfigurationDtoMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []ThreadsConfigurationDtoMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ThreadsConfigurationDtoMedia) RawJSON

Returns the unmodified JSON received from the API

func (*ThreadsConfigurationDtoMedia) UnmarshalJSON

func (r *ThreadsConfigurationDtoMedia) UnmarshalJSON(data []byte) error

type ThreadsConfigurationDtoMediaParam

type ThreadsConfigurationDtoMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []ThreadsConfigurationDtoMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (ThreadsConfigurationDtoMediaParam) MarshalJSON

func (r ThreadsConfigurationDtoMediaParam) MarshalJSON() (data []byte, err error)

func (*ThreadsConfigurationDtoMediaParam) UnmarshalJSON

func (r *ThreadsConfigurationDtoMediaParam) UnmarshalJSON(data []byte) error

type ThreadsConfigurationDtoMediaTag

type ThreadsConfigurationDtoMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ThreadsConfigurationDtoMediaTag) RawJSON

Returns the unmodified JSON received from the API

func (*ThreadsConfigurationDtoMediaTag) UnmarshalJSON

func (r *ThreadsConfigurationDtoMediaTag) UnmarshalJSON(data []byte) error

type ThreadsConfigurationDtoMediaTagParam

type ThreadsConfigurationDtoMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (ThreadsConfigurationDtoMediaTagParam) MarshalJSON

func (r ThreadsConfigurationDtoMediaTagParam) MarshalJSON() (data []byte, err error)

func (*ThreadsConfigurationDtoMediaTagParam) UnmarshalJSON

func (r *ThreadsConfigurationDtoMediaTagParam) UnmarshalJSON(data []byte) error

type ThreadsConfigurationDtoParam

type ThreadsConfigurationDtoParam struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// Overrides the `media` from the post
	Media []ThreadsConfigurationDtoMediaParam `json:"media,omitzero"`
	// Threads post placement
	//
	// Any of "reels", "timeline".
	Placement ThreadsConfigurationDtoPlacement `json:"placement,omitzero"`
	// contains filtered or unexported fields
}

func (ThreadsConfigurationDtoParam) MarshalJSON

func (r ThreadsConfigurationDtoParam) MarshalJSON() (data []byte, err error)

func (*ThreadsConfigurationDtoParam) UnmarshalJSON

func (r *ThreadsConfigurationDtoParam) UnmarshalJSON(data []byte) error

type ThreadsConfigurationDtoPlacement

type ThreadsConfigurationDtoPlacement string

Threads post placement

const (
	ThreadsConfigurationDtoPlacementReels    ThreadsConfigurationDtoPlacement = "reels"
	ThreadsConfigurationDtoPlacementTimeline ThreadsConfigurationDtoPlacement = "timeline"
)

type TiktokConfiguration

type TiktokConfiguration struct {
	// Allow comments on TikTok
	AllowComment bool `json:"allow_comment,nullable"`
	// Allow duets on TikTok
	AllowDuet bool `json:"allow_duet,nullable"`
	// Allow stitch on TikTok
	AllowStitch bool `json:"allow_stitch,nullable"`
	// Will automatically add music to photo posts
	AutoAddMusic bool `json:"auto_add_music,nullable"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// Disclose branded content on TikTok
	DiscloseBrandedContent bool `json:"disclose_branded_content,nullable"`
	// Disclose your brand on TikTok
	DiscloseYourBrand bool `json:"disclose_your_brand,nullable"`
	// Flag content as AI generated on TikTok
	IsAIGenerated bool `json:"is_ai_generated,nullable"`
	// Will create a draft upload to TikTok, posting will need to be completed from
	// within the app
	IsDraft bool `json:"is_draft,nullable"`
	// Overrides the `media` from the post
	Media []TiktokConfigurationMedia `json:"media,nullable"`
	// Sets the privacy status for TikTok (private, public)
	PrivacyStatus string `json:"privacy_status,nullable"`
	// Overrides the `title` from the post
	Title string `json:"title,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowComment           respjson.Field
		AllowDuet              respjson.Field
		AllowStitch            respjson.Field
		AutoAddMusic           respjson.Field
		Caption                respjson.Field
		DiscloseBrandedContent respjson.Field
		DiscloseYourBrand      respjson.Field
		IsAIGenerated          respjson.Field
		IsDraft                respjson.Field
		Media                  respjson.Field
		PrivacyStatus          respjson.Field
		Title                  respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TiktokConfiguration) RawJSON

func (r TiktokConfiguration) RawJSON() string

Returns the unmodified JSON received from the API

func (TiktokConfiguration) ToParam

ToParam converts this TiktokConfiguration to a TiktokConfigurationParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TiktokConfigurationParam.Overrides()

func (*TiktokConfiguration) UnmarshalJSON

func (r *TiktokConfiguration) UnmarshalJSON(data []byte) error

type TiktokConfigurationMedia

type TiktokConfigurationMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []TiktokConfigurationMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TiktokConfigurationMedia) RawJSON

func (r TiktokConfigurationMedia) RawJSON() string

Returns the unmodified JSON received from the API

func (*TiktokConfigurationMedia) UnmarshalJSON

func (r *TiktokConfigurationMedia) UnmarshalJSON(data []byte) error

type TiktokConfigurationMediaParam

type TiktokConfigurationMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []TiktokConfigurationMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (TiktokConfigurationMediaParam) MarshalJSON

func (r TiktokConfigurationMediaParam) MarshalJSON() (data []byte, err error)

func (*TiktokConfigurationMediaParam) UnmarshalJSON

func (r *TiktokConfigurationMediaParam) UnmarshalJSON(data []byte) error

type TiktokConfigurationMediaTag

type TiktokConfigurationMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TiktokConfigurationMediaTag) RawJSON

func (r TiktokConfigurationMediaTag) RawJSON() string

Returns the unmodified JSON received from the API

func (*TiktokConfigurationMediaTag) UnmarshalJSON

func (r *TiktokConfigurationMediaTag) UnmarshalJSON(data []byte) error

type TiktokConfigurationMediaTagParam

type TiktokConfigurationMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (TiktokConfigurationMediaTagParam) MarshalJSON

func (r TiktokConfigurationMediaTagParam) MarshalJSON() (data []byte, err error)

func (*TiktokConfigurationMediaTagParam) UnmarshalJSON

func (r *TiktokConfigurationMediaTagParam) UnmarshalJSON(data []byte) error

type TiktokConfigurationParam

type TiktokConfigurationParam struct {
	// Allow comments on TikTok
	AllowComment param.Opt[bool] `json:"allow_comment,omitzero"`
	// Allow duets on TikTok
	AllowDuet param.Opt[bool] `json:"allow_duet,omitzero"`
	// Allow stitch on TikTok
	AllowStitch param.Opt[bool] `json:"allow_stitch,omitzero"`
	// Will automatically add music to photo posts
	AutoAddMusic param.Opt[bool] `json:"auto_add_music,omitzero"`
	// Disclose branded content on TikTok
	DiscloseBrandedContent param.Opt[bool] `json:"disclose_branded_content,omitzero"`
	// Disclose your brand on TikTok
	DiscloseYourBrand param.Opt[bool] `json:"disclose_your_brand,omitzero"`
	// Flag content as AI generated on TikTok
	IsAIGenerated param.Opt[bool] `json:"is_ai_generated,omitzero"`
	// Will create a draft upload to TikTok, posting will need to be completed from
	// within the app
	IsDraft param.Opt[bool] `json:"is_draft,omitzero"`
	// Sets the privacy status for TikTok (private, public)
	PrivacyStatus param.Opt[string] `json:"privacy_status,omitzero"`
	// Overrides the `title` from the post
	Title param.Opt[string] `json:"title,omitzero"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// Overrides the `media` from the post
	Media []TiktokConfigurationMediaParam `json:"media,omitzero"`
	// contains filtered or unexported fields
}

func (TiktokConfigurationParam) MarshalJSON

func (r TiktokConfigurationParam) MarshalJSON() (data []byte, err error)

func (*TiktokConfigurationParam) UnmarshalJSON

func (r *TiktokConfigurationParam) UnmarshalJSON(data []byte) error

type TwitterConfigurationDto

type TwitterConfigurationDto struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// Id of the community to post to
	CommunityID string `json:"community_id"`
	// Overrides the `media` from the post
	Media []TwitterConfigurationDtoMedia `json:"media,nullable"`
	// Poll options for the tweet
	Poll TwitterConfigurationDtoPoll `json:"poll"`
	// Id of the tweet you want to quote
	QuoteTweetID string `json:"quote_tweet_id"`
	// Who can reply to the tweet
	//
	// Any of "following", "mentionedUsers", "subscribers", "verified".
	ReplySettings TwitterConfigurationDtoReplySettings `json:"reply_settings,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Caption       respjson.Field
		CommunityID   respjson.Field
		Media         respjson.Field
		Poll          respjson.Field
		QuoteTweetID  respjson.Field
		ReplySettings respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TwitterConfigurationDto) RawJSON

func (r TwitterConfigurationDto) RawJSON() string

Returns the unmodified JSON received from the API

func (TwitterConfigurationDto) ToParam

ToParam converts this TwitterConfigurationDto to a TwitterConfigurationDtoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TwitterConfigurationDtoParam.Overrides()

func (*TwitterConfigurationDto) UnmarshalJSON

func (r *TwitterConfigurationDto) UnmarshalJSON(data []byte) error

type TwitterConfigurationDtoMedia

type TwitterConfigurationDtoMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []TwitterConfigurationDtoMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TwitterConfigurationDtoMedia) RawJSON

Returns the unmodified JSON received from the API

func (*TwitterConfigurationDtoMedia) UnmarshalJSON

func (r *TwitterConfigurationDtoMedia) UnmarshalJSON(data []byte) error

type TwitterConfigurationDtoMediaParam

type TwitterConfigurationDtoMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []TwitterConfigurationDtoMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (TwitterConfigurationDtoMediaParam) MarshalJSON

func (r TwitterConfigurationDtoMediaParam) MarshalJSON() (data []byte, err error)

func (*TwitterConfigurationDtoMediaParam) UnmarshalJSON

func (r *TwitterConfigurationDtoMediaParam) UnmarshalJSON(data []byte) error

type TwitterConfigurationDtoMediaTag

type TwitterConfigurationDtoMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TwitterConfigurationDtoMediaTag) RawJSON

Returns the unmodified JSON received from the API

func (*TwitterConfigurationDtoMediaTag) UnmarshalJSON

func (r *TwitterConfigurationDtoMediaTag) UnmarshalJSON(data []byte) error

type TwitterConfigurationDtoMediaTagParam

type TwitterConfigurationDtoMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (TwitterConfigurationDtoMediaTagParam) MarshalJSON

func (r TwitterConfigurationDtoMediaTagParam) MarshalJSON() (data []byte, err error)

func (*TwitterConfigurationDtoMediaTagParam) UnmarshalJSON

func (r *TwitterConfigurationDtoMediaTagParam) UnmarshalJSON(data []byte) error

type TwitterConfigurationDtoParam

type TwitterConfigurationDtoParam struct {
	// Id of the community to post to
	CommunityID param.Opt[string] `json:"community_id,omitzero"`
	// Id of the tweet you want to quote
	QuoteTweetID param.Opt[string] `json:"quote_tweet_id,omitzero"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// Overrides the `media` from the post
	Media []TwitterConfigurationDtoMediaParam `json:"media,omitzero"`
	// Who can reply to the tweet
	//
	// Any of "following", "mentionedUsers", "subscribers", "verified".
	ReplySettings TwitterConfigurationDtoReplySettings `json:"reply_settings,omitzero"`
	// Poll options for the tweet
	Poll TwitterConfigurationDtoPollParam `json:"poll,omitzero"`
	// contains filtered or unexported fields
}

func (TwitterConfigurationDtoParam) MarshalJSON

func (r TwitterConfigurationDtoParam) MarshalJSON() (data []byte, err error)

func (*TwitterConfigurationDtoParam) UnmarshalJSON

func (r *TwitterConfigurationDtoParam) UnmarshalJSON(data []byte) error

type TwitterConfigurationDtoPoll

type TwitterConfigurationDtoPoll struct {
	// Duration of the poll in minutes
	DurationMinutes float64 `json:"duration_minutes,required"`
	// The choices of the poll, requiring 2-4 options
	Options []string `json:"options,required"`
	// Who can reply to the tweet
	//
	// Any of "following", "mentionedUsers", "subscribers", "verified".
	ReplySettings string `json:"reply_settings"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DurationMinutes respjson.Field
		Options         respjson.Field
		ReplySettings   respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Poll options for the tweet

func (TwitterConfigurationDtoPoll) RawJSON

func (r TwitterConfigurationDtoPoll) RawJSON() string

Returns the unmodified JSON received from the API

func (*TwitterConfigurationDtoPoll) UnmarshalJSON

func (r *TwitterConfigurationDtoPoll) UnmarshalJSON(data []byte) error

type TwitterConfigurationDtoPollParam

type TwitterConfigurationDtoPollParam struct {
	// Duration of the poll in minutes
	DurationMinutes float64 `json:"duration_minutes,required"`
	// The choices of the poll, requiring 2-4 options
	Options []string `json:"options,omitzero,required"`
	// Who can reply to the tweet
	//
	// Any of "following", "mentionedUsers", "subscribers", "verified".
	ReplySettings string `json:"reply_settings,omitzero"`
	// contains filtered or unexported fields
}

Poll options for the tweet

The properties DurationMinutes, Options are required.

func (TwitterConfigurationDtoPollParam) MarshalJSON

func (r TwitterConfigurationDtoPollParam) MarshalJSON() (data []byte, err error)

func (*TwitterConfigurationDtoPollParam) UnmarshalJSON

func (r *TwitterConfigurationDtoPollParam) UnmarshalJSON(data []byte) error

type TwitterConfigurationDtoReplySettings

type TwitterConfigurationDtoReplySettings string

Who can reply to the tweet

const (
	TwitterConfigurationDtoReplySettingsFollowing      TwitterConfigurationDtoReplySettings = "following"
	TwitterConfigurationDtoReplySettingsMentionedUsers TwitterConfigurationDtoReplySettings = "mentionedUsers"
	TwitterConfigurationDtoReplySettingsSubscribers    TwitterConfigurationDtoReplySettings = "subscribers"
	TwitterConfigurationDtoReplySettingsVerified       TwitterConfigurationDtoReplySettings = "verified"
)

type YoutubeConfigurationDto

type YoutubeConfigurationDto struct {
	// Overrides the `caption` from the post
	Caption any `json:"caption,nullable"`
	// If true will notify YouTube the video is intended for kids, defaults to false
	MadeForKids bool `json:"made_for_kids,nullable"`
	// Overrides the `media` from the post
	Media []YoutubeConfigurationDtoMedia `json:"media,nullable"`
	// Sets the privacy status of the video, will default to public
	//
	// Any of "public", "private", "unlisted".
	PrivacyStatus YoutubeConfigurationDtoPrivacyStatus `json:"privacy_status,nullable"`
	// Overrides the `title` from the post
	Title string `json:"title,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Caption       respjson.Field
		MadeForKids   respjson.Field
		Media         respjson.Field
		PrivacyStatus respjson.Field
		Title         respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (YoutubeConfigurationDto) RawJSON

func (r YoutubeConfigurationDto) RawJSON() string

Returns the unmodified JSON received from the API

func (YoutubeConfigurationDto) ToParam

ToParam converts this YoutubeConfigurationDto to a YoutubeConfigurationDtoParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with YoutubeConfigurationDtoParam.Overrides()

func (*YoutubeConfigurationDto) UnmarshalJSON

func (r *YoutubeConfigurationDto) UnmarshalJSON(data []byte) error

type YoutubeConfigurationDtoMedia

type YoutubeConfigurationDtoMedia struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing bool `json:"skip_processing,nullable"`
	// List of tags to attach to the media
	Tags []YoutubeConfigurationDtoMediaTag `json:"tags,nullable"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,nullable"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		URL                  respjson.Field
		SkipProcessing       respjson.Field
		Tags                 respjson.Field
		ThumbnailTimestampMs respjson.Field
		ThumbnailURL         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (YoutubeConfigurationDtoMedia) RawJSON

Returns the unmodified JSON received from the API

func (*YoutubeConfigurationDtoMedia) UnmarshalJSON

func (r *YoutubeConfigurationDtoMedia) UnmarshalJSON(data []byte) error

type YoutubeConfigurationDtoMediaParam

type YoutubeConfigurationDtoMediaParam struct {
	// Public URL of the media
	URL string `json:"url,required"`
	// If true the media will not be processed at all and instead be posted as is, this
	// may increase chance of post failure if media does not meet platform's
	// requirements. Best used for larger files.
	SkipProcessing param.Opt[bool] `json:"skip_processing,omitzero"`
	// List of tags to attach to the media
	Tags []YoutubeConfigurationDtoMediaTagParam `json:"tags,omitzero"`
	// Timestamp in milliseconds of frame to use as thumbnail for the media
	ThumbnailTimestampMs any `json:"thumbnail_timestamp_ms,omitzero"`
	// Public URL of the thumbnail for the media
	ThumbnailURL any `json:"thumbnail_url,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (YoutubeConfigurationDtoMediaParam) MarshalJSON

func (r YoutubeConfigurationDtoMediaParam) MarshalJSON() (data []byte, err error)

func (*YoutubeConfigurationDtoMediaParam) UnmarshalJSON

func (r *YoutubeConfigurationDtoMediaParam) UnmarshalJSON(data []byte) error

type YoutubeConfigurationDtoMediaTag

type YoutubeConfigurationDtoMediaTag struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X float64 `json:"x"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y float64 `json:"y"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Platform    respjson.Field
		Type        respjson.Field
		X           respjson.Field
		Y           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (YoutubeConfigurationDtoMediaTag) RawJSON

Returns the unmodified JSON received from the API

func (*YoutubeConfigurationDtoMediaTag) UnmarshalJSON

func (r *YoutubeConfigurationDtoMediaTag) UnmarshalJSON(data []byte) error

type YoutubeConfigurationDtoMediaTagParam

type YoutubeConfigurationDtoMediaTagParam struct {
	// Facebook User ID, Instagram Username or Instagram product id to tag
	ID string `json:"id,required"`
	// The platform for the tags
	//
	// Any of "facebook", "instagram".
	Platform string `json:"platform,omitzero,required"`
	// The type of tag, user to tag accounts, product to tag products (only supported
	// for instagram)
	//
	// Any of "user", "product".
	Type string `json:"type,omitzero,required"`
	// Percentage distance from left edge of the image, Not required for videos or
	// stories
	X param.Opt[float64] `json:"x,omitzero"`
	// Percentage distance from top edge of the image, Not required for videos or
	// stories
	Y param.Opt[float64] `json:"y,omitzero"`
	// contains filtered or unexported fields
}

The properties ID, Platform, Type are required.

func (YoutubeConfigurationDtoMediaTagParam) MarshalJSON

func (r YoutubeConfigurationDtoMediaTagParam) MarshalJSON() (data []byte, err error)

func (*YoutubeConfigurationDtoMediaTagParam) UnmarshalJSON

func (r *YoutubeConfigurationDtoMediaTagParam) UnmarshalJSON(data []byte) error

type YoutubeConfigurationDtoParam

type YoutubeConfigurationDtoParam struct {
	// If true will notify YouTube the video is intended for kids, defaults to false
	MadeForKids param.Opt[bool] `json:"made_for_kids,omitzero"`
	// Overrides the `title` from the post
	Title param.Opt[string] `json:"title,omitzero"`
	// Overrides the `caption` from the post
	Caption any `json:"caption,omitzero"`
	// Overrides the `media` from the post
	Media []YoutubeConfigurationDtoMediaParam `json:"media,omitzero"`
	// Sets the privacy status of the video, will default to public
	//
	// Any of "public", "private", "unlisted".
	PrivacyStatus YoutubeConfigurationDtoPrivacyStatus `json:"privacy_status,omitzero"`
	// contains filtered or unexported fields
}

func (YoutubeConfigurationDtoParam) MarshalJSON

func (r YoutubeConfigurationDtoParam) MarshalJSON() (data []byte, err error)

func (*YoutubeConfigurationDtoParam) UnmarshalJSON

func (r *YoutubeConfigurationDtoParam) UnmarshalJSON(data []byte) error

type YoutubeConfigurationDtoPrivacyStatus

type YoutubeConfigurationDtoPrivacyStatus string

Sets the privacy status of the video, will default to public

const (
	YoutubeConfigurationDtoPrivacyStatusPublic   YoutubeConfigurationDtoPrivacyStatus = "public"
	YoutubeConfigurationDtoPrivacyStatusPrivate  YoutubeConfigurationDtoPrivacyStatus = "private"
	YoutubeConfigurationDtoPrivacyStatusUnlisted YoutubeConfigurationDtoPrivacyStatus = "unlisted"
)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL