Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix byte reference
Browse files Browse the repository at this point in the history
tspence committed Jan 12, 2024
1 parent 0dc9447 commit 69acbec
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/Clients/FileClient.cs
Original file line number Diff line number Diff line change
@@ -54,12 +54,12 @@ public FileClient(ProjectManagerClient client)
/// </summary>
/// <param name="documentId">The unique identifier of the document to download</param>
/// <param name="type">If you specify a type of `html`, processes the file using text encoding, otherwise binary</param>
public async Task<AstroResult<byte>> DownloadFile(Guid documentId, string type = null)
public async Task<AstroResult<byte[]>> DownloadFile(Guid documentId, string type = null)
{
var url = $"/api/data/files/{documentId}/download";
var options = new Dictionary<string, object>();
if (type != null) { options["type"] = type; }
return await _client.Request<byte>(HttpMethod.Get, url, options, null, null);
return await _client.Request<byte[]>(HttpMethod.Get, url, options, null, null);
}

/// <summary>
@@ -76,10 +76,10 @@ public async Task<AstroResult<byte>> DownloadFile(Guid documentId, string type =
/// occurs, you will receive a JSON result with error information.
/// </summary>
/// <param name="documentId">The unique identifier of the document for which to download the thumbnail.</param>
public async Task<AstroResult<byte>> DownloadaThumbnailImage(Guid documentId)
public async Task<AstroResult<byte[]>> DownloadaThumbnailImage(Guid documentId)
{
var url = $"/api/data/files/{documentId}/thumbnail";
return await _client.Request<byte>(HttpMethod.Get, url, null, null, null);
return await _client.Request<byte[]>(HttpMethod.Get, url, null, null, null);
}

/// <summary>
4 changes: 2 additions & 2 deletions src/Clients/TeamsClient.cs
Original file line number Diff line number Diff line change
@@ -44,10 +44,10 @@ public TeamsClient(ProjectManagerClient client)
/// The Teams API is intended for use by ProjectManager and its business development partners. Please
/// contact ProjectManager&#39;s sales team to request use of this API.
/// </summary>
public async Task<AstroResult<byte>> RetrievezipfileforTeamsIntegrations()
public async Task<AstroResult<byte[]>> RetrievezipfileforTeamsIntegrations()
{
var url = $"/api/data/integrations/teams/application";
return await _client.Request<byte>(HttpMethod.Get, url, null, null, null);
return await _client.Request<byte[]>(HttpMethod.Get, url, null, null, null);
}
}
}
4 changes: 2 additions & 2 deletions src/Interfaces/IFileClient.cs
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ public interface IFileClient
/// </summary>
/// <param name="documentId">The unique identifier of the document to download</param>
/// <param name="type">If you specify a type of `html`, processes the file using text encoding, otherwise binary</param>
Task<AstroResult<byte>> DownloadFile(Guid documentId, string type = null);
Task<AstroResult<byte[]>> DownloadFile(Guid documentId, string type = null);

/// <summary>
/// Downloads a thumbnail image associated with a document that was previously uploaded to ProjectManager.com.
@@ -59,7 +59,7 @@ public interface IFileClient
/// occurs, you will receive a JSON result with error information.
/// </summary>
/// <param name="documentId">The unique identifier of the document for which to download the thumbnail.</param>
Task<AstroResult<byte>> DownloadaThumbnailImage(Guid documentId);
Task<AstroResult<byte[]>> DownloadaThumbnailImage(Guid documentId);

/// <summary>
/// Updates information about a File uploaded to your Workspace.
2 changes: 1 addition & 1 deletion src/Interfaces/ITeamsClient.cs
Original file line number Diff line number Diff line change
@@ -33,6 +33,6 @@ public interface ITeamsClient
/// The Teams API is intended for use by ProjectManager and its business development partners. Please
/// contact ProjectManager&#39;s sales team to request use of this API.
/// </summary>
Task<AstroResult<byte>> RetrievezipfileforTeamsIntegrations();
Task<AstroResult<byte[]>> RetrievezipfileforTeamsIntegrations();
}
}

0 comments on commit 69acbec

Please sign in to comment.