[pull] master from atlassian-api:master - #31
Merged
Conversation
…plural endpoint (#1638) * [Confluence] Add get_all_spaces and switch Cloud space methods to v2 plural endpoint Fixes #1560. After commit 63e744f the legacy `get_all_spaces` was removed entirely from the Cloud module — `Confluence("https://api.atlassian.com/ex/confluence/...")` routes to the new `Cloud` class, which only has `get_spaces` (singular path). Calling `c.get_all_spaces()` now raises AttributeError; users with OAuth/PAT tokens routed through the API gateway lose the paginated enumeration they had under the old v1 path. Cloud's space methods also use the singular `space` path (e.g. `self.get("space")`) while `api_root="wiki/api/v2"`, so the constructed URL `/wiki/api/v2/space` doesn't match the documented v2 endpoint `/wiki/api/v2/spaces` (plural — see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space/). This change: - Adds `Cloud.get_all_spaces()` returning a paginated generator over `_get_paged("spaces")`, restoring the back-compat surface and using v2. - Switches `get_spaces`, `get_space`, `create_space`, `update_space`, `delete_space`, `get_space_content` from `space[/...]` to `spaces[/...]`. - Updates the existing space mock-tests to assert the v2 plural path and adds a pagination test for `get_all_spaces`. The Server implementation is unchanged (still uses v1 `space` paths correctly, since Server is not affected by gateway routing). Signed-off-by: 1fanwang <1fannnw@gmail.com> * [Confluence] Fix multi-line docstrings in cloud space methods to D213 (summary on second line) Signed-off-by: 1fanwang <1fannnw@gmail.com> --------- Signed-off-by: 1fanwang <1fannnw@gmail.com>
The API endpoint uses hyphens (component-groups) not underscores (component_groups). See: https://developer.statuspage.io/#operation/getPagesPageIdComponentGroups
…ck formatting to atlassian/, examples/, tests/) (#1625)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )