Skip to content

Conversation

@dblock
Copy link
Owner

@dblock dblock commented Oct 27, 2025

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

  • API Endpoints: Complete documentation for all endpoint modules (Clubs, Streams, Routes, Uploads, SegmentEfforts, Gears, OAuth, Segments)
  • Parameter Documentation Fix: Fixed 18 methods with id_or_options parameters to correctly document both calling patterns
  • Core Infrastructure: Full documentation for Web layer (Client, Connection, Request, Response), error classes, configuration modules, and utilities
  • Model Properties: 221+ properties documented across DetailedActivity, DetailedAthlete, DetailedSegment, SummaryActivity, SummaryAthlete, Lap, Route, and more
  • Undocumented Properties: All properties not in official Strava API docs marked with @note Undocumented in official API

Documentation Standards

All documentation follows RDoc conventions with:

  • @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
  • @note for unofficial features
  • @api private for internal methods

Files Modified

102 files updated with 4,474 insertions and 264 deletions

🤖 Generated with Claude Code

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>
@dblock dblock merged commit ca6ae63 into master Oct 27, 2025
17 checks passed
@dblock dblock deleted the claude-doc branch October 27, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants