You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
872 B
28 lines
872 B
import 'package:dating_touchme_app/model/rtc/rtc_channel_data.dart';
|
|
import 'package:dating_touchme_app/network/api_urls.dart';
|
|
import 'package:dating_touchme_app/network/response_model.dart';
|
|
import 'package:dio/dio.dart';
|
|
import 'package:retrofit/retrofit.dart';
|
|
|
|
part 'rtc_api.g.dart';
|
|
|
|
/// RTC 相关接口
|
|
@RestApi(baseUrl: '')
|
|
abstract class RtcApi {
|
|
factory RtcApi(Dio dio) = _RtcApi;
|
|
|
|
/// 创建实时音视频频道
|
|
@GET(ApiUrls.getSwRtcToken)
|
|
Future<HttpResponse<BaseResponse<RtcChannelData>>> getSwRtcToken(
|
|
@Query('channelId') String channelId,
|
|
);
|
|
|
|
/// 获取声网 RTM Token
|
|
@GET(ApiUrls.getSwRtmToken)
|
|
Future<HttpResponse<BaseResponse<RtcChannelData>>> getSwRtmToken();
|
|
|
|
/// 创建实时音视频频道(返回字符串)
|
|
@POST(ApiUrls.createRtcChannel)
|
|
Future<HttpResponse<BaseResponse<RtcChannelData>>> createRtcChannel();
|
|
}
|
|
|