|
| 1 | +# Confluence API v2 Implementation Checklist |
| 2 | + |
| 3 | +## Project Configuration |
| 4 | + |
| 5 | +**Project:** atlassian-python-api |
| 6 | +**Target Path:** `/Users/batzel/src/github/atlassian-python-api` |
| 7 | +**API Documentation:** https://developer.atlassian.com/cloud/confluence/rest/v2/intro/ |
| 8 | + |
| 9 | +## Additional Context & Rules |
| 10 | +<!-- Add any additional information, context, or rules here --> |
| 11 | + |
| 12 | +## Implementation Progress Tracking |
| 13 | +- [ ] Phase 1: Core Structure (0% complete) |
| 14 | +- [ ] Phase 2: Core Methods (0% complete) |
| 15 | +- [ ] Phase 3: New V2 Features (0% complete) |
| 16 | +- [ ] Phase 4: Testing (0% complete) |
| 17 | +- [ ] Phase 5: Documentation (0% complete) |
| 18 | + |
| 19 | +## Phase 1: Core Structure |
| 20 | + |
| 21 | +### Version-Aware Base Class |
| 22 | +- [ ] Create/modify `ConfluenceBase` class that extends `AtlassianRestAPI` |
| 23 | +- [ ] Add API version parameter to constructor (default to v1) |
| 24 | +- [ ] Ensure proper URL handling for cloud instances |
| 25 | + |
| 26 | +### Endpoint Mapping |
| 27 | +- [ ] Create `ConfluenceEndpoints` class with V1 and V2 endpoint dictionaries |
| 28 | +- [ ] Implement endpoint mapping for all core operations |
| 29 | +- [ ] Add method to retrieve appropriate endpoint based on version |
| 30 | + |
| 31 | +### Version-Aware Pagination |
| 32 | +- [ ] Update `_get_paged` method to support both pagination methods |
| 33 | +- [ ] Implement cursor-based pagination for V2 API |
| 34 | +- [ ] Implement offset-based pagination for V1 API (maintain existing) |
| 35 | +- [ ] Handle Link header parsing for V2 API responses |
| 36 | +- [ ] Support _links.next property for pagination |
| 37 | + |
| 38 | +## Phase 2: Core Methods |
| 39 | + |
| 40 | +### Content Operations |
| 41 | +- [ ] Update page retrieval methods |
| 42 | + - [ ] `get_page_by_id` (support both v1 and v2 endpoints) |
| 43 | + - [ ] `get_pages` (support both v1 and v2 endpoints) |
| 44 | + - [ ] `get_child_pages` (support both v1 and v2 endpoints) |
| 45 | +- [ ] Update content creation methods |
| 46 | + - [ ] `create_page` (support both v1 and v2 request formats) |
| 47 | + - [ ] `update_page` (support both v1 and v2 request formats) |
| 48 | + - [ ] `delete_page` (support both v1 and v2 endpoints) |
| 49 | + |
| 50 | +### Search Functionality |
| 51 | +- [ ] Create version-aware search method |
| 52 | + - [ ] Support CQL for v1 API |
| 53 | + - [ ] Support query parameter for v2 API |
| 54 | + - [ ] Handle pagination differences |
| 55 | +- [ ] Implement content-specific search methods |
| 56 | + |
| 57 | +### Space Operations |
| 58 | +- [ ] Update space retrieval methods |
| 59 | + - [ ] `get_space` (support both v1 and v2 endpoints) |
| 60 | + - [ ] `get_all_spaces` (support both v1 and v2 endpoints) |
| 61 | +- [ ] Implement space creation/update/delete methods for both versions |
| 62 | + |
| 63 | +### Compatibility Layer |
| 64 | +- [ ] Create method name mapping between v1 and v2 |
| 65 | +- [ ] Implement `__getattr__` to handle method name compatibility |
| 66 | +- [ ] Add deprecation warnings for methods that have renamed equivalents |
| 67 | + |
| 68 | +### Factory Method |
| 69 | +- [ ] Implement `factory` static method for easy client creation |
| 70 | +- [ ] Support specifying API version in factory method |
| 71 | + |
| 72 | +## Phase 3: New V2 Features |
| 73 | + |
| 74 | +### Content Properties |
| 75 | +- [ ] Implement methods for retrieving page properties |
| 76 | +- [ ] Implement methods for creating/updating/deleting page properties |
| 77 | +- [ ] Add version-check for v2-only methods |
| 78 | + |
| 79 | +### Content Types |
| 80 | +- [ ] Add support for new content types (whiteboard, custom content) |
| 81 | +- [ ] Implement methods specific to new content types |
| 82 | +- [ ] Ensure proper error handling for v1 when using v2-only features |
| 83 | + |
| 84 | +### Labels |
| 85 | +- [ ] Implement v2 label methods |
| 86 | +- [ ] Update existing label methods to support both versions |
| 87 | + |
| 88 | +### Comments |
| 89 | +- [ ] Update comment methods to support both API versions |
| 90 | +- [ ] Implement new comment features available in v2 |
| 91 | + |
| 92 | +## Phase 4: Testing |
| 93 | + |
| 94 | +### Test Infrastructure |
| 95 | +- [ ] Create test fixtures for both v1 and v2 API |
| 96 | +- [ ] Implement mock responses for all endpoints |
| 97 | +- [ ] Add version-specific test classes |
| 98 | + |
| 99 | +### Core Functionality Tests |
| 100 | +- [ ] Test core methods with both API versions |
| 101 | +- [ ] Verify backward compatibility with existing code |
| 102 | +- [ ] Test pagination for both versions |
| 103 | + |
| 104 | +### Version-Specific Tests |
| 105 | +- [ ] Test v2-only features |
| 106 | +- [ ] Test error handling for version-specific methods |
| 107 | +- [ ] Test compatibility layer |
| 108 | + |
| 109 | +### Integration Tests |
| 110 | +- [ ] Test against real Confluence Cloud instances |
| 111 | +- [ ] Verify authentication methods for both versions |
| 112 | +- [ ] Test error handling with real API responses |
| 113 | + |
| 114 | +## Phase 5: Documentation |
| 115 | + |
| 116 | +### Code Documentation |
| 117 | +- [ ] Update docstrings for all modified/new methods |
| 118 | +- [ ] Add version information to docstrings |
| 119 | +- [ ] Document compatibility considerations |
| 120 | + |
| 121 | +### User Documentation |
| 122 | +- [ ] Update README with v2 API support information |
| 123 | +- [ ] Create examples for both v1 and v2 usage |
| 124 | +- [ ] Document version-specific features |
| 125 | + |
| 126 | +### Migration Guide |
| 127 | +- [ ] Create migration guide for users |
| 128 | +- [ ] Document breaking changes |
| 129 | +- [ ] Provide code examples for migrating from v1 to v2 |
| 130 | + |
| 131 | +## Additional Tasks |
| 132 | + |
| 133 | +### Error Handling |
| 134 | +- [ ] Update error handling for v2 API |
| 135 | +- [ ] Map error codes between v1 and v2 |
| 136 | +- [ ] Ensure consistent error messages |
| 137 | + |
| 138 | +### Authentication |
| 139 | +- [ ] Support both basic auth and OAuth/JWT for v2 |
| 140 | +- [ ] Update authentication handling for cloud instances |
| 141 | +- [ ] Document authentication requirements for both versions |
| 142 | + |
| 143 | +### Performance Optimizations |
| 144 | +- [ ] Identify and implement v2-specific performance improvements |
| 145 | +- [ ] Optimize pagination handling |
| 146 | +- [ ] Add caching where appropriate |
0 commit comments