Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark a few deprecated methods as such #1624

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading