Skip to content
Snippets Groups Projects

feat: Add ability to fetch profile data via additional fields

10 files
+ 277
37
Compare changes
  • Side-by-side
  • Inline
Files
10
@@ -18,6 +18,7 @@ import javax.ws.rs.BeanParam;
@@ -18,6 +18,7 @@ import javax.ws.rs.BeanParam;
import javax.ws.rs.GET;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.Path;
import javax.ws.rs.Path;
 
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.Produces;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
@@ -43,4 +44,32 @@ public interface ProfileAPI {
@@ -43,4 +44,32 @@ public interface ProfileAPI {
@GET
@GET
@Path("/account/profile")
@Path("/account/profile")
List<EfUser> getUsers(@HeaderParam(HttpHeaderNames.AUTHORIZATION) String token, @BeanParam UserSearchParams params);
List<EfUser> getUsers(@HeaderParam(HttpHeaderNames.AUTHORIZATION) String token, @BeanParam UserSearchParams params);
 
 
/**
 
* Fetches a profile that matches the given Ef username. An anauthenticated call
 
* will return public profile data that does not include the user email or their
 
* location data.
 
*
 
* @param token The bearer oauth2 token.
 
* @param username The desired user's username.
 
* @return An efUser entity if it exists.
 
*/
 
@GET
 
@Path("/account/profile/{username}")
 
EfUser getUserByEfUsername(@HeaderParam(HttpHeaderNames.AUTHORIZATION) String token,
 
@PathParam("username") String username);
 
 
/**
 
* Fetches a profile that matches the given GH handle. An anauthenticated call
 
* will return public profile data that does not include the user email or their
 
* location data.
 
*
 
* @param token The bearer oauth2 token.
 
* @param handle The desired user's GH handle.
 
* @return An efUser entity if it exists.
 
*/
 
@GET
 
@Path("/github/profile/{handle}")
 
EfUser getUserByGithubHandle(@HeaderParam(HttpHeaderNames.AUTHORIZATION) String token,
 
@PathParam("handle") String handle);
}
}
 
\ No newline at end of file
Loading