Skip to content

digitalcore: switch to API #16111

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

Merged
merged 3 commits into from
Aug 10, 2025
Merged

digitalcore: switch to API #16111

merged 3 commits into from
Aug 10, 2025

Conversation

mynameisbogdan
Copy link
Contributor

@mynameisbogdan mynameisbogdan added the Ready for Review Awaiting review label Aug 9, 2025
@garfield69 garfield69 removed their request for review August 9, 2025 16:37
@garfield69
Copy link
Contributor

I do not have an account on DC so I cannot test.
Question: Is there a test that can be coded in the login block to validate that the api key is good?
For example, something similar to what is done for unit3d api, albeit not necessarily the same method, but you get the gist ;-)

login:
path: /api/torrents
method: get
error:
- selector: a[href*="/login"]
message:
text: "The API key was not accepted by {{ .Config.sitelink }}."
- selector: :root:contains("Account is Banned")

@mynameisbogdan
Copy link
Contributor Author

I'll have to check later, but most likely the same path without query arguments. And depending on what errors it returns.

login:
  method: get
  path: /api/v1/torrents

Copy link
Contributor

@ilike2burnthing ilike2burnthing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working. The suggested login block can be added. 401 Unauthorized, check your credentials is returned when incorrect or no credentials are entered, so no need for errors or test.

@garfield69 garfield69 linked an issue Aug 9, 2025 that may be closed by this pull request
@garfield69 garfield69 merged commit 9b5422a into master Aug 10, 2025
25 checks passed
@garfield69 garfield69 deleted the digitalcore-api branch August 10, 2025 05:27
@mynameisbogdan
Copy link
Contributor Author

Thanks for the change. :D

@garfield69
Copy link
Contributor

v0.22.2256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for Review Awaiting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQ] DigitalCore
3 participants