コード例 #1
0
		/// <summary>
		/// Creates an API object for read/write API access for a specific region and with a custom "media delivery" format.
		/// </summary>
		/// <param name="readToken">The authentication token provided to authorize read access to the Media APIs.</param>
		/// <param name="writeToken">The authentication token provided to authorize write access to the Media APIs.</param>
		/// <param name="mediaDelivery">The format for media delivery. Specify "http" to retrieve URLs for downloading 
		/// audio &amp; video files, rather than streaming them.</param>
		/// <param name="region">The region of the video publishing.</param>
		/// <returns>A configured BrightcoveApi object</returns>
		public static BrightcoveApi CreateApi(string readToken, string writeToken, string mediaDelivery, BrightcoveRegion region)
		{
			BrightcoveApiConfig apiConfig = new BrightcoveApiConfig(readToken, writeToken, region);
			if (!String.IsNullOrEmpty(mediaDelivery))
			{
				apiConfig.MediaDelivery = mediaDelivery;
			}

			BrightcoveApiConnector apiConnector = new BrightcoveApiConnector(apiConfig);
			return new BrightcoveApi(apiConnector);
		}
コード例 #2
0
        /// <summary>
        /// A read/write configuration for the specified region.
        /// </summary>
        /// <param name="readToken">The authentication token provided to authorize read access to the Media APIs.</param>
        /// <param name="writeToken">The authentication token provided to authorize write access to the Media APIs.</param>
        /// <param name="region">The region of the video publishing.</param>
        public BrightcoveApiConfig(string readToken, string writeToken, BrightcoveRegion region)
        {
            ReadToken = readToken;
            WriteToken = writeToken;

            string domain = region == BrightcoveRegion.Japan ? "co.jp" : "com";
            const string apiStem = "http://api.brightcove.{0}/services/{1}";
            ApiReadUrl = String.Format(apiStem, domain, "library");
            ApiWriteUrl = String.Format(apiStem, domain, "post");

            RequestTimeout = 100000; // .NET default
            Encoding = Encoding.UTF8;
            UserAgent = "Brightcove .NET MAPI Wrapper";
        }
コード例 #3
0
        /// <summary>
        /// A read/write configuration for the specified region.
        /// </summary>
        /// <param name="readToken">The authentication token provided to authorize read access to the Media APIs.</param>
        /// <param name="writeToken">The authentication token provided to authorize write access to the Media APIs.</param>
        /// <param name="region">The region of the video publishing.</param>
        public BrightcoveApiConfig(string readToken, string writeToken, BrightcoveRegion region)
        {
            ReadToken  = readToken;
            WriteToken = writeToken;

            string       domain  = region == BrightcoveRegion.Japan ? "co.jp" : "com";
            const string apiStem = "http://api.brightcove.{0}/services/{1}";

            ApiReadUrl  = String.Format(apiStem, domain, "library");
            ApiWriteUrl = String.Format(apiStem, domain, "post");

            RequestTimeout = 100000;             // .NET default
            Encoding       = Encoding.UTF8;
            UserAgent      = "Brightcove .NET MAPI Wrapper";
        }
コード例 #4
0
		/// <summary>
		/// Creates an API object for read/write API access for a specific region.
		/// </summary>
		/// <param name="readToken">The authentication token provided to authorize read access to the Media APIs.</param>
		/// <param name="writeToken">The authentication token provided to authorize write access to the Media APIs.</param>
		/// <param name="region">The region of the video publishing.</param>
		/// <returns>A configured BrightcoveApi object</returns>
		public static BrightcoveApi CreateApi(string readToken, string writeToken, BrightcoveRegion region)
		{
			return CreateApi(readToken, writeToken, null, region);
		}
コード例 #5
0
		/// <summary>
		/// A read-only configuration for the specified region.
		/// </summary>
		/// <param name="readToken">The authentication token provided to authorize read access to the Media APIs.</param>
		/// <param name="region">The region of the video publishing.</param>
		public BrightcoveApiConfig(string readToken, BrightcoveRegion region): this(readToken, null, region)
		{
		}
コード例 #6
0
 /// <summary>
 /// A read-only configuration for the specified region.
 /// </summary>
 /// <param name="readToken">The authentication token provided to authorize read access to the Media APIs.</param>
 /// <param name="region">The region of the video publishing.</param>
 public BrightcoveApiConfig(string readToken, BrightcoveRegion region) : this(readToken, null, region)
 {
 }
コード例 #7
0
        /// <summary>
        /// Creates an API object for read/write API access for a specific region and with a custom "media delivery" format.
        /// </summary>
        /// <param name="readToken">The authentication token provided to authorize read access to the Media APIs.</param>
        /// <param name="writeToken">The authentication token provided to authorize write access to the Media APIs.</param>
        /// <param name="mediaDelivery">The format for media delivery. Specify "http" to retrieve URLs for downloading
        /// audio &amp; video files, rather than streaming them.</param>
        /// <param name="region">The region of the video publishing.</param>
        /// <returns>A configured BrightcoveApi object</returns>
        public static BrightcoveApi CreateApi(string readToken, string writeToken, string mediaDelivery, BrightcoveRegion region)
        {
            BrightcoveApiConfig apiConfig = new BrightcoveApiConfig(readToken, writeToken, region);

            if (!String.IsNullOrEmpty(mediaDelivery))
            {
                apiConfig.MediaDelivery = mediaDelivery;
            }

            BrightcoveApiConnector apiConnector = new BrightcoveApiConnector(apiConfig);

            return(new BrightcoveApi(apiConnector));
        }
コード例 #8
0
 /// <summary>
 /// Creates an API object for read/write API access for a specific region.
 /// </summary>
 /// <param name="readToken">The authentication token provided to authorize read access to the Media APIs.</param>
 /// <param name="writeToken">The authentication token provided to authorize write access to the Media APIs.</param>
 /// <param name="region">The region of the video publishing.</param>
 /// <returns>A configured BrightcoveApi object</returns>
 public static BrightcoveApi CreateApi(string readToken, string writeToken, BrightcoveRegion region)
 {
     return(CreateApi(readToken, writeToken, null, region));
 }