48 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Swift
		
	
	
	
	
	
//
 | 
						|
//  CharacterDetailGalleryRepository.swift
 | 
						|
//  SodaLive
 | 
						|
//
 | 
						|
//  Created by klaus on 9/2/25.
 | 
						|
//
 | 
						|
 | 
						|
import Foundation
 | 
						|
import CombineMoya
 | 
						|
import Combine
 | 
						|
import Moya
 | 
						|
 | 
						|
final class CharacterDetailGalleryRepository {
 | 
						|
    private let characterApi = MoyaProvider<CharacterApi>()
 | 
						|
    
 | 
						|
    func getCharacterImageList(
 | 
						|
        characterId: Int,
 | 
						|
        page: Int,
 | 
						|
        size: Int = 20
 | 
						|
    ) -> AnyPublisher<Response, MoyaError> {
 | 
						|
        return characterApi.requestPublisher(
 | 
						|
            .getCharacterImageList(
 | 
						|
                characterId: characterId,
 | 
						|
                page: page,
 | 
						|
                size: size
 | 
						|
            )
 | 
						|
        )
 | 
						|
    }
 | 
						|
    
 | 
						|
    func getMyCharacterImageList(
 | 
						|
        characterId: Int64,
 | 
						|
        page: Int,
 | 
						|
        size: Int = 20
 | 
						|
    ) -> AnyPublisher<Response, MoyaError> {
 | 
						|
        return characterApi.requestPublisher(
 | 
						|
            .getMyCharacterImageList(
 | 
						|
                characterId: characterId,
 | 
						|
                page: page,
 | 
						|
                size: size
 | 
						|
            )
 | 
						|
        )
 | 
						|
    }
 | 
						|
    
 | 
						|
    func purchaseCharacterImage(imageId: Int) -> AnyPublisher<Response, MoyaError> {
 | 
						|
        return characterApi.requestPublisher(.purchaseCharacterImage(imageId: imageId))
 | 
						|
    }
 | 
						|
}
 |