Download the PHP package bitmicrosys/sharpsports-php without Composer
On this page you can find all versions of the php package bitmicrosys/sharpsports-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bitmicrosys/sharpsports-php
More information about bitmicrosys/sharpsports-php
Files in bitmicrosys/sharpsports-php
Package sharpsports-php
Short Description PHP Laravel SDK for SharpSports API
License MIT
Informations about the package sharpsports-php
SharpSports PHP Laravel SDK (Unofficial)
Hey there! đ This is an unofficial PHP/Laravel SDK for the SharpSports API. Threw this together in a few hours because I needed it for a project. It works pretty well, but you know... it's not perfect.
â ī¸ Disclaimer
This is NOT an official SharpSports product. I'm just some dev who needed to integrate their API. Use at your own risk! If something breaks, don't blame me (or SharpSports). If you find bugs, just open an issue or better yet, submit a PR!
Features
- â Covers most (all?) SharpSports API endpoints
- â Laravel service provider and facade (fancy!)
- â Model classes that make sense
- â Handles those weird API responses pretty well
- â Error handling that actually works
- â Probably won't break your app (no promises though)
Installation
Install the package via Composer:
Laravel Auto-Discovery
The package supports Laravel's auto-discovery feature. If you're using Laravel 5.5+, the service provider and facade will be automatically registered.
Manual Registration (Laravel < 5.5)
Add the service provider to your config/app.php:
Add the facade to your config/app.php:
Configuration
Publish the configuration file:
Add your SharpSports API key to your .env file:
Usage
Basic Usage
Using Laravel Facade
Using Dependency Injection
Complete API Coverage
The SharpSports PHP SDK provides comprehensive coverage of all SharpSports API endpoints:
Books
Bettors
Bettor Accounts
Bet Slips
Context Operations
Events, Markets, Sports, etc.
Webhooks
Model Classes
The SDK includes model classes for type-safe responses:
Available models:
BookBettorBettorAccountBetSlip
Error Handling
The SDK throws SharpsportsException for API errors:
Configuration Options
You can customize the HTTP client by passing options to the constructor:
All Available Methods
Complete API Coverage
The SDK provides complete coverage of all SharpSports API objects:
- đ Books - Sportsbook information and status
- đ Articles - AI-generated SEO articles
- đ BookRegions - Regional sportsbook availability
- đ¤ Bettors - User accounts and profiles
- đą BettorAccounts - Connected sportsbook accounts
- đ° BetSlips - Betting history and slips
- đ RefreshResponses - Account refresh status
- đī¸ Events - Sports events and games
- đ Markets - Betting markets
- đˇī¸ MarketSelections - Market options
- đ MarketOffers - Available offers
- đī¸ Prices - Odds and pricing
- đ Sports - Available sports
- đī¸ Leagues - Sports leagues
- đŊ Teams - Sports teams
- âšī¸ââī¸ Players - Player information
- đ Segments - Market segments
- đ§Ž Metrics - Performance metrics
- đ Context - Bet placement context
- đĒ Webhooks - Event subscriptions
Each service provides standard methods like list(), get(), and specialized methods for specific functionality.
Error Handling
Contributing
Found a bug? Cool, fix it and send a PR. Want to add something? Go for it! This is open source, baby! đ
Known Issues
- Price API returns different response structures depending on parameters (single object vs array). Yeah, it's weird, but we handle it.
- Some endpoints need specific parameters or they'll yell at you
- Haven't tested everything extensively (who has time for that?)
- Probably other stuff I haven't found yet
License
This package is open-sourced software licensed under the MIT license. See the license file for the full "I'm not responsible for anything" legal text.
Support
Having issues? Open a GitHub issue. Want to chat? Sorry, I'm probably coding. But seriously, just open an issue and I'll try to help when I can.
Credits
- SharpSports for having an API (even though their docs could be better đ )
- Coffee for keeping me awake while coding this
- Stack Overflow for... you know why
API Documentation
For the official API docs (good luck understanding them sometimes), visit SharpSports API Reference.
Remember: This is unofficial. If SharpSports changes their API and this breaks, well... ¯_(ã)_/¯
All versions of sharpsports-php with dependencies
guzzlehttp/guzzle Version ^7.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0