reelplexi_sdk 1.0.0
reelplexi_sdk: ^1.0.0 copied to clipboard
Official Flutter SDK for Reelplexi — stream African movies and TV series with a single API key. Includes a full API client and a plug-and-play ReelplexiPlayer widget.
Reelplexi Flutter SDK #
Official Flutter SDK for Reelplexi — stream African movies and TV series inside your Flutter app with a single API key.
Features #
- 🎬 Movies API — list, detail, stream, trailers, ratings, VJ versions, related content
- 📺 TV Series API — list, detail, seasons, episodes, stream, ratings, related content
- 🔍 Search & Discovery — full-text search, filters, trending, latest, genres
- ▶️
ReelplexiPlayerwidget — drop-in player with loading/error states and automatic token-expiry retry - 🔒 Automatic token refresh —
StreamTokenExpiredExceptionis caught and retried silently - 🧪 Fully testable — injectable
http.Clientfor mocking in unit tests
Installation #
Add to your pubspec.yaml:
dependencies:
reelplexi_sdk: ^1.0.0
Then run:
flutter pub get
Quick start #
1. Initialise #
Call Reelplexi.init once at app startup — typically in main():
import 'package:reelplexi_sdk/reelplexi_sdk.dart';
void main() {
Reelplexi.init(apiKey: 'sk_live_YOUR_KEY_HERE');
runApp(const MyApp());
}
2. Use the API client #
// List movies
final movies = await Reelplexi.client.movies.list(genre: 'Action', perPage: 10);
// Get a single movie
final movie = await Reelplexi.client.movies.get(42);
// Fetch the stream URL
final stream = await Reelplexi.client.movies.stream(42);
print(stream.streamUrl); // https://cdn.reelplexi.com/...
// Search
final results = await Reelplexi.client.content.searchMovies(q: 'Kataata');
// Trending
final trending = await Reelplexi.client.content.trendingMovies();
3. Drop in the player widget #
// Movie
AspectRatio(
aspectRatio: 16 / 9,
child: ReelplexiPlayer.movie(movieId: 42),
)
// Episode
AspectRatio(
aspectRatio: 16 / 9,
child: ReelplexiPlayer.episode(
seriesId: 7,
seasonNumber: 2,
episodeNumber: 5,
),
)
API Reference #
Movies #
| Method | Description |
|---|---|
movies.list(...) |
Paginated movie list with filters |
movies.get(id) |
Full movie detail |
movies.stream(id) |
Signed stream URL |
movies.rating(id) |
Movie rating (DB + TMDB) |
movies.vjVersions(id) |
All VJ versions of same title |
movies.relatedByGenre(id) |
Related movies by genre |
movies.relatedByVj(id) |
Related movies by same VJ |
TV Series #
| Method | Description |
|---|---|
series.list(...) |
Paginated series list with filters |
series.get(id) |
Full series detail with seasons |
series.episodes(id, season) |
Episodes for a season |
series.stream(seriesId, season, episode) |
Signed episode stream URL |
series.rating(id) |
Series rating |
series.vjVersions(id) |
All VJ versions |
series.relatedByGenre(id) |
Related series by genre |
series.relatedByVj(id) |
Related series by same VJ |
Content #
| Method | Description |
|---|---|
content.search(q, ...) |
Search movies + series |
content.searchMovies(q, ...) |
Search movies only |
content.searchSeries(q, ...) |
Search series only |
content.latest() |
Latest additions |
content.trending() |
Trending mixed |
content.trendingMovies() |
Trending movies |
content.trendingSeries() |
Trending series |
content.genres() |
All genre names |
Error handling #
import 'package:reelplexi_sdk/reelplexi_sdk.dart';
try {
final stream = await Reelplexi.client.movies.stream(movieId);
} on StreamTokenExpiredException {
// Token expired (HTTP 410) — re-request silently
final stream = await Reelplexi.client.movies.stream(movieId);
} on ReelplexiException catch (e) {
print('${e.statusCode} ${e.code}: ${e.message}');
}
Running tests #
flutter test
Changelog #
See CHANGELOG.md.
License #
MIT — see LICENSE.