/// <summary>
 /// Create Properties Json.
 /// </summary>
 /// <param name="fileName">File name of the current media content</param>
 /// <param name="title">Media title </param>
 /// <param name="duration">Expected video duration in seconds (Should be 0 if Live content) in Length column of Youbora. (Make sure
 /// that if a duration has been set manually, it overwrites the one get from the player)</param>
 /// <returns>Json</returns>
 public static string CreateProperties(
     string title,
     string fileName,
     long duration)
 {
     return(StartApi.CreateJsonProperties(title, fileName, duration));
 }
 /// <summary>
 /// Create Properties Json.
 /// </summary>
 /// <param name="fileName">File name of the current media content </param>
 /// <param name="title">Media title </param>
 /// <param name="genre">Media genre </param>
 /// <param name="language">Media language </param>
 /// <param name="year">Media year </param>
 /// <param name="cast">Media cast. Separate each name with commas </param>
 /// <param name="director">Media director or directors. Separate each value with commas </param>
 /// <param name="owner">Media's content owner </param>
 /// <param name="duration">Length of the media in seconds </param>
 /// <param name="parental">Recommended viewing age (All,+13,+18,Adult) </param>
 /// <param name="price">Purchase price on the website </param>
 /// <param name="rating">Average value on your user's perception on the content quality, performance... </param>
 /// <param name="audioType">Media file type of audio (Mono, Stereo, Dolby,…) </param>
 /// <param name="audioChannels">Number of media file channels (1, 5.1, …) </param>
 /// <param name="contentId">Internal ID for the media </param>
 /// <param name="transactionType">Rent: Media for rental Subscription: Media which has been acquired as part of a subscription EST (Electronic Sell Through): Media purchased Free: Media which has no economical transaction </param>
 /// <param name="quality">HD or SD </param>
 /// <param name="contentType">Trailer, Episode, Movie </param>
 /// <param name="manufacturer">Manufacturer of the device</param>
 /// <param name="deviceType">TV, Blu-Ray, Set-Top Box </param>
 /// <param name="deviceYear">Fabrication year </param>
 /// <param name="firmware">Firmware version</param>
 /// <returns>Json</returns>
 public static string CreateProperties(
     string fileName,
     string title,
     string genre,
     string language,
     string year,
     string cast,
     string director,
     string owner,
     long duration,
     Parental parental,
     double price,
     string rating,
     AudioType audioType,
     double audioChannels,
     string contentId,
     TransactionType transactionType,
     Quality quality,
     ContentType contentType,
     string manufacturer,
     string deviceType,
     string deviceYear,
     string firmware)
 {
     return(StartApi.CreateJsonProperties(
                fileName,
                title,
                genre,
                language,
                year,
                cast,
                director,
                owner,
                duration,
                parental,
                price,
                rating,
                audioType,
                audioChannels,
                contentId,
                transactionType,
                quality,
                contentType,
                manufacturer,
                deviceType,
                deviceYear,
                firmware));
 }
        /// <summary>
        /// Start event information
        /// </summary>
        /// <param name="system">Your Nice PeopleAtWork account code that indicates Youbora Analytics which customer account you are sending the data to. This parameter will be provided by NicePeopleAtWork, if you don't have it yet, please contact your Customer Engineer or Support Agent</param>
        /// <param name="user">User identifier. If the user is unknown, send the parameter blank or with a default username</param>
        /// <param name="pluginVersion"></param>
        /// <param name="code">View code retrieved from the data call</param>
        /// <param name="resource"></param>
        /// <param name="live">Boolean variable to identify if the video is a live (true) or an on demand (false) stream. Many of our plugins have a method integrated that lets the customer, when integrating the plugin, use a method to set this property</param>
        /// <param name="properties">JSON media properties (see them defined below in a sub-section)</param>
        /// <param name="referer">Browser's URL where the player is being loaded (or window.location for Smart TV applications). This field can be empty but must be declared.</param>
        /// <param name="pingTime">The version of the plugin in the x.x.x_pluginCode format. This parameter lets you to have a version control of new deployed plugins and see which users are using an older version (cached in the system), so you can force them to clean their cache and download the new version</param>
        /// <param name="duration">Video length in seconds</param>
        /// <param name="bitrate">Video bitrate</param>
        /// <param name="extraparams"></param>
        /// <param name="complete">Complete Action</param>
        /// <param name="error">Error Action</param>
        public static void Start(
            string system,
            string user,
            string pluginVersion,
            string code,
            string resource,
            bool live,
            string properties,
            string referer,
            int pingTime,
            long duration,
            double bitrate,
            string extraparams,
            Action <string> complete,
            Action <Exception> error)
        {
            var url = StartApi.Start(Host, system, user, pluginVersion, code, resource, live, properties, referer,
                                     pingTime, duration, extraparams);

            ApiClient.Post(url, complete, error);
        }
 /// <summary>
 /// Create Properties Json.
 /// </summary>
 /// <param name="fileName">File name of the current media content</param>
 /// <returns>Json</returns>
 public static string CreateProperties(
     string fileName)
 {
     return(StartApi.CreateJsonProperties(fileName));
 }