[FeedlyUser] factorize lazy streams and add simple examples#20
[FeedlyUser] factorize lazy streams and add simple examples#20Mathieu4141 merged 11 commits intomasterfrom
Conversation
| @@ -9,19 +9,19 @@ | |||
| import sys | |||
There was a problem hiding this comment.
forgot to commit the black reformatting in previous PR
| data: Dict = None, | ||
| timeout: int = None, | ||
| max_tries: int = None, | ||
| ) -> Response: |
There was a problem hiding this comment.
I need to access the response headers to get the continuation in the IoC use case
| raise ValueError(f"Stream `{name}` not found. Available streams: {list(self.name2stream)}") from None | ||
|
|
||
| def get_from_id(self, id: str) -> StreamableT: | ||
| if UUID_REGEX.match(id): |
There was a problem hiding this comment.
alternatively, you could try to parse the string as UUID: if it fails, it's not a valid uuid
| client_id: str = "feedlydev", | ||
| client_secret: str = "feedlydev", |
There was a problem hiding this comment.
doesn't seem used for now
There was a problem hiding this comment.
It's used in make_api_request to refresh the token http://github.com/feedly/python-api-client/blob/ef13f589f1437d4f291bb18c6e1ae5a94c58d0fa/feedly/api_client/session.py#L274-L274
There was a problem hiding this comment.
sorry, I thought you added these lines
Interesting, something to consider in a follow up PR
Add a IoCDownloader to gather the IoCs from a stream
FeedlyUserclass. I wanted to add support to get the stream by names but with the previous caching system it needed to be done in 4 places