Skip to content

Commit 0e21abd

Browse files
committed
minor fixes
1 parent 191b713 commit 0e21abd

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Welcome to python-substack v1.0.0
1+
# Welcome to Python Substack
22

33
Updated

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "python-substack"
3-
version = "0.0.1"
3+
version = "0.0.2"
44
description = "A Python wrapper around the Substack API."
55
authors = ["Paolo Mazza <mazzapaolo2019@gmail.com>"]
66
license = "MIT"

substack/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def put_draft(
151151
"""
152152
153153
Args:
154-
draft:
154+
draft: draft id
155155
title:
156156
subtitle:
157157
body:
@@ -176,7 +176,7 @@ def prepublish_draft(self, draft: str) -> dict:
176176
"""
177177
178178
Args:
179-
draft:
179+
draft: draft id
180180
181181
Returns:
182182
@@ -193,14 +193,14 @@ def publish_draft(
193193
"""
194194
195195
Args:
196-
draft:
196+
draft: draft id
197197
send:
198198
share_automatically:
199199
200200
Returns:
201201
202202
"""
203-
response = requests.post(
203+
response = self._session.post(
204204
f"{self.publication_url}/drafts/{draft}/publish",
205205
json={"send": send, "share_automatically": share_automatically},
206206
)

tests/substack/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ def test_put_draft(self):
6060
password=os.getenv("PASSWORD"),
6161
publication_url=os.getenv("PUBLICATION_URL"),
6262
)
63-
posted_draft = api.put_draft("62667935")
63+
posted_draft = api.put_draft("")
6464
self.assertIsNotNone(posted_draft)

0 commit comments

Comments
 (0)