/// <summary> /// Return the URL of the thumbnail for the given file and size /// </summary> /// <param name="libraryId">The id of the library the file is in</param> /// <param name="path">Path to the file</param> /// <param name="size">The size of the thumbnail (vertical and horizontal pixel count)</param> /// <returns></returns> public string GetThumbnailUrl(string libraryId, string path, int size) { libraryId.ThrowOnNull(nameof(libraryId)); path.ThrowOnNull(nameof(path)); size.ThrowOnNull(nameof(size)); var request = new GetThumbnailImageRequest(AuthToken, libraryId, path, size); return(ServerUri + request.CommandUri); }
/// <summary> /// Get a thumbnail for the given file /// </summary> /// <param name="libraryId">The id of the library the file is in</param> /// <param name="path">Path to the file</param> /// <param name="size">The size of the thumbnail (vertical and horizontal pixel count)</param> /// <returns></returns> public async Task <byte[]> GetThumbnailImage(string libraryId, string path, int size) { libraryId.ThrowOnNull(nameof(libraryId)); path.ThrowOnNull(nameof(path)); size.ThrowOnNull(nameof(size)); var request = new GetThumbnailImageRequest(AuthToken, libraryId, path, size); return(await _webConnection.SendRequestAsync(ServerUri, request)); }