Skip to content

Commit

Permalink
add get() method to get dict representation
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomiku committed Mar 8, 2020
1 parent ed7089d commit 4a84a70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/shlomikushchi/simple_pastebin_parser',
version='v0.4.1',
version='v0.4.2',
zip_safe=False,
)
6 changes: 6 additions & 0 deletions simple_pastebin_parser/paste.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ def __init__(self, href: str) -> None:
self.Date = self.parse_date()
self.Content = self.parse_code()

def get(self):
return {"Author": self.Author,
"Title": self.Title,
"Date": self.Date,
"Content": self.Content}

def parse_author(self):
"""
under paste_box_line2 we have the user, date, etc.
Expand Down

0 comments on commit 4a84a70

Please sign in to comment.