Skip to content

Commit

Permalink
Merge branch 'master' into add-only-with-attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-prosser authored Aug 5, 2024
2 parents e1f6a53 + 255c5bf commit 70b4ea0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased
- Add `only-with-attachment` filter on get comments
- Retry when putting comments
- Add ability to get email by id
- Add ability to upload attachment content for comments

Expand Down
9 changes: 7 additions & 2 deletions api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,15 @@ impl Client {
comments: Vec<NewComment>,
no_charge: bool,
) -> Result<SplitableRequestResponse<PutCommentsResponse>> {
// Retrying here despite the potential for 409's in order to increase reliability when
// working with poor connection

self.splitable_request(
Method::PUT,
self.endpoints.put_comments(source_name)?,
PutCommentsRequest { comments },
Some(NoChargeQuery { no_charge }),
Retry::No,
Retry::Yes,
)
}

Expand All @@ -537,12 +540,14 @@ impl Client {
comments: Vec<NewComment>,
no_charge: bool,
) -> Result<PutCommentsResponse> {
// Retrying here despite the potential for 409's in order to increase reliability when
// working with poor connection
self.request(
&Method::PUT,
&self.endpoints.put_comments(source_name)?,
&Some(PutCommentsRequest { comments }),
&Some(NoChargeQuery { no_charge }),
&Retry::No,
&Retry::Yes,
)
}

Expand Down

0 comments on commit 70b4ea0

Please sign in to comment.