/// <summary> /// Get font scheme from the specified slide of a presentation from a third party storage /// </summary> /// <param name="slideNumber"></param> /// <param name="storageType"></param> /// <param name="storageName">Name of the storage</param> /// <returns></returns> public FontScheme GetFontScheme(int slideNumber, StorageType storageType, string storageName) { //build URI to get font scheme StringBuilder strURI = new StringBuilder(Product.BaseProductUri + "/slides/" + FileName + "/slides/" + slideNumber + "/theme/fontScheme"); switch (storageType) { case StorageType.AmazonS3: strURI.Append("?storage=" + storageName); break; } string signedURI = Utils.Sign(strURI.ToString()); Stream responseStream = Utils.ProcessCommand(signedURI, "GET"); StreamReader reader = new StreamReader(responseStream); string strJSON = reader.ReadToEnd(); //Parse the json string to JObject JObject parsedJSON = JObject.Parse(strJSON); //Deserializes the JSON to a object. FontSchemeResponse fontSchemeResponse = JsonConvert.DeserializeObject <FontSchemeResponse>(parsedJSON.ToString()); return(fontSchemeResponse.FontScheme); }
/// <summary> /// Get font scheme from the specified slide /// </summary> /// <param name="slideNumber"></param> /// <returns></returns> public FontScheme GetFontScheme(int slideNumber) { //build URI to get font scheme string strURI = Product.BaseProductUri + "/slides/" + FileName + "/slides/" + slideNumber + "/theme/fontScheme"; string signedURI = Utils.Sign(strURI); Stream responseStream = Utils.ProcessCommand(signedURI, "GET"); StreamReader reader = new StreamReader(responseStream); string strJSON = reader.ReadToEnd(); //Parse the json string to JObject JObject parsedJSON = JObject.Parse(strJSON); //Deserializes the JSON to a object. FontSchemeResponse fontSchemeResponse = JsonConvert.DeserializeObject <FontSchemeResponse>(parsedJSON.ToString()); return(fontSchemeResponse.FontScheme); }