Add comprehensive RDoc documentation across entire codebase#100
Merged
Add comprehensive RDoc documentation across entire codebase#100
Conversation
This commit adds complete RDoc documentation to the strava-ruby-client library, achieving 100% documentation coverage across all classes, modules, methods, and properties. ## API Endpoints Documentation ### Module-Level Documentation Added - Clubs: Club members, activities, and administrators - Streams: Time-series activity data (altitude, cadence, heartrate, etc.) - Routes: Route planning and export (GPX/TCX) - Uploads: Activity file upload and processing - SegmentEfforts: Athlete segment attempt tracking - Gears: Equipment (bikes/shoes) management - OAuth: Token deauthorization ### Method Parameter Documentation Fixed Fixed 18 methods with id_or_options parameters to correctly document: - @param id_or_options [String, Integer, Hash] with proper type signatures - Added examples showing both calling patterns (ID as arg vs. in hash) - Affected endpoints: Clubs, Streams, Routes, Uploads, SegmentEfforts, Gears, Segments ### Enhanced Method Documentation - starred_segments, segment, star_segment: Added @return, @example, @yield tags - deauthorize: Added complete @param, @return, @example documentation ## Core Infrastructure Documentation ### Web Layer - Web::Client: Base client class with full method documentation - Web::Connection: HTTP connection management and Faraday configuration - Web::Request: GET/POST/PUT/DELETE methods with @param/@return tags - Web::Response: Response wrapping with method_missing documentation - RaiseResponseError: Middleware error handling with status code mapping ### Error Classes - Fault: Base error class with message/headers/errors accessors - RatelimitError: Rate limit errors with @see links to documentation - UploadError: Upload processing errors with status information ### Configuration Modules - Api::Config: API client configuration with examples - Web::Config: HTTP settings (proxy, SSL, timeouts) - OAuth::Config: OAuth credentials configuration - Webhooks::Config: Webhook subscription configuration - All configs now have configure/config class methods documented ### Utility Classes - Logger: Default logger with customization examples - DeepCopyable: Deep copy mixin with usage examples - Pagination: Collection iteration with method_missing delegation ## Model Documentation ### Properties Documented (221+ total) Added @return tags with type information and descriptions for all properties in: **Detailed Models:** - DetailedActivity (53 properties): All activity metrics, flags, and relationships - DetailedAthlete (30 properties): Complete athlete profile information - DetailedSegment (29 properties): Segment location, elevation, and statistics **Summary Models:** - SummaryActivity (51 properties): Essential activity information - SummaryAthlete (14 properties): Basic athlete profile - Lap (24 properties): Lap metrics and timing - Route (20 properties): Route planning information **Other Models:** - Comment (5 undocumented properties): Reactions, mentions metadata - Subscription: Webhook subscription details ### Undocumented Properties Marked All properties not in official Strava API documentation marked with: - @note Undocumented in official API - Clear descriptions of observed behavior - Examples: visibility, location data, heart rate options, leaderboard settings ## Documentation Standards Applied All documentation follows RDoc conventions: - @param with types and descriptions - @option for hash parameters - @return with return types - @yield for block parameters - @example with practical usage - @see for cross-references to related classes and Strava API docs - @note for unofficial/undocumented features - @api private for internal methods - @raise for exception documentation ## Files Modified 102 files updated with comprehensive RDoc documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
This PR adds complete RDoc documentation to the strava-ruby-client library, achieving 100% documentation coverage across all classes, modules, methods, and properties.
Key Improvements
id_or_optionsparameters to correctly document both calling patterns@note Undocumented in official APIDocumentation Standards
All documentation follows RDoc conventions with:
@paramwith types and descriptions@optionfor hash parameters@returnwith return types@yieldfor block parameters@examplewith practical usage@seefor cross-references@notefor unofficial features@api privatefor internal methodsFiles Modified
102 files updated with 4,474 insertions and 264 deletions
🤖 Generated with Claude Code