Skip to content

Add configurable API key support for Rule34Ripper #2145#2172

Open
apoorvdarshan wants to merge 2 commits intoRipMeApp:mainfrom
apoorvdarshan:rule34-api-key-support
Open

Add configurable API key support for Rule34Ripper #2145#2172
apoorvdarshan wants to merge 2 commits intoRipMeApp:mainfrom
apoorvdarshan:rule34-api-key-support

Conversation

@apoorvdarshan
Copy link

Summary

  • Rule34.xxx now requires api_key and user_id for DAPI access (#2145)
  • Reads credentials from config (rule34.api_key, rule34.user_id) and appends them as query parameters to API requests
  • Warns users with actionable setup instructions when credentials are missing (links to https://rule34.xxx/index.php?page=account&s=options)
  • Follows existing patterns (E621Ripper's loadConfig() / sendUpdate approach)

Test plan

  • Added testGetAPIUrlWithCredentials — verifies credentials appear in constructed API URL
  • Added testGetAPIUrlWithoutCredentials — verifies no credentials leak when unconfigured
  • Renamed misnamed testShesFreakyRiptestRule34Rip
  • Manual test: set rule34.api_key and rule34.user_id in rip.properties and rip a Rule34 tag URL

Closes #2145

Rule34.xxx now requires api_key and user_id for API access. Read
credentials from config (rule34.api_key, rule34.user_id) and append
them as query parameters. Warns users with setup instructions when
credentials are missing.
- Extract DOMAIN and API_BASE_URL constants for the domain URL
- Throw MalformedURLException in getAPIUrl() when credentials are missing
- Update test to assert exception on missing credentials
@apoorvdarshan
Copy link
Author

Addressed both review comments:

  1. Extracted DOMAIN and API_BASE_URL constants — used across canRip(), getGID(), getDomain(), getAPIUrl(), and loadConfig().
  2. getAPIUrl() now throws MalformedURLException when credentials are missing, with an actionable error message pointing to the settings page. Updated the test to assert the exception.

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.

program fails to load site for ripping

2 participants