This directory contains comprehensive examples demonstrating how to use the FastPix Ruby SDK for various API operations.
Before running these samples, ensure you have:
- Ruby 3.2+ installed
- FastPix API credentials (username and password)
- Internet connection
-
Install the FastPix Ruby SDK:
gem install fastpixapi
-
Set your credentials as environment variables:
export FASTPIX_USERNAME="your_username_here" export FASTPIX_PASSWORD="your_password_here"
-
Run any sample:
ruby samples/basic_usage.rb
basic_usage.rb- Basic SDK setup and authenticationerror_handling.rb- Comprehensive error handling examplesconfiguration.rb- SDK configuration options
media_upload.rb- Upload media from URL and direct uploadmedia_management.rb- List, get, update, and delete mediamedia_tracks.rb- Add and manage media tracks (audio/subtitles)
live_streaming.rb- Create and manage live streamslive_playback.rb- Manage live stream playback IDssimulcast.rb- Simulcast streams to external platforms
playback_ids.rb- Create and manage playback IDs for mediaplaylist_management.rb- Create and manage playlists
analytics.rb- Video analytics and performance trackingmetrics.rb- Metrics and data insights
signing_keys.rb- Manage cryptographic signing keysdrm_configuration.rb- DRM configuration management
ai_features.rb- In-video AI processing features
Each sample is self-contained and can be run independently:
# Run a specific sample
ruby samples/media_upload.rb
# Run all samples (if you have a runner script)
ruby samples/run_all_samples.rb- Replace placeholder credentials with your actual FastPix credentials
- Some operations may require specific data to be available in your FastPix account
- Error handling is included in all samples to demonstrate proper SDK usage
- Samples include both success and error scenarios
If you encounter issues:
- Verify your credentials are correct
- Check your internet connection
- Ensure you're using Ruby 3.2+
- Check the FastPix API documentation for any service-specific requirements
For additional help:
- Check the main SDK documentation
- Visit the FastPix API documentation
- Review the error messages for specific guidance