Download the PHP package jordanpartridge/strava-client without Composer
On this page you can find all versions of the php package jordanpartridge/strava-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jordanpartridge/strava-client
More information about jordanpartridge/strava-client
Files in jordanpartridge/strava-client
Package strava-client
Short Description This is my package strava-client
License MIT
Homepage https://github.com/jordanpartridge/strava-client
Informations about the package strava-client
Laravel Strava Client
A thoughtfully crafted Strava API integration for Laravel developers who value clean, maintainable code. Stop wrestling with OAuth and start building features that matter.
This package reflects my belief that developer tools should be both powerful and pleasant to use. Built with Laravel best practices and a focus on developer experience.
โจ Why Choose This Package?
- ๐ True Plug & Play: OAuth flow that just works, because you shouldn't need a degree in authentication
- ๐ Intelligent Token Handling: Automatic refresh handling - set it and forget it
- ๐โโ๏ธ Activity Ready: Fetch athlete activities with eloquent simplicity
- ๐ Security First: Encrypted token storage and robust error handling out of the box
- ๐ฏ Laravel Native: Built the way Laravel packages should be
- ๐ฆ Production Ready: Scales from personal projects to multi-user applications
๐ Quick Start
1. Install the package
2. Run the installer
3. Set up your User model
Add the HasStravaTokens
trait and HasStravaToken
interface to your User model:
4. Add your Strava credentials to .env
5. Connect to Strava
Visit /strava/authorize
as an authenticated user to start the OAuth flow.
6. Start building!
๐ Behind the Scenes
The package handles all the complex OAuth interactions so you don't have to:
- Secure authorization initiation via
/strava/authorize
- Automated OAuth callback processing
- Encrypted token storage
- Automatic token refresh handling
- Clean user token associations
๐ง Configuration
Fine-tune the package behavior through config/strava-client.php
:
โก๏ธ Professional Error Handling
Handle API interactions with confidence using custom exception types:
๐ Automatic Retry Logic
The package intelligently handles temporary service outages:
- 503 Service Unavailable: Automatically retries up to 3 times with exponential backoff (1s, 2s, 4s delays)
- Token Expiration: Automatically refreshes expired tokens and retries the original request
- Other Server Errors: Throws
StravaServiceException
immediately for proper error handling
This means your application stays resilient even when Strava experiences temporary issues.
Production Considerations
When handling 503 errors in production, consider:
-
Queue Jobs: For non-critical operations, queue jobs with delay:
-
User Feedback: Inform users about temporary issues:
- Monitoring: Log retry attempts for visibility into API health
๐งช Quality Assurance
Run the test suite:
๐ Compatibility
This package supports:
- PHP 8.2 or higher
- Laravel 10.x and 11.x
- Laravel 12.x (in development)
๐ License
The MIT License (MIT). Please see License File for more information.
๐ค About the Author
Hi! I'm Jordan Partridge, and I build packages like this with a focus on developer experience and clean, maintainable code. If you appreciate the attention to detail in this package and my approach to solving problems, I'm available for hire on Laravel and PHP projects.
Visit my website to learn more about my work and how we might collaborate on your next project.
Need help with this package or want to discuss a project? Reach me at [email protected].
โค๏ธ Support
If you find this package helpful, please consider:
- Starring the repo on GitHub
- Sharing it with other developers
- Checking out my other packages
Made with โฅ๏ธ in Laravel by a developer who cares about your experience
All versions of strava-client with dependencies
illuminate/contracts Version ^10.0||^11.0
saloonphp/saloon Version ^3.0
spatie/laravel-package-tools Version ^1.16