Introduction to Moitribe PHP SDK
The Moitribe PHP SDK provides a comprehensive interface for integrating your PHP applications with the Moitribe gaming platform. This SDK enables you to add tournaments, leaderboards, social features, and player management to your games with minimal effort.
Key Features
Tournament Management
- Create and manage competitive tournaments
- Support for both individual and group tournaments
- Score submission and reward claiming
- Tournament history tracking
Leaderboards
- Real-time leaderboard updates
- Multiple leaderboard support per game
- Score ranking and player statistics
Player Profiles
- User authentication and profile management
- Social features with friends lists
- Player data and statistics
Social Feeds
- Player activity feeds
- Comment and interaction support
- Social engagement features
SDK Architecture
The SDK is built around a modular architecture with specialized handlers for different features:
MoitribeApi- Main entry point and orchestrationProfileRequests- Player authentication and profile managementTournamentRequests- Individual tournament operationsGroupTournamentRequests- Group tournament operationsLeaderboardRequests- Leaderboard managementFeedRequests- Social feed operations
Requirements
- PHP 7.2 or higher (compatible with PHP 8.x)
- Composer for dependency management
- Valid Moitribe Game ID and Channel ID
Quick Overview
use Veniso\Moitribe\Sdk\modules\classes\MoitribeApi;
// Initialize the SDK
$moitribe = new MoitribeApi([
'gameid' => 'your-game-id',
'channelid' => 'your-channel-id',
'playerid' => 'player-123',
'locale' => 'en-US'
]);
// Get available tournaments
$tournaments = $moitribe->tournRequestsHandler->getTournaments('your-game-id');
// Join a tournament
$moitribe->tournRequestsHandler->joinTournament('your-game-id', 'tournament-123');
// Submit a score
$moitribe->tournRequestsHandler->submitTournamentScore(
'your-game-id',
'tournament-123',
1500
);
What's Next?
- Installation Guide - Get the SDK installed in your project
- Getting Started - Your first integration steps
- Authentication - Player login and profile management
- Tournaments - Tournament system integration
- Leaderboards - Leaderboard implementation
Support
For detailed API documentation, examples, and troubleshooting, explore the specific sections in this documentation or visit the Moitribe developer portal.