Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking Change: Renamed CursorResponse to PostCursorResponse #387

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -316,7 +316,7 @@ public async Task PutCursorAsync_ShouldThrow_WhenCursorDoesNotExist()
[Fact]
public async Task PutCursorAsync_ShouldReturnResponseModelWithInterface()
{
CursorResponse<int> postResponse =
PostCursorResponse<int> postResponse =
await _cursorApi.PostCursorAsync<int>("FOR i IN 0..1500 RETURN i");

ICursorResponse<int> putResult =
6 changes: 3 additions & 3 deletions arangodb-net-standard/CursorApi/CursorApiClient.cs
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ protected virtual WebHeaderCollection GetHeaderCollection(CursorHeaderProperties
/// <param name="ttl"></param>
/// <param name="transactionId">Optional. The stream transaction Id.</param>
/// <returns></returns>
public virtual async Task<CursorResponse<T>> PostCursorAsync<T>(
public virtual async Task<PostCursorResponse<T>> PostCursorAsync<T>(
string query,
Dictionary<string, object> bindVars = null,
PostCursorOptions options = null,
@@ -115,7 +115,7 @@ public virtual async Task<CursorResponse<T>> PostCursorAsync<T>(
/// <param name="postCursorBody">Object encapsulating options and parameters of the query.</param>
/// <param name="headerProperties">Optional. Additional Header properties.</param>
/// <returns></returns>
public virtual async Task<CursorResponse<T>> PostCursorAsync<T>(
public virtual async Task<PostCursorResponse<T>> PostCursorAsync<T>(
PostCursorBody postCursorBody, CursorHeaderProperties headerProperties = null)
{
var content = GetContent(postCursorBody, new ApiClientSerializationOptions(true, true));
@@ -125,7 +125,7 @@ public virtual async Task<CursorResponse<T>> PostCursorAsync<T>(
if (response.IsSuccessStatusCode)
{
var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
return DeserializeJsonFromStream<CursorResponse<T>>(stream);
return DeserializeJsonFromStream<PostCursorResponse<T>>(stream);
}

throw await GetApiErrorException(response).ConfigureAwait(false);
4 changes: 2 additions & 2 deletions arangodb-net-standard/CursorApi/ICursorApiClient.cs
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ public interface ICursorApiClient
/// <param name="ttl"></param>
/// <param name="transactionId">Optional. The stream transaction Id.</param>
/// <returns></returns>
Task<CursorResponse<T>> PostCursorAsync<T>(
Task<PostCursorResponse<T>> PostCursorAsync<T>(
string query,
Dictionary<string, object> bindVars = null,
PostCursorOptions options = null,
@@ -40,7 +40,7 @@ Task<CursorResponse<T>> PostCursorAsync<T>(
/// <param name="postCursorBody">Object encapsulating options and parameters of the query.</param>
/// <param name="headerProperties">Optional. Additional Header properties.</param>
/// <returns></returns>
Task<CursorResponse<T>> PostCursorAsync<T>(
Task<PostCursorResponse<T>> PostCursorAsync<T>(
PostCursorBody postCursorBody, CursorHeaderProperties headerProperties = null);

/// <summary>
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ namespace ArangoDBNetStandard.CursorApi.Models
/// Response from ArangoDB when creating a new cursor.
/// </summary>
/// <typeparam name="T"></typeparam>
public class CursorResponse<T> : ICursorResponse<T>
public class PostCursorResponse<T> : ICursorResponse<T>
{
/// <summary>
/// A flag to indicate that an error occurred (false in this case)
@@ -56,4 +56,4 @@ public class CursorResponse<T> : ICursorResponse<T>
/// </summary>
public string Id { get; set; }
}
}
}