Created
May 1, 2023 19:16
-
-
Save NotArchon/c0a2c2e10cd0890d963cb70ddb155e87 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.neox.web.model.voting.callbacks; | |
import com.neox.web.model.voting.VotingCallback; | |
import java.util.Map; | |
public class TopG extends VotingCallback { | |
private static final String SITE_ID = ""; // todo | |
public TopG() { | |
super("topg", 12, "monitor.topg.org"); | |
} | |
@Override | |
public String getSiteLink(String userId) { | |
return "https://topg.org/CATEGORY/in-" + SITE_ID + "-" + userId; | |
} | |
@Override | |
public void process(Map<String, String> params, String post) { | |
String uid = params.getOrDefault("p_resp", null); | |
if(uid == null) | |
throw new IllegalStateException("missing voter uid"); | |
String ip = params.getOrDefault("ip", null); | |
if(ip == null) | |
throw new IllegalStateException("missing voter ip"); | |
queue(uid, ip); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment