Skip to content
This repository was archived by the owner on Jun 24, 2021. It is now read-only.

Commit 1de06e7

Browse files
author
Josh Wolff
committed
Updating
1 parent 48ee7be commit 1de06e7

File tree

15 files changed

+136
-108
lines changed

15 files changed

+136
-108
lines changed

.idea/workspace.xml

Lines changed: 50 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

build/lib/spontit_pkg/resource.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55

66
class SpontitResource:
77
"""
8-
8+
Use this resource to access your account and related functions.
99
"""
1010
class FunctionStrings(Enum):
1111
"""
12-
12+
An mapping of function to string. For internal use.
1313
"""
1414
GET_TOPIC_ID_TO_DISPLAY_NAME_MAPPING = "get_topic_id_to_display_name_mapping"
1515
PUSH = "push"
1616

1717
def __init__(self, user_id, secret_key):
1818
"""
19-
20-
:param user_id:
21-
:param secret_key:
19+
Initializes the resource.
20+
:param user_id: Your user ID.
21+
:param secret_key: A secret key you generated on spontit.com/secret_keys
2222
"""
2323
if type(user_id) is not str:
2424
raise Exception("User ID must be a string.")
@@ -47,7 +47,7 @@ def get_topic_id_to_display_name_mapping(self):
4747
"""
4848
Sends a put request requesting the topic IDs associated with the user account. You can access the list of topic
4949
IDs by getting the .keys() of the dictionary returned.
50-
:return:
50+
:return: Returns either a mapping or an error description (with the key "Error")
5151
"""
5252
return util.put_request(self.__get_payload_dict(self.FunctionStrings.GET_TOPIC_ID_TO_DISPLAY_NAME_MAPPING))
5353

@@ -56,11 +56,12 @@ def push(self,
5656
link=None,
5757
to_topic_ids=None):
5858
"""
59-
60-
:param call_to_action:
61-
:param link: [OPTIONAL]
62-
:param to_topic_ids: [OPTIONAL]
63-
:return:
59+
Use this method to send your own push notification!
60+
:param call_to_action: The message that you would like to push.
61+
:param link: [OPTIONAL] A link for content you would like to attach to the push notification
62+
:param to_topic_ids: [OPTIONAL] A list of topic IDS you would like to push to. If to_topic_ids is not specified,
63+
then the push notification will be sent to the main channel.
64+
:return: Returns either a success response or an error description (with the key "Error")
6465
"""
6566
# Construct the payload.
6667
payload = self.__get_payload_dict(self.FunctionStrings.PUSH)
1.43 KB
Binary file not shown.

dist/spontit-0.0.1.tar.gz

585 Bytes
Binary file not shown.

images/.DS_Store

6 KB
Binary file not shown.

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Inside of setup.cfg
2+
[metadata]
3+
description-file = README.md

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import setuptools
22

3+
# Thank you to https://packaging.python.org/tutorials/packaging-projects/
4+
35
with open("README.md", "r") as fh:
46
long_description = fh.read()
57

@@ -19,4 +21,4 @@
1921
"Operating System :: OS Independent",
2022
],
2123
python_requires='>=3.6',
22-
)
24+
)

0 commit comments

Comments
 (0)