Skip to content
Snippets Groups Projects
Commit b86527a7 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Document API client classes for spam report

parent 933d9a0c
Branches
Tags
1 merge request!3Add additional metrics to the spam report to identify bad users
......@@ -20,15 +20,29 @@ import org.eclipsefoundation.reports.api.models.EclipseForumResponse;
import org.eclipsefoundation.reports.api.models.EclipseMailingListsResponse;
/**
*
* Connects to the Eclipse Foundation metadata links for users to lookup whether users have interacted with common
* services, such as the forum and mailing list subscriptions.
*/
@RegisterRestClient(baseUri = "https://api.eclipse.org/account/profile")
public interface AccountsAPI {
/**
* Lookup forum post information for the given user.
*
* @param user username of individual to lookup
* @return list of forum posts for the passed user if they exist
*/
@GET
@Path("{user}/forum")
EclipseForumResponse getForumPostsForUser(@PathParam("user") String user);
/**
* Lookup mailing list subscription information for the given user.
*
* @param user username of individual to lookup
* @return list of mailing list subscriptions for the passed user if they exist
*/
@GET
@Path("{user}/mailing-list")
EclipseMailingListsResponse getMailingListForUser(@PathParam("user") String user);
......
......@@ -20,15 +20,25 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import org.eclipsefoundation.reports.api.models.MediaWikiQueryResponse;
/**
*
* Client for interacting with the Eclipse mediawiki to look up whether users have mad contributions in the wiki as an
* active user metric.
*/
@RegisterRestClient(baseUri = "https://wiki.eclipse.org")
public interface MediaWikiAPI {
/**
* Query the mediawiki instance to look up user contributions as defined in the param object.
*
* @param param wrapped parameters used to query user contributions
* @return the response from mediawiki for the query.
*/
@GET
@Path("api.php")
MediaWikiQueryResponse query(@BeanParam MWQuery param);
/**
* Parameter wrapper for mediawiki queries, allowing us to look up specific user stats for requested actions.
*/
public class MWQuery {
@QueryParam("ucuser")
public final String user;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment