Skip to content

Commit eeea6a3

Browse files
committed
Mark a few deprecated methods as such
These have been deprecated in the spec for years.
1 parent cabd00c commit eeea6a3

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

csharp/Svix/MessageAttempt.cs

+4
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ public async Task<ListResponseMessageAttemptOut> ListAttemptsByMessageAsync(stri
265265
}
266266

267267
// Deprecated
268+
[Obsolete("Use ListAttemptsByMessage instead, passing the endpoint ID through options")]
268269
public ListResponseMessageAttemptEndpointOut ListAttemptsForEndpoint(string appId, string messageId,
269270
string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default)
270271
{
@@ -297,6 +298,7 @@ public ListResponseMessageAttemptEndpointOut ListAttemptsForEndpoint(string appI
297298
}
298299

299300
// Deprecated
301+
[Obsolete("Use ListAttemptsByMessageAsync instead, passing the endpoint ID through options")]
300302
public async Task<ListResponseMessageAttemptEndpointOut> ListAttemptsForEndpointAsync(string appId,
301303
string messageId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default,
302304
CancellationToken cancellationToken = default)
@@ -331,6 +333,7 @@ public async Task<ListResponseMessageAttemptEndpointOut> ListAttemptsForEndpoint
331333
}
332334

333335
// Deprecated
336+
[Obsolete("Use ListAttemptsByEndpoint or ListAttemptsByMessage instead")]
334337
public ListResponseMessageAttemptOut ListAttempts(string appId, string messageId, MessageAttemptListOptions options = null,
335338
string idempotencyKey = default)
336339
{
@@ -364,6 +367,7 @@ public ListResponseMessageAttemptOut ListAttempts(string appId, string messageId
364367
}
365368

366369
// Deprecated
370+
[Obsolete("Use ListAttemptsByEndpointAsync or ListAttemptsByMessageAsync instead")]
367371
public async Task<ListResponseMessageAttemptOut> ListAttemptsAsync(string appId, string messageId, MessageAttemptListOptions options = null,
368372
string idempotencyKey = default, CancellationToken cancellationToken = default)
369373
{

go/message_attempt.go

+1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ func (m *MessageAttempt) ListAttemptedDestinations(ctx context.Context, appId st
211211
return ret, nil
212212
}
213213

214+
// Deprecated: use `ListByMsg` instead, passing the endpoint ID through options
214215
func (m *MessageAttempt) ListAttemptsForEndpoint(ctx context.Context, appId string, msgId string, endpointId string, options *MessageAttemptListOptions) (*ListResponseMessageAttemptEndpointOut, error) {
215216
req := m.api.MessageAttemptAPI.V1MessageAttemptListByEndpointDeprecated(ctx, appId, msgId, endpointId)
216217
if options != nil {

java/lib/src/main/java/com/svix/MessageAttempt.java

+4
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ public ListResponseMessageEndpointOut listAttemptedDestinations(final String app
118118
}
119119
}
120120

121+
/*
122+
* @deprecated: use listByMsg instead, passing the endpoint ID through options
123+
*/
124+
@Deprecated
121125
public ListResponseMessageAttemptEndpointOut listAttemptsForEndpoint(final String appId, final String msgId, final String endpointId,
122126
final MessageAttemptListOptions options) throws ApiException {
123127
try {

python/svix/api.py

+6
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,9 @@ async def list_attempted_destinations(
12671267
**options.to_dict(),
12681268
)
12691269

1270+
@deprecated(
1271+
reason="use list_by_msg instead, passing the endpoint id through options"
1272+
)
12701273
async def list_attempts_for_endpoint(
12711274
self,
12721275
app_id: str,
@@ -1378,6 +1381,9 @@ def list_attempted_destinations(
13781381
**options.to_dict(),
13791382
)
13801383

1384+
@deprecated(
1385+
reason="use list_by_msg instead, passing the endpoint id through options"
1386+
)
13811387
def list_attempts_for_endpoint(
13821388
self,
13831389
app_id: str,

0 commit comments

Comments
 (0)