Closed Panoplos closed 9 years ago
I had the same problem with a similar library, and the solution was to json.dumps(attachments)
.
Just be sure your attachments variable is a list not a dict. The library includes the "attachments":
part for you. I hope this helps.
Ya json.dumps worked for me. I might submit a PR tomorrow. Feel like this should be handled.
For example you will assign attachments to something like:
att = [
{
"fallback": "A new review!",
"color": "good",
"pretext": ":musespinning: %s %s %s %s %s" % (full_star, full_star, empty_star, empty_star, full_star),
"author_name": "super",
"text": "cool"
}
]
Fixed in #35. Closing.
Thanks everyone.
I am trying to post the following via
slacker
:Where I have set the constants to my settings, but you should be able to test this yourself.
Note, if I use
json.dumps(attachment)
, the result is:Which contains empty attachments.