Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devsdocs/dart_api_collection
Dart API Wrappers for known media services
https://github.com/devsdocs/dart_api_collection
api dart doodstream gofile mixdrop streamtape streamwish wrappers
Last synced: 1 day ago
JSON representation
Dart API Wrappers for known media services
- Host: GitHub
- URL: https://github.com/devsdocs/dart_api_collection
- Owner: devsdocs
- License: mit
- Created: 2023-08-09T20:13:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-06T18:23:10.000Z (about 1 year ago)
- Last Synced: 2024-11-18T00:43:14.269Z (2 months ago)
- Topics: api, dart, doodstream, gofile, mixdrop, streamtape, streamwish, wrappers
- Language: Dart
- Homepage:
- Size: 168 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Dart wrappers for known media services on internet
### ⚠️ Not all error catched (yet), please open an issue or PR, if any error exist
# Services available### - [Doodstream](https://doodstream.com)
```dart
void main() async {
final key = Platform.environment['DOODSTREAM_API_KEY']!;
final doodstreamClient = DoodstreamApi(key);
final getAccount = await doodstreamClient.accountInfo();
print(getAccount?.toJson());
}
```### - [Streamtape](https://streamtape.com)
```dart
void main() async {
final user = Platform.environment['STREAMTAPE_USER']!;
final key = Platform.environment['STREAMTAPE_KEY']!;
final streamtapeClient = StreamtapeApi(user, key);
final getAccount = await streamtapeClient.accountInfo();
print(getAccount?.toJson());
}
```### - [Mixdrop](https://mixdrop.co)
```dart
void main() async {
final user = Platform.environment['MIXDROP_EMAIL']!;
final key = Platform.environment['MIXDROP_KEY']!;
final mixdropClient = MixdropApi(user, key);
final listFolder = await mixdropClient.folderList();
print(listFolder?.toJson());
}
```### - [Gofile](https://gofile.io)
```dart
void main() async {
final token = Platform.environment['GOFILE_TOKEN']!;
final gofileClient = GofileApi(token);
final getAccount = await gofileClient.accountInfo();
print(getAccount?.toJson());
}```
### Listening to Upload/Download progress
- To listen for upload/download task, just add code below to your app```dart
transferProgress.stream.listen((e) => print(e));
```
- You can also filter specific upload/download task```dart
import 'dart:io';
import 'package:dart_api_collection/dart_api_collection.dart';void main() async {
ApiConfig.logConfig
..enableLog = true
..showResponseHeader = false; // Add log for easy debuging
final file = File('video.mp4');
final id = await file.id; // Extension on dart:io File, exported by this package/// Filter by file ID
transferProgress.stream.where((event) => event.id == id).listen((e) => print(e));
final gofileClient = GofileApi(); // Gofile provide free upload without API keyfinal result = await gofileClient.uploadFile(file);
print(result?.toJson());
}
```### Get raw JSON String as result instead of prebuild model
```dart
void main()async{
ApiConfig.logConfig
..enableLog = true
..showResponseHeader = false;
final key = Platform.environment['DOODSTREAM_API_KEY']!;
final doodstreamClient = DoodstreamApi(key);
final getAccount = await doodstreamClient.rawApi.accountInfo(); // Using rawApi directive
print(getAccount); // Print a JSON string
}
```### - TODO List:
- [x] [Doodstream](https://doodstream.com)
- [x] [Streamtape](https://streamtape.com)
- [x] [Mixdrop](https://mixdrop.co)
- [x] [Gofile](https://gofile.io)
- [ ] [Streamwish](https://streamwish.com)