2727
2828from .constants import PASTE_BASE
2929
30+
3031class Paste :
3132 """
3233 A class representing the return data from the API after performing a POST request.
3334
34- Parameters
35+ Attributes
3536 ----------
3637 paste_id: :class:`str`
3738 The ID returned from the API. Genertally it is 3 random choice English words.
@@ -72,11 +73,12 @@ def with_syntax(self, new_syntax: str) -> str:
7273 new_syntax = f".{ new_syntax } " if new_syntax else None
7374 return PASTE_BASE .format (self .paste_id , new_syntax )
7475
76+
7577class PasteData :
7678 """
7779 A class representing the return data from the API after performing a GET request.
7880
79- Parameters
81+ Attributes
8082 ----------
8183 paste_id: :class:`str`
8284 The ID you wish to retrieve from the API.
@@ -89,7 +91,10 @@ class PasteData:
8991 paste_date: :class:`datetime.datetime`
9092 The date this paste was created on the API.
9193 """
92- __slots__ = ("paste_id" , "_paste_data" , "paste_content" , "paste_syntax" , "paste_nick" , "paste_date" )
94+
95+ __slots__ = ("paste_id" , "_paste_data" , "paste_content" ,
96+ "paste_syntax" , "paste_nick" , "paste_date" )
97+
9398 def __init__ (self , paste_id : str , paste_data : dict ):
9499 self .paste_id = paste_id
95100 self ._paste_data = paste_data
@@ -119,4 +124,3 @@ def created_at(self) -> datetime.datetime:
119124 def content (self ) -> str :
120125 """ :class:`str`: Return the paste content but dedented correctly. """
121126 return dedent (self .paste_content )
122-
0 commit comments