25 lines
613 B
Dart
25 lines
613 B
Dart
import 'package:http/http.dart' as http;
|
|
import 'package:http/http.dart';
|
|
|
|
import '../../../apiParams.dart';
|
|
import '../talkApi.dart';
|
|
import 'sendMessageParams.dart';
|
|
|
|
class SendMessage extends TalkApi {
|
|
String chatToken;
|
|
SendMessage(this.chatToken, SendMessageParams params) : super("v1/chat/$chatToken", params);
|
|
|
|
@override
|
|
assemble(String raw) {
|
|
return null;
|
|
}
|
|
|
|
@override
|
|
Future<Response>? request(Uri uri, ApiParams? body, Map<String, String>? headers) {
|
|
if(body is SendMessageParams) {
|
|
return http.post(uri, headers: headers, body: body.toJson());
|
|
}
|
|
return null;
|
|
}
|
|
|
|
} |