Controller

public class Controller

This is the main entrance point for the API SDK. By Calling the init() Method of this class, we will able to use all the API Controllers.

  • Indicates the initialiser

    Declaration

    Swift

    public init()
  • Undocumented

    Declaration

    Swift

    public var remaing:String = ""
  • Undocumented

    Declaration

    Swift

    public var isDownloading:Int = 0
  • variable for base Url

    Declaration

    Swift

    open var baseUrl = "https://www.muvi.com/rest/"
  • Offlibe background handler

    Declaration

    Swift

    public var backgroundSessionCompletionHandler : (() -> Void)?
  • use for offline contentplaying or not

    Declaration

    Swift

    public var isComingFromOffline:Bool = false
  • AsyncTask For SDKInitializer and getting the Keyhash.

    • keyhashinputModel: KeyHashInputModel
    • postCompleted: KeyModel

    Declaration

    Swift

    public func getHashKey(_ keyhashinputModel:KeyHashInputModel, postCompleted : @escaping (_ msg:KeyModel) -> ()) -> ()

    Parameters

    keyhashinputModel

    KeyHashInputModel

    postCompleted

    KeyModel

  • This method to get the Feature availability by the CMS

    • isRegistrationEnabledInputModel: IsRegistrationEnabledInputModel
    • postCompleted: IsRegistrationEnabledOutputModel

    Declaration

    Swift

    open func isRegistrationEnabledAsynTask(_ isRegistrationEnabledInputModel:IsRegistrationEnabledInputModel, postCompleted : @escaping (_ msg:IsRegistrationEnabledOutputModel) -> ()) -> ()

    Parameters

    isRegistrationEnabledInputModel

    IsRegistrationEnabledInputModel

    postCompleted

    IsRegistrationEnabledOutputModel

  • This method to get Feature Content details.

    • feautreContentInput: FeatureContentInputModel
    • postCompleted: FeatureContentOutputModel

    Declaration

    Swift

    open func getFeatureContentAsynTask(_ feautreContentInput : FeatureContentInputModel, postCompleted : @escaping (_ msg: [FeatureContentOutputModel]) -> ())

    Parameters

    feautreContentInput

    FeatureContentInputModel

    postCompleted

    FeatureContentOutputModel

  • AsynTask for getting content List

    • contentListInput: ContentListInput
    • postCompleted: ContentListOutput

    Declaration

    Swift

    open func getContentListAsynTask(_ contentListInput : ContentListInput, postCompleted : @escaping (_ msg: [ContentListOutput]) -> ())
  • This method gives all the important content about movie/series such as story, poster, Release Date etc. This method tells the user all the necessary things that user is looking for like Video Duration, whether the content is free or paid, banner, rating, reviews etc.

    • contentDetailsInput: ContentDetailsInput
    • postCompleted: ContentDetailsOutput

    Declaration

    Swift

    open func getContentDetailsAsynTask(_ contentDetailsInput : ContentDetailsInput,postCompleted : @escaping (_ msg: [ContentDetailsOutput]) -> ()) -> ()
  • This method loads the menu list.

    • menuListInput: MenuListInput
    • postCompleted: MenuListArray , FootMenuListArray

    Declaration

    Swift

    open func getMenuListAsync(_ menuListInput:MenuListInput, postCompleted : @escaping (_ msg:[MenuListArray], _ msg1:[FootMenuListArray],_ msg2:[ChildMenuArray]) -> ()) -> ()

    Parameters

    menuListInput

    MenuListInput

    postCompleted

    MenuListArray , FootMenuListArray

  • This method gives the list of the genere to the users. Users can choose their prefer genere among the list of generes.

    • genreListInput: GenreListInput
    • postCompleted: GenreListOutput

    Declaration

    Swift

    open func getGenreListAsynctask(_ genreListInput:GenreListInput, postCompleted : @escaping (_ msg:[GenreListOutput]) -> ()) -> ()

    Parameters

    genreListInput

    GenreListInput

    postCompleted

    GenreListOutput

  • This method allow user to successfully login using their email and password.

    • loginInput: LoginInput
    • postCompleted: LoginOutput

    Declaration

    Swift

    open func loginAsynTask(_ loginInput:LoginInput , postCompleted : @escaping (_ msg:LoginOutput) -> ()) -> ()
  • This method shows the profile detail of the user.

    • params: GetUserProfileInput
    • postCompleted: GetUserProfileOutput

    Declaration

    Swift

    open func getUserProfileAsynctask(_ params : GetUserProfileInput, postCompleted : @escaping (_ msg:GetUserProfileOutput) -> ())

    Parameters

    params

    GetUserProfileInput

    postCompleted

    GetUserProfileOutput

  • This method allow users to update their profile details whenever needed.

    • params: UpdateUserProfileInput
    • postCompleted: UpdateUserProfileOutput

    Declaration

    Swift

    open func UpadteUserProfileAsynctask(_ params : UpdateUserProfileInput, postCompleted : @escaping ( _ msg: UpdateUserProfileOutput) -> ())

    Parameters

    params

    UpdateUserProfileInput

    postCompleted

    UpdateUserProfileOutput

  • This method provides all the details related to the video such as video lenght, resolution etc.

    • params: GetVideoDetailsInput
    • postCompleted: GetVideoDetailsOutput

    Declaration

    Swift

    open func videoDetailsAsynctask(_ params : GetVideoDetailsInput, postCompleted : @escaping (_ msg:GetVideoDetailsOutput, _ subtitle_msg: [SubtitleModel], _ redata_msg: [ResolutionOutput],_ waterMark:WaterMarkOutPut) -> ())
  • This method gives the details of the Pay-per-view payment to the users.

    • params: PPVCheckInputModel
    • postCompleted: PPVCheckOutputModel

    Declaration

    Swift

    open func contentAuthorizedAsynTask(_ params : PPVCheckInputModel, postCompleted : @escaping (_ msg:PPVCheckOutputModel) -> ())

    Parameters

    params

    PPVCheckInputModel

    postCompleted

    PPVCheckOutputModel

  • This method checks all the information about the device on which the application is running. With the help of this method we can get the device name, device type, device Id etc.

    • checkDeviceInput: CheckDeviceInput
    • postCompleted: CheckDeviceOutput

    Declaration

    Swift

    open func checkDeviceAsyncTask(_ checkDeviceInput:CheckDeviceInput, postCompleted : @escaping (_ msg:CheckDeviceOutput) -> ())

    Parameters

    checkDeviceInput

    CheckDeviceInput

    postCompleted

    CheckDeviceOutput

  • This method Loads the details of the registered device

    • deviceModelInput: LoadRegisteredDevicesInput
    • postCompleted: LoadRegisteredDevicesOutput

    Declaration

    Swift

    open func loadRegisteredDevicesAsync(_ deviceModelInput : LoadRegisteredDevicesInput, postCompleted : @escaping ( _ msg:[LoadRegisteredDevicesOutput]) -> ())

    Parameters

    deviceModelInput

    LoadRegisteredDevicesInput

    postCompleted

    LoadRegisteredDevicesOutput

  • This method allow users to remove the register device details from the application.

    • removeDeviceInput: RemoveDeviceInputModel
    • postCompleted: RemoveDeviceOutputModel

    Declaration

    Swift

    open func removeDeviceAsynTask(_ removeDeviceInput : RemoveDeviceInputModel , postCompleted : @escaping (_ msg: RemoveDeviceOutputModel) -> ())

    Parameters

    removeDeviceInput

    RemoveDeviceInputModel

    postCompleted

    RemoveDeviceOutputModel

  • This method gives all the details about the Episode to the users which they are looking for. Details like Poster, Duration, Price for subscription etc.

    • episodeInput: EpisodeDetailsInput
    • postCompleted: EpisodeDetailsOutput

    Declaration

    Swift

    open func getEpisodeDeatailsAsynTask(_ episodeInput:EpisodeDetailsInput,  postCompleted : @escaping (_ msg: [EpisodeDetailsOutput]) -> ()) -> ()
  • This method helps user in searching data like movies, episode, series etc. They can search using search box.

    • checkGeoBlockInputModel: Search_Data_input
    • postCompleted: Search_Data_otput

    Declaration

    Swift

    open func searchDataAsynTask(_ searchInput:Search_Data_input, postCompleted : @escaping (_ msg: [Search_Data_otput]) -> ()) -> ()

    Parameters

    postCompleted

    Search_Data_otput

  • This method allow users to register themselves to the application if they are not member.

    • obj: RegistrationInput
    • postCompleted: RegistrationOutput

    Declaration

    Swift

    open func registrationAsynTask(_ obj:RegistrationInput, postCompleted : @escaping (_ msg:RegistrationOutput) -> ()) -> ()

    Parameters

    obj

    RegistrationInput

    postCompleted

    RegistrationOutput

  • This method helps users to reset their password if they forgot somehow. This Class send reset link to the registered Email id provided by the user.

    • forgotPasswordInput: ForgotPasswordInput
    • postCompleted: ForgotPasswordOutput

    Declaration

    Swift

    open func forgotpassAsynTask(_ forgotPasswordInput:ForgotPasswordInput, postCompleted : @escaping (_ msg:ForgotPasswordOutput) -> ()) -> ()

    Parameters

    forgotPasswordInput

    ForgotPasswordInput

    postCompleted

    ForgotPasswordOutput

  • This method holds all the details of payment. This gives monitization details and voucher details to the users.

    • params: MonitizerInputModel
    • postCompleted: MonitizerOutputModel

    Declaration

    Swift

    open func GetMonetizationDetailsAsynctask(_ params : MonitizerInputModel, postCompleted : @escaping (_ msg: MonitizerOutputModel) -> ())

    Parameters

    params

    MonitizerInputModel

    postCompleted

    MonitizerOutputModel

  • This method shows all the purchase history to the user whenever they needed.

    • params: PurchaseInputModel
    • postCompleted: PurchaseOutputModel

    Declaration

    Swift

    open func PurchaseHistoryAsyntask(_ params : PurchaseInputModel, postCompleted : @escaping (_ msg:[PurchaseOutputModel]) -> ())

    Parameters

    params

    PurchaseInputModel

    postCompleted

    PurchaseOutputModel

  • This method allow to update the Google Id of the users.

    • updateGoogleIdInput: UpdateGoogleIdInputModel
    • postCompleted: UpdateGoogleIdOutputModel

    Declaration

    Swift

    open func updateGoogleIdAsynTask(_ updateGoogleIdInput : UpdateGoogleIdInputModel , postCompleted : @escaping (_ msg: UpdateGoogleIdOutputModel) -> ())

    Parameters

    updateGoogleIdInput

    UpdateGoogleIdInputModel

    postCompleted

    UpdateGoogleIdOutputModel

  • This method checks the login status of an user.

    • checkLoginInput: CheckIfUserLoggedInInputModel
    • postCompleted: CheckIfUserLoggedInOutputModel

    Declaration

    Swift

    open func checkIfUserLoggedInAsynTask(_ checkLoginInput : CheckIfUserLoggedInInputModel , postCompleted : @escaping (_ msg: CheckIfUserLoggedInOutputModel) -> ())

    Parameters

    checkLoginInput

    CheckIfUserLoggedInInputModel

    postCompleted

    CheckIfUserLoggedInOutputModel

  • This method helps user to successfully logout from the application whenever they want.

    • logoutInput: LogoutInput
    • postCompleted: LogoutOutput

    Declaration

    Swift

    open func logoutAsynctask(_ logoutInput : LogoutInput , postCompleted : @escaping (_ msg: LogoutOutput) -> ())

    Parameters

    logoutInput

    LogoutInput

    postCompleted

    LogoutOutput

  • This method gives the list of the languages to the users. Users can choose their prefer language among the list of languages.

    • languageInput: LanguageListInputModel
    • postCompleted: LanguageListOutputModel

    Declaration

    Swift

    open func getLanguageList(_ languageInput:LanguageListInputModel, postCompleted : @escaping (_ msg:[LanguageListOutputModel]) -> ()) -> ()

    Parameters

    languageInput

    LanguageListInputModel

    postCompleted

    LanguageListOutputModel

  • This method used for getting section List

    • menuListInput: SectionInput
    • postCompleted: SectionOutput

    Declaration

    Swift

    open func getsectionname(_ menuListInput:SectionInput, postCompleted : @escaping (_ msg:[SectionOutput],_ msg1:[BannerListModel]) -> ()) -> ()

    Parameters

    menuListInput

    SectionInput

    postCompleted

    SectionOutput

  • This method used for getting IP Address

    • menuListInput: SectionInput
    • postCompleted: SectionOutput

    Declaration

    Swift

    open func postForCountry(_ checkInput : CheckInput , postCompleted : @escaping (_ msg: CheckOutput) -> ())

    Parameters

    postCompleted

    SectionOutput

  • This method is use to find out the user’s current country from where he/she is logging in.

    • checkGeoBlockInputModel: CheckGeoBlockInputModel
    • postCompleted: CheckGeoBlockOutputModel

    Declaration

    Swift

    open func CheckGeoBlockCountryAsynTask(_ checkGeoBlockInputModel : CheckGeoBlockInputModel , postCompleted : @escaping (_ msg: CheckGeoBlockOutputModel) -> ())

    Parameters

    checkGeoBlockInputModel

    CheckGeoBlockInputModel

    postCompleted

    CheckGeoBlockOutputModel

  • Undocumented

    Declaration

    Swift

    open func postForImage(_ postforImageInput : PostforImageInput , postCompleted : @escaping (_ msg: PostforImageOutput) -> ())
  • This method used for FB login

    • loginInput: FBLoginInput
    • postCompleted: LoginOutput

    Declaration

    Swift

    open func socialAuthAsynTask(_ loginInput:FBLoginInput, postCompleted : @escaping (_ msg:LoginOutput) -> ()) -> ()

    Parameters

    loginInput

    FBLoginInput

    postCompleted

    LoginOutput

  • This method loads the MyLibrary details of the user.

    • libraryInputModel: MyLibraryInputModel
    • postCompleted: MyLibraryOutputModel

    Declaration

    Swift

    open func myLibraryAsynTask(_ libraryInputModel:MyLibraryInputModel, postCompleted : @escaping (_ msg: [MyLibraryOutputModel]) -> ()) -> ()

    Parameters

    libraryInputModel

    MyLibraryInputModel

    postCompleted

    MyLibraryOutputModel

  • This method Allows the users to rate their favorite contents. The more is the rating of the content the more users will it attract.

    • addContentRatingInputModel: AddContentRatingInputModel
    • postCompleted: AddContentRatingOutputModel

    Declaration

    Swift

    open func addContentRatingAsynTask(_ addContentRatingInputModel : AddContentRatingInputModel , postCompleted : @escaping (_ msg: AddContentRatingOutputModel) -> ())

    Parameters

    addContentRatingInputModel

    AddContentRatingInputModel

    postCompleted

    AddContentRatingOutputModel

  • This method for viewing content Rating.

    • viewContentRatingInputModel: ViewContentRatingInputModel
    • postCompleted: ViewContentRatingOutputModel

    Declaration

    Swift

    open func ViewContentRatingAsynTask(_ viewContentRatingInputModel : ViewContentRatingInputModel , postCompleted : @escaping (_ msg: [ViewContentRatingOutputModel]) -> ())
  • This method shows all the videos which has been added in to favorite list so that user can play them anytime.

    • viewFavouriteInputModel: ViewFavouriteInputModel
    • postCompleted: ViewFavouriteOutputModel

    Declaration

    Swift

    open func ViewFavouriteAsynTask(_ viewFavouriteInputModel : ViewFavouriteInputModel , postCompleted : @escaping (_ msg: [ViewFavouriteOutputModel]) -> ())

    Parameters

    viewFavouriteInputModel

    ViewFavouriteInputModel

    postCompleted

    ViewFavouriteOutputModel

  • This method helps user to add their favorite series/Movie to their favorite list section. Users can watch their favorite series/movies without wasting much time in searching them.

    • addToFavInputModel: AddToFavInputModel
    • postCompleted: AddToFavOutputModel

    Declaration

    Swift

    open func AddToFavAsync(_ addToFavInputModel : AddToFavInputModel , postCompleted : @escaping (_ msg: AddToFavOutputModel) -> ())
  • This method is use to delete the movies/series from the Add Favorite list section.

    • deleteFavInputModel: DeleteFavInputModel
    • postCompleted: DeleteFavOutputModel

    Declaration

    Swift

    open func deleteFavAsync(_ deleteFavInputModel : DeleteFavInputModel , postCompleted : @escaping (_ msg: DeleteFavOutputModel) -> ())

    Parameters

    deleteFavInputModel

    DeleteFavInputModel

    postCompleted

    DeleteFavOutputModel

  • This method gives detail of the celebrity who have acted on that particular series/movie which user is looking for. This gives full cast detail like actor, actress, director etc.

    • params: CelibrityInputModel
    • postCompleted: CelibrityOutputModel

    Declaration

    Swift

    open func getCelibrityAsynTask(_ params : CelibrityInputModel, postCompleted : @escaping (_ msg: [CelibrityOutputModel]) -> ())

    Parameters

    params

    CelibrityInputModel

    postCompleted

    CelibrityOutputModel

  • This method shows the cast details of the video such as Name of the artists, summary of the movie, Image of the artist etc.

    • castAndCrewModelInputModel: CastAndCrewModelInputModel
    • postCompleted: CastAndCrewModelOutputModel

    Declaration

    Swift

    open func getCastDetailAsync(_ castAndCrewModelInputModel : CastAndCrewModelInputModel , postCompleted : @escaping (_ msg: [CastAndCrewModelOutputModel]) -> ())

    Parameters

    castAndCrewModelInputModel

    CastAndCrewModelInputModel

    postCompleted

    CastAndCrewModelOutputModel

  • This method is used for the buffering of video while playing online

    • videoBufferLogsInputModel: VideoBufferLogsInputModel
    • postCompleted: VideoBufferLogsOutputModel

    Declaration

    Swift

    open func getFFVideoBufferLogDetailsAsync(_ videoBufferLogsInputModel : VideoBufferLogsInputModel , postCompleted : @escaping (_ msg: VideoBufferLogsOutputModel) -> ())
  • This method use for Update Video Buffer Log details.

    • videoBufferLogsInputModel: VideoBufferLogsInputModel
    • postCompleted: VideoBufferLogsOutputModel

    Declaration

    Swift

    open func getFFUpdateVideoBufferLogDetailsAsync(_ videoUpdateBufferLogsInputModel : VideoUpdateBufferLogsInputModel , postCompleted : @escaping (_ msg: VideoUpdateBufferLogsOutputModel) -> ())
  • This method shows the Voucher plans to the user so that they can buy any voucher according to their need

    • videoBufferLogsInputModel: VideoBufferLogsInputModel
    • postCompleted: VideoBufferLogsOutputModel

    Declaration

    Swift

    open  func getVoucherPlanAsynTask(_ getVoucherPlanInputModel : GetVoucherPlanInputModel , postCompleted : @escaping (_ msg: GetVoucherPlanOutputModel) -> ())

    Parameters

    postCompleted

    VideoBufferLogsOutputModel

  • This method checks whether voucher entered by the user is valid or invalid.

    • validateVoucherInputModel : ValidateVoucherInputModel
    • postCompleted: ValidateVoucherOutputModel

    Declaration

    Swift

    open func validateVoucherAsynTask(_ validateVoucherInputModel : ValidateVoucherInputModel , postCompleted : @escaping (_ msg: ValidateVoucherOutputModel) -> ())

    Parameters

    validateVoucherInputModel

    ValidateVoucherInputModel

    postCompleted

    ValidateVoucherOutputModel

  • This method is used for getting transction details

    • transactionInputModel : TransactionInputModel
    • postCompleted: TransactionOutputModel

    Declaration

    Swift

    open func transactionDetailsAsynctask(_ transactionInputModel : TransactionInputModel
        
        , postCompleted : @escaping (_ msg: TransactionOutputModel) -> ())

    Parameters

    transactionInputModel

    TransactionInputModel

    postCompleted

    TransactionOutputModel

  • This method is used for getting DRM video’s resolutions, file and token

    • params: getMerlinBBInput
    • postCompleted: getMerlinBBOutput

    Declaration

    Swift

    open func getMerlinBBOflineAsyncTask(_ params : getMerlinBBInput, postCompleted : @escaping (_ msg:[getMerlinBBOutput]) -> ())

    Parameters

    params

    getMerlinBBInput

    postCompleted

    getMerlinBBOutput

  • This method is used for getting translated data according to language code

    • params: LanguageTranslateInputModel
    • postCompleted: String

    Declaration

    Swift

    open func textTranslationAsync(_ params : LanguageTranslateInputModel, postCompleted : @escaping (_ msg: String) -> ())

    Parameters

    params

    LanguageTranslateInputModel

    postCompleted

    String

  • This method gives the list of the banner list to the users.

    • bannerListInput: BannerListInput
    • postCompleted: BannerListModel

    Declaration

    Swift

    open func getBannerListAsynTask(_ bannerListInput:BannerListInput, postCompleted : @escaping (_ msg:[BannerListModel]) -> ()) -> ()

    Parameters

    bannerListInput

    BannerListInput

    postCompleted

    BannerListModel

  • This method is used for showing alert message to the users.

    Declaration

    Swift

    open func showMessage(msg:String)

    Parameters

    msg

    Alert mesage

  • Undocumented

    Declaration

    Swift

    open func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void)
  • Undocumented

    Declaration

    Swift

    open func videoLogNew(_ params:Dictionary<String, String>,_ url:String, postcompletd:@escaping (_ msg:[VideolognewOutPut]) -> ())
  • Undocumented

    Declaration

    Swift

    open func GetOfflineViewRemainingTime(_ params:Dictionary<String, String>,_ url:String, postcompletd:@escaping (_ success:Bool,_ msg:String) -> ())