Skip to content

Commit

Permalink
version 0.1.2 (#6)
Browse files Browse the repository at this point in the history
* doc typo

* addLinkButton

Now allows multiple links

* setup 0.1.2
  • Loading branch information
rveachkc authored Aug 30, 2017
1 parent a7c9567 commit 70a69a8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ myTeamsMessage.title("This is my message title")

### Add a link button
```python
myTeamsMessage.linkbutton("This is the button Text", "https://github.com/rveachkc/pymsteams/")
myTeamsMessage.addLinkButton("This is the button Text", "https://github.com/rveachkc/pymsteams/")
```

### Change URL
Expand Down
13 changes: 8 additions & 5 deletions pymsteams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,18 @@ def color(self, mcolor):
else:
self.payload["themeColor"] = themeColor

def linkButton(self, buttontext, buttonurl):
self.payload["potentialAction"] = [
{
def addLinkButton(self, buttontext, buttonurl):
if "potentialAction" not in self.payload:
self.payload["potentialAction"] = []

thisbutton = {
"@context" : "http://schema.org",
"@type" : "ViewAction",
"name" : buttontext,
"target" : [ buttonurl ]
}
]
}

self.payload["potentialAction"].append(thisbutton)

def newhookurl(self, nhookurl):
self.hookurl = nhookurl
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
setup(
name = 'pymsteams',
packages = ['pymsteams'],
version = '0.1.1',
version = '0.1.2',
description = 'Format messages and post to Microsoft Teams.',
author = 'Ryan Veach',
author_email = '[email protected]',
url = 'https://github.com/rveachkc/pymsteams',
download_url = 'https://github.com/rveachkc/pymsteams/archive/0.1.tar.gz',
download_url = 'https://github.com/rveachkc/pymsteams/archive/0.1.2.tar.gz',
keywords = ['Microsoft', 'Teams'], # arbitrary keywords
classifiers = [],
install_requires=['requests'],
)
)

0 comments on commit 70a69a8

Please sign in to comment.