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

Feature [#35]: Add support for delete api #44

Merged
merged 7 commits into from
Dec 28, 2024

Conversation

djnovin
Copy link
Contributor

@djnovin djnovin commented Dec 27, 2024

Summary

  • Added delete_api method to the ApiService, enabling users to remove APIs programmatically.
  • Integrated a new Route to support the delete_api method for seamless API deletion.
  • Introduced supporting models required for the delete_api functionality.

Checklist

  • I have run cargo test and all tests pass.
  • I have run cargo fmt and the code is formatted.
  • I have run cargo clippy in pedantic mode and refactored.
  • I have included documentation for any new structs or methods.
  • I have updated tests for any code I addded/changed/deleted.
  • I have updated the CHANGELOG to include my changes.

Related Issues

- Implement new `delete_api` method in `ApiService` struct
- Implement new `delete_api` method in `Client` struct
- Add new `DeleteApiRequest` struct as per Unkey Docs
- Add new static variable `DELETE_API`
- Add DocStrings to include usage and examples for new `delete_api` methods

Refs: Jonxslays#38
@Jonxslays
Copy link
Owner

From a glance this looks great. I'll merge and release after work tonight. Thanks for the contribution!

@Jonxslays Jonxslays changed the title Feature [#38]: Add support for delete api Feature [#35]: Add support for delete api Dec 28, 2024
@Jonxslays Jonxslays linked an issue Dec 28, 2024 that may be closed by this pull request
@Jonxslays
Copy link
Owner

I got another chance to look back at this today.

The Delete API endpoint accepts a request body, not a query parameter - I fixed that for you.
But that begs the question, did you not test this before opening your PR?

@Jonxslays Jonxslays merged commit 007130a into Jonxslays:master Dec 28, 2024
12 checks passed
djnovin added a commit to djnovin/unkey that referenced this pull request Dec 28, 2024
* feat: Add support for delete api (Jonxslays#38)

---------

Co-authored-by: Jonxslays <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] Add support for delete api
2 participants