Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kjohnson/sportspress-api
A small, incomplete, API for the SportsPress WordPress plugin.
https://github.com/kjohnson/sportspress-api
Last synced: 20 days ago
JSON representation
A small, incomplete, API for the SportsPress WordPress plugin.
- Host: GitHub
- URL: https://github.com/kjohnson/sportspress-api
- Owner: kjohnson
- License: gpl-2.0
- Created: 2015-08-15T21:46:53.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-15T21:54:29.000Z (about 9 years ago)
- Last Synced: 2023-02-28T09:03:23.627Z (over 1 year ago)
- Language: PHP
- Size: 250 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SportsPress API
A small, incomplete, API for the SportsPress WordPress plugin.
## Example Usage
Get Games by Venue:
```php
get_events_by_venue( $venue_id );
```Get Games that are scheduled for today:
```php
->today()
```Include the teams for each game:
```php
->with( 'teams' )
```Include the teams and results for each game:
```php
->with( [ 'teams', 'results' ] )
```Get Games by Venue, for today only, include teams and results:
```php
$events = SP_API()->with( [ 'teams', 'results' ] )->today()->get_events_by_venue( $venue_id );
```