diff options
author | crupest <crupest@outlook.com> | 2020-01-31 22:46:17 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-01-31 22:46:17 +0800 |
commit | 69a5cc2a6f3282de4859d7c083bd67dfa17226fb (patch) | |
tree | f969a960472bbf828e5d639a8deef65341b52a6a /Timeline/Services/TimelineService.cs | |
parent | 3749a642306b19c84f324b0e94c4d62d8ec60332 (diff) | |
download | timeline-69a5cc2a6f3282de4859d7c083bd67dfa17226fb.tar.gz timeline-69a5cc2a6f3282de4859d7c083bd67dfa17226fb.tar.bz2 timeline-69a5cc2a6f3282de4859d7c083bd67dfa17226fb.zip |
Make all patch return the new entity.
Diffstat (limited to 'Timeline/Services/TimelineService.cs')
-rw-r--r-- | Timeline/Services/TimelineService.cs | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Timeline/Services/TimelineService.cs b/Timeline/Services/TimelineService.cs index 85445973..0ea68265 100644 --- a/Timeline/Services/TimelineService.cs +++ b/Timeline/Services/TimelineService.cs @@ -81,21 +81,6 @@ namespace Timeline.Services Task DeletePost(string name, long id);
/// <summary>
- /// Set the properties of a timeline.
- /// </summary>
- /// <param name="name">Username or the timeline name. See remarks of <see cref="IBaseTimelineService"/>.</param>
- /// <param name="newProperties">The new properties. Null member means not to change.</param>
- /// <exception cref="ArgumentNullException">Thrown when <paramref name="name"/> or <paramref name="newProperties"/> is null.</exception>
- /// <exception cref="ArgumentException">Thrown when <paramref name="name"/> is illegal. It is not a valid timeline name (for normal timeline service) or a valid username (for personal timeline service).</exception>
- /// <exception cref="TimelineNotExistException">
- /// Thrown when timeline does not exist.
- /// For normal timeline, it means the name does not exist.
- /// For personal timeline, it means the user of that username does not exist
- /// and the inner exception should be a <see cref="UserNotExistException"/>.
- /// </exception>
- Task ChangeProperty(string name, TimelinePatchRequest newProperties);
-
- /// <summary>
/// Remove members to a timeline.
/// </summary>
/// <param name="name">Username or the timeline name. See remarks of <see cref="IBaseTimelineService"/>.</param>
@@ -235,6 +220,23 @@ namespace Timeline.Services /// Thrown when the user does not exist. Inner exception MUST be <see cref="UserNotExistException"/>.
/// </exception>
Task<BaseTimelineInfo> GetTimeline(string username);
+
+ /// <summary>
+ /// Set the properties of a timeline.
+ /// </summary>
+ /// <param name="name">Username or the timeline name. See remarks of <see cref="IBaseTimelineService"/>.</param>
+ /// <param name="newProperties">The new properties. Null member means not to change.</param>
+ /// <exception cref="ArgumentNullException">
+ /// Thrown when <paramref name="username"/> is null.
+ /// </exception>
+ /// <exception cref="ArgumentException">
+ /// Thrown when <paramref name="username"/> is of bad format.
+ /// </exception>
+ /// <exception cref="TimelineNotExistException">
+ /// Thrown when the user does not exist. Inner exception MUST be <see cref="UserNotExistException"/>.
+ /// </exception>
+ Task ChangeProperty(string name, TimelinePatchRequest newProperties);
+
}
public abstract class BaseTimelineService : IBaseTimelineService
|