Games from Sinatra

Games from Sinatra

Info

Sinatra is Tech Fusion's game catalog and asset management platform. This section covers the APIs used to access game information, marketing assets, and player history data.

Overview

The Sinatra platform serves as the central repository for all game-related data within the Tech Fusion ecosystem. It provides comprehensive information about available games, their providers, technical specifications, and marketing materials. Casino operators use these APIs to:

  • Retrieve an up-to-date catalog of available games
  • Access marketing materials for promoting games
  • Retrieve detailed game history for player activity
  • View round details for auditing and support purposes

System Architecture

Sinatra functions as a separate service within the Tech Fusion platform, requiring its own authentication flow. All requests to Sinatra APIs must include a valid JWT token obtained through the login process.

graph TD A[Casino Operator] -->|1. Login Request| B[Sinatra Authentication] B -->|2. JWT Token| A A -->|3. API Requests with JWT| C[Sinatra Services] C -->|Game Data| D[Game Catalog] C -->|Marketing Assets| E[Asset Repository] C -->|Player History| F[History Database] style A fill:#f5f5f5,stroke:#333,stroke-width:2px style B fill:#ffe6e6,stroke:#333,stroke-width:2px style C fill:#e6f7ff,stroke:#333,stroke-width:2px style D fill:#f0f0f0,stroke:#333,stroke-width:1px style E fill:#f0f0f0,stroke:#333,stroke-width:1px style F fill:#f0f0f0,stroke:#333,stroke-width:1px

Authentication Process

Before accessing any Sinatra APIs, you must authenticate and obtain a JWT token:

sequenceDiagram participant Casino as Casino Operator participant Sinatra as Sinatra Platform Casino->>Sinatra: Login Request (email, password) Sinatra->>Sinatra: Validate Credentials Sinatra->>Casino: JWT Token Response Casino->>Sinatra: API Request with JWT Header Sinatra->>Sinatra: Validate Token Sinatra->>Casino: Requested Data Note over Casino,Sinatra: Token remains valid for limited time

Authentication Prerequisites

  1. Login Credentials: You need valid Sinatra user credentials (email and password) provided by Tech Fusion during onboarding
  2. JWT Token: After successful login, the system returns a jwt-auth header containing your authentication token
  3. Request Headers: This jwt-auth token must be included in all subsequent requests to Sinatra APIs

Available Operations

The Sinatra platform provides the following API endpoints:

Operation Description Endpoint
Login User Authenticate and obtain JWT token /{version}/login/
Retrieve Available Game Providers Get list of game providers /vendors/{version}/view/available
Retrieve Available Games Get game catalog /games/{version}/view/detailed
Retrieve Game Marketing Assets Get promotional materials /games/{version}/assets/{game_id}
Retrieve Game History Get player game history /transactions/{version}/games/history
Retrieve Game History via Paginated Response Get paginated history /transactions/{version}/games/history/api
Retrieve Game History Metadata Get metadata for history /transactions/{version}/games/history/metadata
Retrieve Round Details Get specific round information /transactions/{version}/games/round/details/{casino_id}/{game_id}/{round_id}

Typical Integration Flow

A typical integration with the Sinatra platform follows this workflow:

  1. Authentication: Login to obtain JWT token
  2. Game Discovery:
    • Retrieve available game providers
    • Retrieve complete game catalog
  3. Marketing Integration:
    • Retrieve game marketing assets for website display
  4. Player History Access:
    • Retrieve game history for player activity tracking
    • Retrieve round details for dispute resolution

Implementation Best Practices

When integrating with the Sinatra APIs, follow these guidelines:

  1. Token Management:

    • Store the JWT token securely
    • Implement token refresh logic to handle expirations
    • Never expose the token to client-side code
  2. Data Caching:

    • Cache game catalog and provider data to reduce API calls
    • Implement periodic refreshes (e.g., daily) to ensure data accuracy
    • Always fetch fresh history data to ensure accuracy
  3. Error Handling:

    • Implement proper error handling for authentication failures
    • Handle API rate limits gracefully
    • Provide meaningful error messages to operators and support staff
  4. Performance Optimization:

    • Use paginated endpoints for large data sets
    • Implement efficient filtering on the client side
    • Minimize API calls during peak usage periods
Tip

When retrieving game history, use the paginated response endpoint for large datasets to improve performance and reduce memory usage.

Next Steps

Begin your integration with the Login User endpoint to obtain authentication credentials, then explore the game catalog and history endpoints based on your implementation requirements.