Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2za committed Jul 7, 2022
1 parent 191b713 commit 0e21abd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Welcome to python-substack v1.0.0
# Welcome to Python Substack

Updated
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "python-substack"
version = "0.0.1"
version = "0.0.2"
description = "A Python wrapper around the Substack API."
authors = ["Paolo Mazza <mazzapaolo2019@gmail.com>"]
license = "MIT"
Expand Down
8 changes: 4 additions & 4 deletions substack/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def put_draft(
"""
Args:
draft:
draft: draft id
title:
subtitle:
body:
Expand All @@ -176,7 +176,7 @@ def prepublish_draft(self, draft: str) -> dict:
"""
Args:
draft:
draft: draft id
Returns:
Expand All @@ -193,14 +193,14 @@ def publish_draft(
"""
Args:
draft:
draft: draft id
send:
share_automatically:
Returns:
"""
response = requests.post(
response = self._session.post(
f"{self.publication_url}/drafts/{draft}/publish",
json={"send": send, "share_automatically": share_automatically},
)
Expand Down
2 changes: 1 addition & 1 deletion tests/substack/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ def test_put_draft(self):
password=os.getenv("PASSWORD"),
publication_url=os.getenv("PUBLICATION_URL"),
)
posted_draft = api.put_draft("62667935")
posted_draft = api.put_draft("")
self.assertIsNotNone(posted_draft)

0 comments on commit 0e21abd

Please sign in to comment.