1- from pprint import pprint
1+ import datetime
2+ import logging
23import time
34from pathlib import Path
4- from typing import Dict , Any , Union , List , Optional
5-
6- import logging
7-
8- import datetime
5+ from pprint import pprint
6+ from typing import Any , Dict , List , Union
97from urllib .parse import quote_plus
108
9+ from requests import Session
1110from requests .adapters import HTTPAdapter
1211from requests .exceptions import HTTPError
1312
14- from requests import Session
15-
16- from feedly .data import FeedlyUser
17- from feedly .protocol import RateLimitedAPIError , BadRequestAPIError , UnauthorizedAPIError , ServerAPIError , APIClient , WrappedHTTPError
18- from feedly .stream import StreamIdBase
13+ from feedly .api_client .data import FeedlyUser
14+ from feedly .api_client .protocol import APIClient , BadRequestAPIError , RateLimitedAPIError , ServerAPIError , UnauthorizedAPIError
1915
2016
2117class Auth :
@@ -218,14 +214,3 @@ def do_api_request(self, relative_url:str, method:str=None, data:Dict=None,
218214 raise ServerAPIError (e )
219215
220216 raise e
221-
222- if __name__ == '__main__' :
223- logging .basicConfig (level = 'DEBUG' )
224- # token = (Path.home() / 'access.token').read_text().strip()
225- auth = FileAuthStore (Path .home ())
226- # print(sess.user['fullName'])
227-
228- sess = FeedlySession (auth )
229-
230- for k , v in sess .user .get_categories ().items ():
231- pprint (f"{ k } -- { v ['label' ]} " )
0 commit comments