This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Unify v1 and v2 REST client APIs #5226
Merged
Merged
Changes from 20 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
1531476
port everything to use r0
hawkowl 87adbc4
fix
hawkowl 622122e
fixes
hawkowl 54d20a6
fixes
hawkowl 44f3aae
fixes
hawkowl 169be22
fixes
hawkowl d91e084
fixes
hawkowl 63fe8d7
fixes
hawkowl d8afa71
Merge remote-tracking branch 'origin/develop' into hawkowl/burn-v2
hawkowl 33075f6
fix 500
hawkowl 34e0a18
fix 500
hawkowl fe089c9
fix 500
hawkowl bf1da35
make it point to the r0 url
hawkowl 5eaff91
this is supposed to be r0 as well
hawkowl 02c4420
fix missing var
hawkowl 0c046bc
add v1 url adding
hawkowl dac219b
update this copyright since this is original
hawkowl 6247f77
fix
hawkowl 76ee829
Update and rename 5226.removal to 5226.misc
hawkowl dc36d62
Merge branch 'develop' into hawkowl/burn-v2
hawkowl 796f888
remove all code duplication
hawkowl 7eadafe
Merge branch 'hawkowl/burn-v2' of ssh://github.com/matrix-org/synapse…
hawkowl f001507
Merge remote-tracking branch 'origin/develop' into hawkowl/burn-v2
hawkowl 21e2627
Merge branch 'develop' into hawkowl/burn-v2
hawkowl 12e4487
Update logout.py
hawkowl 883c7f1
bump timeout duration
hawkowl a2a4f84
Merge branch 'hawkowl/burn-v2' of ssh://github.com/matrix-org/synapse…
hawkowl 258dcba
Merge remote-tracking branch 'origin/develop' into hawkowl/burn-v2
hawkowl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The base classes for the v1 and v2_alpha REST APIs have been unified. |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2019 Matrix.org Foundation C.I.C | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from synapse.rest.client.v2_alpha._base import client_patterns as _client_patterns | ||
|
||
|
||
def client_patterns(*args, **kwargs): | ||
""" | ||
A client_patterns creator that enables v1 for APIs. | ||
""" | ||
if "v1" in kwargs: | ||
del kwargs["v1"] | ||
return _client_patterns(*args, v1=True, **kwargs) | ||
|
||
|
||
__all__ = ["client_patterns"] |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please call this something different as it does a different thing (by default) than the other client_patterns, e.g.
client_patterns_with_v1
? Or alternatively move thev2_alpha
version up here and specifically addv1=True
to the places that need it.