Skip to content

Commit

Permalink
profile posts (do not require profile user)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximvdw committed Feb 28, 2018
1 parent 0365d22 commit 3eea107
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/be/maximvdw/spigotsite/api/user/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,10 @@ List<Resource> getPurchasedResources()
/**
* Get a list of profile posts
*
* @param user The logged in user (required for hidden profiles)
* @param profile The profile you want to get the posts from
* @param count amount of posts to fetch
* @param authenticatedUser The logged in user (required for hidden profiles)
* @param count amount of posts to fetch
* @return list of profile posts
* @throws ConnectionFailedException
*/
List<ProfilePost> getProfilePosts(User user, User profile, int count) throws ConnectionFailedException;
List<ProfilePost> getProfilePosts(User authenticatedUser, int count) throws ConnectionFailedException;
}
12 changes: 12 additions & 0 deletions src/main/java/be/maximvdw/spigotsite/api/user/UserManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.List;

import be.maximvdw.spigotsite.api.exceptions.ConnectionFailedException;
import be.maximvdw.spigotsite.api.forum.ProfilePost;
import be.maximvdw.spigotsite.api.user.exceptions.InvalidCredentialsException;
import be.maximvdw.spigotsite.api.user.exceptions.TwoFactorAuthenticationException;

Expand Down Expand Up @@ -135,4 +136,15 @@ User authenticate(String username, String password, User user)
* @throws ConnectionFailedException Connection to Spigot failed
*/
List<User> getOnlineUsers() throws ConnectionFailedException;

/**
* Get a list of profile posts
*
* @param user The logged in user (required for hidden profiles)
* @param profile The profile you want to get the posts from
* @param count amount of posts to fetch
* @return list of profile posts
* @throws ConnectionFailedException
*/
List<ProfilePost> getProfilePosts(User user, User profile, int count) throws ConnectionFailedException;
}

0 comments on commit 3eea107

Please sign in to comment.