Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
Expand All @@ -25,13 +23,6 @@ public interface IMovieReviewService
[Get("/{movieId}/reviews/{reviewId}")]
Review GetReview(string movieId, string reviewId);

[Delete("/{movieId}/reviews/{reviewId}")]
void DeleteReview(string movieId, string reviewId);

[Get("/fail")]
[ErrorResponse(typeof(byte[]))]
void Fail();

[Post]
[Path("/{movieId}/reviews")]
Task<Review> SubmitReview([PathParam("movieId")] string movieId, Review review);
Expand All @@ -44,65 +35,15 @@ public interface IMovieReviewService
[Path("/{movieId}/reviews/{reviewId}")]
Review PartialUpdateReview(string movieId, [PathParam] string reviewId, Review review);

[Post("/import.csv")]
[ContentType("text/csv")]
Task Import(string csv);

[Get]
Task<IEnumerable<Movie>> QueryMoviesByDate(
[QueryParam] DateTime begin,
[QueryParam] DateTime end);

HttpContent GetHttpContent();

HttpResponseMessage GetHttpResponseMessage();

[Path("/object")]
JObject GetJObject();

[Path("/array")]
Task<JArray> GetJArray();

[Post("/form")]
Task FormPost([FormParam] string value);

[Path("/headers")]
Task<HttpResponseMessage> SendFooHeader([HeaderParam("X-Foo")] string foo);

[Path("/bytes")]
Task<byte[]> GetByteArray();

[Path("/byte-object")]
Task<ByteArrayObject> GetByteArrayObject();

[Path("/string")]
[Accept("text/plain")]
Task<string> GetString();

[Path("/string-object")]
[Accept("text/plain")]
Task<StringObject> GetStringObject();
}

[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
public class StringObject
{
public string Value { get; }

public StringObject(string value)
{
Value = value;
}
}

[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
public class ByteArrayObject
{
public byte[] Bytes { get; }

public ByteArrayObject(byte[] bytes)
{
Bytes = bytes;
}
}
}
Loading