Calling the client.Campaign.List method results in the following error:
json: cannot unmarshal array into Go struct field Campaign.data.settings of type mailerlite.CampaignSettings
The API version that the client specifies (2022-12-01) causes the server to return an array for the 'settings' field of a campaign, while the client expects an object. (It looks like the server started returning an object instead of an array at version 2023-01-11).
Calling the
client.Campaign.List
method results in the following error:json: cannot unmarshal array into Go struct field Campaign.data.settings of type mailerlite.CampaignSettings
The API version that the client specifies (2022-12-01) causes the server to return an array for the 'settings' field of a campaign, while the client expects an object. (It looks like the server started returning an object instead of an array at version 2023-01-11).