/// <summary> /// Calling this method returns the actual export data for a given export. Note that the export must /// be complete in order to download it's associated data. /// </summary> /// <param name="toFileName">The file path to write the downloaded export to</param> /// <param name="export">An Export object containing information about the export to download</param> /// <returns>The filepath where the data was written</returns> public String Download(String toFileName, Export export) { ServiceRequest sr = new ServiceRequest(this.configuration); sr.Parameters.Add("exportid", export.Id); sr.Server = export.ServerLocation; return(sr.GetFileFromService(toFileName, "rustici.export.download")); }
/// <summary> /// Returns a dispatch file in a byte array /// </summary> /// <param name="dispatchId">The id of the dispatch to download.</param> /// <returns>The dispatch file as a byte array.</returns> public byte[] GetDispatchFile(string dispatchId) { ServiceRequest request = new ServiceRequest(configuration); request.Parameters.Add("dispatchid", dispatchId); //Return the file return(request.GetFileFromService("rustici.dispatch.downloadDispatches")); }
public string GetAssets(String toFileName, String courseId, int versionId, List <String> paths) { ServiceRequest request = new ServiceRequest(configuration); request.Parameters.Add("courseid", courseId); if (paths != null && paths.Count > 0) { foreach (String path in paths) { request.Parameters.Add("path", path); } } if (versionId != Int32.MinValue) { request.Parameters.Add("versionid", versionId); } //Return file path to downloaded file return(request.GetFileFromService(toFileName, "rustici.course.getAssets")); }
/// <summary> /// Uses the dispatches selected by the given parameters to create and deliver a package /// containing the resources used to import and launch those dispatches in client systems. /// This will save a zip file, which in turn contains zip files for each of the selected dispatches. /// </summary> /// <param name="toFileName">File to save download to.</param> /// <param name="dispatchId">The id of the dispatch to download.</param> /// <param name="destinationId">The id of the destination used to select the dispatch group to download.</param> /// <param name="courseId">The id of the course used to select the dispatch group to download.</param> /// <param name="tags">A comma separated list of tags used to select the dispatch group to download. Each dispatch selected will have to be tagged with each tag in the list.</param> /// <returns>Dispatch Data object.</returns> public string DownloadDispatches(string toFileName, string dispatchId, string destinationId, string courseId, string tags) { ServiceRequest request = new ServiceRequest(configuration); if (!string.IsNullOrEmpty(dispatchId)) { request.Parameters.Add("dispatchid", dispatchId); } if (!string.IsNullOrEmpty(destinationId)) { request.Parameters.Add("destinationid", destinationId); } if (!string.IsNullOrEmpty(courseId)) { request.Parameters.Add("courseid", courseId); } if (!string.IsNullOrEmpty(tags)) { request.Parameters.Add("tags", tags); } //Return file path to downloaded file return(request.GetFileFromService(toFileName, "rustici.dispatch.downloadDispatches")); }
public string GetAssets(String toFileName, String courseId, int versionId, List<String> paths) { ServiceRequest request = new ServiceRequest(configuration); request.Parameters.Add("courseid", courseId); if(paths != null && paths.Count > 0){ foreach (String path in paths){ request.Parameters.Add("path", path); } } if (versionId != Int32.MinValue) { request.Parameters.Add("versionid", versionId); } //Return file path to downloaded file return request.GetFileFromService(toFileName, "rustici.course.getAssets"); }
/// <summary> /// Calling this method returns the actual export data for a given export. Note that the export must /// be complete in order to download it's associated data. /// </summary> /// <param name="toFileName">The file path to write the downloaded export to</param> /// <param name="export">An Export object containing information about the export to download</param> /// <returns>The filepath where the data was written</returns> public String Download(String toFileName, Export export) { ServiceRequest sr = new ServiceRequest(this.configuration); sr.Parameters.Add("exportid", export.Id); sr.Server = export.ServerLocation; return sr.GetFileFromService(toFileName, "rustici.export.download"); }
/// <summary> /// Uses the dispatches selected by the given parameters to create and deliver a package /// containing the resources used to import and launch those dispatches in client systems. /// This will save a zip file, which in turn contains zip files for each of the selected dispatches. /// </summary> /// <param name="toFileName">File to save download to.</param> /// <param name="dispatchId">The id of the dispatch to download.</param> /// <param name="destinationId">The id of the destination used to select the dispatch group to download.</param> /// <param name="courseId">The id of the course used to select the dispatch group to download.</param> /// <param name="tags">A comma separated list of tags used to select the dispatch group to download. Each dispatch selected will have to be tagged with each tag in the list.</param> /// <returns>Dispatch Data object.</returns> public string DownloadDispatches(string toFileName, string dispatchId, string destinationId, string courseId, string tags) { ServiceRequest request = new ServiceRequest(configuration); if (!string.IsNullOrEmpty(dispatchId)) request.Parameters.Add("dispatchid", dispatchId); if (!string.IsNullOrEmpty(destinationId)) request.Parameters.Add("destinationid", destinationId); if (!string.IsNullOrEmpty(courseId)) request.Parameters.Add("courseid", courseId); if (!string.IsNullOrEmpty(tags)) request.Parameters.Add("tags", tags); //Return file path to downloaded file return request.GetFileFromService(toFileName, "rustici.dispatch.downloadDispatches"); }