Open orihartstein opened 6 years ago
I tried a code modification, and could not see the summary appear on the teams card message.
Are you expecting to see the summary somewhere else?
>>> import pymsteams
>>> m = pymsteams.connectorcard(my_url)
>>> m.summary("test summary")
>>> m.title("test title")
>>> m.text("slkfjslkdfj ljsdflksjdf lksjdflskdjf lksjdflksjdf lkjsdflkjsdf lkjsdflksjdf lskdjflskdjfsldf lkjsdflksdjflsdkjf lkjsdflksdjf sldflkjsdf lksdjf lsdkjf sldkjf slkjf slkjf lskdjf lskj flsdkj f")
>>> m.send()
True
>>> pprint.pprint(m.payload)
{'summary': 'test summary',
'text': 'slkfjslkdfj ljsdflksjdf lksjdflskdjf lksjdflksjdf lkjsdflkjsdf '
'lkjsdflksjdf lskdjflskdjfsldf lkjsdflksdjflsdkjf lkjsdflksdjf '
'sldflkjsdf lksdjf lsdkjf sldkjf slkjf slkjf lskdjf lskj flsdkj f',
'title': 'test title'}
I think, that text property is meant to visible as a text header for the message. if you don't want a header you can populate summary property - which is not visible.
so you fill text if you want visible and summary if you don't.
sample will give a card without header text
message.summary("this text is not visible") messageSection = pymsteams.cardsection()
messageSection.title("Section title") messageSection.activityTitle("my activity title {}".format( now )) messageSection.activitySubtitle("my activity subtitle") messageSection.activityImage("http://www.clker.com/cliparts/v/u/z/w/n/2/thumbsup-md.png") messageSection.activityText("This is my activity Text") messageSection.addFact("this", "is fine") messageSection.addFact("this is", "also fine") messageSection.text("This is my section text")
This method is now live in master. PyPI uploads are also now automated using CircleCI.
Is this good to close?
In many cases a header is not needed for the message - today webhooks require either text or summary property for each message.
using summary property allows to remove the header and the summary will not be shown.
class connectorcard: