Move main api methods into transport-agnostic class#128
Closed
non-Jedi wants to merge 3 commits intomatrix-org:masterfrom
Closed
Move main api methods into transport-agnostic class#128non-Jedi wants to merge 3 commits intomatrix-org:masterfrom
non-Jedi wants to merge 3 commits intomatrix-org:masterfrom
Conversation
Member
|
Can one of the admins verify this patch? |
This allows easy implementation of alternative transports (e.g. websockets) in the future by subclassing MatrixApi. It also allows testing of the api without mocking requests. Signed-off-by: Adam Beckmeyer <adam_git@thebeckmeyers.xyz>
Contributor
|
I don't understand the logic behind this, requests is used in one place, we can replace it with urllib2/3 without much pain (as can anyone else needing this by patching |
Collaborator
Author
|
Some of the work I had meant to include in this PR isn't there. :/ And I'm actually slightly rethinking the way I want to do this (partially because of @pik's comment). So please hold off on looking at this until I get a chance to push another commit or two. |
Collaborator
Author
|
closing this until I get time to work on it again |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #37
I was going to start working on converting the tests over to not using requests, but I'm not sure how this we should do that keeping in mind @pik's #125. I actually kind of rushed to get this one done after seeing that because I want us to have the right architecture before we really start building out our testing.