@@ -10,56 +10,75 @@ public interface IOsmEditingService
1010 /// Fetches the OSM XML for all elements within the specified bounding box as a stream.
1111 /// The caller is responsible for disposing the returned stream.
1212 /// </summary>
13- /// <param name="west">Western longitude bound.</param>
14- /// <param name="south">Southern latitude bound.</param>
15- /// <param name="east">Eastern longitude bound.</param>
16- /// <param name="north">Northern latitude bound.</param>
17- /// <param name="ct">Optional cancellation token.</param>
13+ /// <param name="bbox">The geographic bounding box to fetch.</param>
14+ /// <param name="cancellationToken">Cancellation token.</param>
1815 /// <returns>A stream over the OSM XML response body.</returns>
19- public Task < Stream > FetchBboxAsync ( double west , double south , double east , double north ,
20- CancellationToken ct = default ) ;
16+ /// <exception cref="OperationCanceledException">The request was cancelled via <paramref name="cancellationToken"/>.</exception>
17+ /// <exception cref="ArgumentNullException">The resolved API base URL is null.</exception>
18+ /// <exception cref="HttpRequestException">The HTTP request failed or the server returned a non-success status code.</exception>
19+ /// <exception cref="UriFormatException">The resolved API base URL is not a valid URI.</exception>
20+ public Task < Stream > FetchBboxAsync ( Bbox bbox , CancellationToken cancellationToken ) ;
2121
2222 /// <summary>
2323 /// Creates a new OSM changeset with the given tags and returns the assigned changeset ID.
2424 /// </summary>
2525 /// <param name="tags">The changeset tags (e.g. <c>comment</c>, <c>created_by</c>).</param>
26- /// <param name="ct">Optional cancellation token.</param>
26+ /// <param name="cancellationToken">Cancellation token.</param>
2727 /// <returns>The numeric changeset ID assigned by the OSM API.</returns>
28- public Task < int > CreateChangesetAsync ( Dictionary < string , string > tags ,
29- CancellationToken ct = default ) ;
28+ /// <exception cref="OperationCanceledException">The request was cancelled via <paramref name="cancellationToken"/>.</exception>
29+ /// <exception cref="ArgumentNullException">The resolved API base URL is null.</exception>
30+ /// <exception cref="HttpRequestException">The HTTP request failed or the server returned a non-success status code.</exception>
31+ /// <exception cref="UriFormatException">The resolved API base URL is not a valid URI.</exception>
32+ /// <exception cref="FormatException">The response body could not be parsed as a changeset ID integer.</exception>
33+ public Task < int > CreateChangesetAsync ( Dictionary < string , string > tags , CancellationToken cancellationToken ) ;
3034
3135 /// <summary>
3236 /// Uploads a pre-built osmChange XML document to an open changeset and returns the raw
3337 /// diffResult XML string.
3438 /// </summary>
3539 /// <param name="changesetId">The open changeset to upload to.</param>
3640 /// <param name="osmChangeXml">The osmChange XML body to POST.</param>
37- /// <param name="ct">Optional cancellation token.</param>
41+ /// <param name="cancellationToken">Cancellation token.</param>
3842 /// <returns>The raw diffResult XML string returned by the OSM API.</returns>
39- public Task < string > UploadChangesetAsync ( int changesetId , string osmChangeXml ,
40- CancellationToken ct = default ) ;
43+ /// <exception cref="OperationCanceledException">The request was cancelled via <paramref name="cancellationToken"/>.</exception>
44+ /// <exception cref="ArgumentNullException">The resolved API base URL is null.</exception>
45+ /// <exception cref="HttpRequestException">The HTTP request failed or the server returned a non-success status code.</exception>
46+ /// <exception cref="UriFormatException">The resolved API base URL is not a valid URI.</exception>
47+ public Task < string > UploadChangesetAsync ( int changesetId , string osmChangeXml , CancellationToken cancellationToken ) ;
4148
4249 /// <summary>
4350 /// Closes an open changeset, preventing further uploads to it.
4451 /// </summary>
4552 /// <param name="changesetId">The changeset ID to close.</param>
46- /// <param name="ct">Optional cancellation token.</param>
47- public Task CloseChangesetAsync ( int changesetId , CancellationToken ct = default ) ;
53+ /// <param name="cancellationToken">Cancellation token.</param>
54+ /// <exception cref="OperationCanceledException">The request was cancelled via <paramref name="cancellationToken"/>.</exception>
55+ /// <exception cref="ArgumentNullException">The resolved API base URL is null.</exception>
56+ /// <exception cref="HttpRequestException">The HTTP request failed or the server returned a non-success status code.</exception>
57+ /// <exception cref="UriFormatException">The resolved API base URL is not a valid URI.</exception>
58+ public Task CloseChangesetAsync ( int changesetId , CancellationToken cancellationToken ) ;
4859
4960 /// <summary>
5061 /// Fetches the raw OSM XML for a single node from <c>GET /api/0.6/node/{id}</c>.
5162 /// </summary>
5263 /// <param name="nodeId">The node ID to fetch.</param>
53- /// <param name="ct">Optional cancellation token.</param>
64+ /// <param name="cancellationToken">Cancellation token.</param>
5465 /// <returns>The raw OSM XML string returned by the API.</returns>
55- public Task < string > FetchNodeAsync ( long nodeId , CancellationToken ct = default ) ;
66+ /// <exception cref="OperationCanceledException">The request was cancelled via <paramref name="cancellationToken"/>.</exception>
67+ /// <exception cref="ArgumentNullException">The resolved API base URL is null.</exception>
68+ /// <exception cref="HttpRequestException">The HTTP request failed or the server returned a non-success status code.</exception>
69+ /// <exception cref="UriFormatException">The resolved API base URL is not a valid URI.</exception>
70+ public Task < string > FetchNodeAsync ( long nodeId , CancellationToken cancellationToken ) ;
5671
5772 /// <summary>
5873 /// Fetches the raw OSM XML for a way and all its constituent nodes from
5974 /// <c>GET /api/0.6/way/{id}/full</c>.
6075 /// </summary>
6176 /// <param name="wayId">The way ID to fetch.</param>
62- /// <param name="ct">Optional cancellation token.</param>
77+ /// <param name="cancellationToken">Cancellation token.</param>
6378 /// <returns>The raw OSM XML string returned by the API.</returns>
64- public Task < string > FetchWayFullAsync ( long wayId , CancellationToken ct = default ) ;
79+ /// <exception cref="OperationCanceledException">The request was cancelled via <paramref name="cancellationToken"/>.</exception>
80+ /// <exception cref="ArgumentNullException">The resolved API base URL is null.</exception>
81+ /// <exception cref="HttpRequestException">The HTTP request failed or the server returned a non-success status code.</exception>
82+ /// <exception cref="UriFormatException">The resolved API base URL is not a valid URI.</exception>
83+ public Task < string > FetchWayFullAsync ( long wayId , CancellationToken cancellationToken ) ;
6584}
0 commit comments