@@ -89,8 +89,6 @@ class PasteData:
89
89
The syntax you specified that this Paste is in.
90
90
paste_nick: Optional[:class:`str`]
91
91
The nick set for this paste on the API.
92
- paste_date: :class:`str`
93
- The date this paste was created on the API.
94
92
"""
95
93
96
94
__slots__ = (
@@ -99,7 +97,7 @@ class PasteData:
99
97
"paste_content" ,
100
98
"paste_syntax" ,
101
99
"paste_nick" ,
102
- "paste_date " ,
100
+ "_created_at " ,
103
101
)
104
102
105
103
def __init__ (self , paste_id : str , paste_data : dict [str , Any ]):
@@ -108,13 +106,13 @@ def __init__(self, paste_id: str, paste_data: dict[str, Any]):
108
106
self .paste_content : str = paste_data ["data" ]
109
107
self .paste_syntax : str = paste_data ["syntax" ]
110
108
self .paste_nick : Optional [str ] = paste_data ["nick" ]
111
- self .paste_date : str = paste_data ["created_at" ]
109
+ self ._created_at : str = paste_data ["created_at" ]
112
110
113
111
def __str__ (self ) -> str :
114
112
return self .content
115
113
116
114
def __repr__ (self ) -> str :
117
- return f"<PasteData id={ self .paste_id } nick={ self .paste_nick } syntax={ self .paste_syntax } >"
115
+ return f"<PasteData id={ self .paste_id !r } nick={ self .paste_nick !r } syntax={ self .paste_syntax !r } >"
118
116
119
117
@property
120
118
def url (self ) -> str :
@@ -125,7 +123,7 @@ def url(self) -> str:
125
123
@property
126
124
def created_at (self ) -> datetime .datetime :
127
125
""":class:`datetime.datetime`: Returns a UTC datetime of when the paste was created."""
128
- return datetime .datetime .strptime (self .paste_date , "%Y-%m-%dT%H:%M:%S.%f" )
126
+ return datetime .datetime .strptime (self ._created_at , "%Y-%m-%dT%H:%M:%S.%f" )
129
127
130
128
@property
131
129
def content (self ) -> str :
0 commit comments