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.
Libraries
- reelplexi_sdk
- Official Flutter SDK for Reelplexi.