Knuckles-Team / listmonk-api

Listmonk Python API Wrapper
MIT License
5 stars 2 forks source link

File attachement in campains #4

Open julienvienne opened 1 month ago

julienvienne commented 1 month ago

Hi,

It is not documented in API description, but it is possible to attach one or more medias to campains uppon creation. Medias have to be uploaded first, and then you just need to add the media list attibute to the posted data. Ex :

data = {
   ...
  "media": [1],
   ...
}

It would be very simple to add media_ids parameter to the create_campain() method and add the media ids to the data dictionary.