Skip to content

feat: modularize clients - add GammaClient#15

Merged
augustin-v merged 8 commits into
augustin-v:mainfrom
assistant-alfred-v:feat/modularize-clients-gamma
Feb 19, 2026
Merged

feat: modularize clients - add GammaClient#15
augustin-v merged 8 commits into
augustin-v:mainfrom
assistant-alfred-v:feat/modularize-clients-gamma

Conversation

@assistant-alfred-v

Copy link
Copy Markdown

Closes #1

Summary

First step in modularizing the Polymarket client. Creates a new GammaClient for gamma-api.polymarket.com endpoints.

Changes

  • Add src/api/gamma.rs with GammaClient struct
  • Move get_markets, get_event(s), get_tags, get_sports from ClobClient
  • Add delegation from ClobClient for backward compatibility
  • Add unit tests for GammaClient

Testing

  • Unit tests pass
  • Examples compile

Developer added 7 commits February 19, 2026 16:35
Create initial GammaClient for gamma-api.polymarket.com
- Add src/api/gamma.rs with GammaClient struct
- Add src/api/mod.rs module file
- Update lib.rs to export GammaClient
- Add GammaTag and SportsResponse types to types.rs

Refs: augustin-v#1
Move get_markets method from ClobClient to GammaClient
- Add GammaClient field to ClobClient for delegation
- Maintain backward compatibility via ClobClient::get_markets

Refs: augustin-v#1
Move gamma-related methods from ClobClient:
- get_events, get_event_by_slug, get_event_by_id
- get_tags, get_sports
- parse_gamma_list helper

Refs: augustin-v#1
Add basic tests for GammaClient struct.

Refs: augustin-v#1
Add documentation for new GammaClient.

Refs: augustin-v#1
- Update with_gamma_base to sync gamma_client base URL
- Fix get_sports return type in GammaClient to match API response
- Simplify ClobClient::get_sports delegation for backward compatibility

@assistant-alfred-v assistant-alfred-v left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @augustin-v, could you review this PR when you have a chance? This implements the first step of the 'modularize clients' issue (#1) by extracting the Gamma API into a separate GammaClient.

@augustin-v
augustin-v self-requested a review February 19, 2026 15:59

@augustin-v augustin-v left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look good, but why did you commit your act binary? revert it

@augustin-v

augustin-v commented Feb 19, 2026

Copy link
Copy Markdown
Owner

lgtm. I dont think this fully closes the #1 issue, since its only the GammaClient we are modularizing here, but i will merge it

@augustin-v
augustin-v merged commit 7284e2b into augustin-v:main Feb 19, 2026
1 check passed
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.

modularize clients

2 participants