Skip to content

Commit

Permalink
Mark a few deprecated methods as such
Browse files Browse the repository at this point in the history
These have been deprecated in the spec for years.
  • Loading branch information
svix-jplatte committed Jan 8, 2025
1 parent cabd00c commit eeea6a3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions csharp/Svix/MessageAttempt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public async Task<ListResponseMessageAttemptOut> ListAttemptsByMessageAsync(stri
}

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

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

// Deprecated
[Obsolete("Use ListAttemptsByEndpoint or ListAttemptsByMessage instead")]
public ListResponseMessageAttemptOut ListAttempts(string appId, string messageId, MessageAttemptListOptions options = null,
string idempotencyKey = default)
{
Expand Down Expand Up @@ -364,6 +367,7 @@ public ListResponseMessageAttemptOut ListAttempts(string appId, string messageId
}

// Deprecated
[Obsolete("Use ListAttemptsByEndpointAsync or ListAttemptsByMessageAsync instead")]
public async Task<ListResponseMessageAttemptOut> ListAttemptsAsync(string appId, string messageId, MessageAttemptListOptions options = null,
string idempotencyKey = default, CancellationToken cancellationToken = default)
{
Expand Down
1 change: 1 addition & 0 deletions go/message_attempt.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ func (m *MessageAttempt) ListAttemptedDestinations(ctx context.Context, appId st
return ret, nil
}

// Deprecated: use `ListByMsg` instead, passing the endpoint ID through options
func (m *MessageAttempt) ListAttemptsForEndpoint(ctx context.Context, appId string, msgId string, endpointId string, options *MessageAttemptListOptions) (*ListResponseMessageAttemptEndpointOut, error) {
req := m.api.MessageAttemptAPI.V1MessageAttemptListByEndpointDeprecated(ctx, appId, msgId, endpointId)
if options != nil {
Expand Down
4 changes: 4 additions & 0 deletions java/lib/src/main/java/com/svix/MessageAttempt.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ public ListResponseMessageEndpointOut listAttemptedDestinations(final String app
}
}

/*
* @deprecated: use listByMsg instead, passing the endpoint ID through options
*/
@Deprecated
public ListResponseMessageAttemptEndpointOut listAttemptsForEndpoint(final String appId, final String msgId, final String endpointId,
final MessageAttemptListOptions options) throws ApiException {
try {
Expand Down
6 changes: 6 additions & 0 deletions python/svix/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,9 @@ async def list_attempted_destinations(
**options.to_dict(),
)

@deprecated(
reason="use list_by_msg instead, passing the endpoint id through options"
)
async def list_attempts_for_endpoint(
self,
app_id: str,
Expand Down Expand Up @@ -1378,6 +1381,9 @@ def list_attempted_destinations(
**options.to_dict(),
)

@deprecated(
reason="use list_by_msg instead, passing the endpoint id through options"
)
def list_attempts_for_endpoint(
self,
app_id: str,
Expand Down

0 comments on commit eeea6a3

Please sign in to comment.