Skip to content

v2.1.0 - Interactive API Test Command

Choose a tag to compare

@AustinW AustinW released this 01 Feb 07:20
· 15 commits to main since this release

What's New

New Laravel Artisan Command: usagym:test

A comprehensive, interactive command to help users test their USA Gymnastics API connection.

Usage

# Interactive mode (recommended)
php artisan usagym:test

# With sanction ID pre-specified
php artisan usagym:test --sanction=58025

# Skip sanction tests
php artisan usagym:test --skip-sanction

Features

  • Credential Management: Checks for configured credentials in .env, prompts interactively if missing
  • Authentication Test: Validates API credentials against the /test endpoint
  • Disciplines Test: Fetches and displays all disciplines in a formatted table
  • Sanction Endpoint Tests (when sanction ID provided):
    • Club reservations with sample data display
    • Athlete reservations with sample athletes shown
    • Coach reservations
    • Judge reservations
    • Group reservations (for Rhythmic, Acro, T&T, GFA)
  • Optional Verification Test: Verify a specific athlete by member ID
  • Summary Report: Final pass/fail status for all tests with colored output

Example Output

USA Gymnastics API Connection Test
This command will test your API connection by reaching out to various endpoints.

Using credentials from configuration (username: your-username)

Testing API credentials...
Authentication successful!

Fetching disciplines...
Retrieved 6 disciplines:
┌──────┬─────────────────────┐
│ Code │ Name                │
├──────┼─────────────────────┤
│ WAG  │ Women's Artistic    │
│ MAG  │ Men's Artistic      │
│ ...  │ ...                 │
└──────┴─────────────────────┘

Test Summary
┌─────────────────────┬────────┬─────────────────────────┐
│ Test                │ Status │ Details                 │
├─────────────────────┼────────┼─────────────────────────┤
│ Authentication      │ PASS   │ Credentials are valid   │
│ Disciplines         │ PASS   │ Retrieved 6 disciplines │
│ ...                 │ ...    │ ...                     │
└─────────────────────┴────────┴─────────────────────────┘

All 7 tests passed!

Full Changelog: v2.0.0...v2.1.0