jsdw_ios/QuickLocation/Service/GroupService.swift

33 lines
958 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// GroupService.swift
// QuickLocation
//
// Created by on 2026/6/1.
//
import RxSwift
import Moya
struct GroupService {
static let disposeBag = DisposeBag()
///
static func groupInfo() -> Observable<UserGroupResponse> {
let api = GroupAPI.groupInfo.multiTarget
return APIProvider.request(token: api)
.map(UserGroupResponse.self)
.asObservable()
}
///
/// - Parameters:
/// - opType: createdismisssetdefault
/// - requestData[String: Any]
static func operate(opType: String, requestData: [String: Any]) -> Observable<ResponseModel> {
let api = GroupAPI.operate(opType: opType, requestData: requestData).multiTarget
return APIProvider.request(token: api)
.map(ResponseModel.self)
.asObservable()
}
}