Skip to content

Commit

Permalink
profile posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximvdw committed Feb 28, 2018
1 parent 975c6cb commit 0365d22
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>be.maximvdw</groupId>
<artifactId>spigotsite-api</artifactId>
<version>0.2.2-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<name>SpigotSite API</name>
<description>Spigot Site API</description>
<build>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/be/maximvdw/spigotsite/api/SpigotSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public final class SpigotSite {
/* Spigot Site API */
private static SpigotSiteAPI api = null;
/* Spigot Site API Version */
private static String version = "0.2.2-SNAPSHOT";
private static String version = "0.3.0-SNAPSHOT";

/**
* Get spigot site API
Expand Down
32 changes: 32 additions & 0 deletions src/main/java/be/maximvdw/spigotsite/api/forum/ProfilePost.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package be.maximvdw.spigotsite.api.forum;

import be.maximvdw.spigotsite.api.user.User;

import java.util.Date;

/**
* ProfilePost
* Created by Maxim on 28/02/2018.
*/
public interface ProfilePost {
/**
* Get the author of the post
*
* @return Spigot User
*/
User getAuthor();

/**
* Get post date
*
* @return post date
*/
Date getPostDate();

/**
* Get profile message
*
* @return profile message
*/
String getMessage();
}
12 changes: 12 additions & 0 deletions src/main/java/be/maximvdw/spigotsite/api/user/User.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.resource.Resource;

/**
Expand Down Expand Up @@ -76,4 +77,15 @@ List<Resource> getPurchasedResources()
* @return two factor auth
*/
boolean hasTwoFactorAuthentication();

/**
* 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 0365d22

Please sign in to comment.