Skip to content

Commit 587eaa5

Browse files
author
Swanis
committed
Pushed the source code
1 parent 6d0ddb0 commit 587eaa5

File tree

67 files changed

+2663
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2663
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#intellij
2+
.idea/
3+
*.iml
4+
5+
#maven
6+
target/

pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>is.swan</groupId>
8+
<artifactId>mcmarket-api-java-wrapper</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<maven.compiler.source>16</maven.compiler.source>
13+
<maven.compiler.target>16</maven.compiler.target>
14+
</properties>
15+
16+
<dependencies>
17+
<dependency>
18+
<groupId>com.google.code.gson</groupId>
19+
<artifactId>gson</artifactId>
20+
<version>2.8.7</version>
21+
</dependency>
22+
</dependencies>
23+
</project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package is.swan.mcmarketapi;
2+
3+
public class Token {
4+
5+
private final String tokenString;
6+
private final Type type;
7+
8+
public Token(String tokenString, Type type) {
9+
this.tokenString = tokenString;
10+
this.type = type;
11+
}
12+
13+
@Override
14+
public String toString() {
15+
return type.displayName + " " + tokenString;
16+
}
17+
18+
public enum Type {
19+
PRIVATE("Private"),
20+
SHARED("Shared");
21+
22+
private final String displayName;
23+
24+
Type(String displayName) {
25+
this.displayName = displayName;
26+
}
27+
}
28+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package is.swan.mcmarketapi.classes;
2+
3+
public class Alert {
4+
5+
private final int caused_member_id;
6+
private final String content_type;
7+
private final int content_id;
8+
private final String alert_type;
9+
private final long alert_date;
10+
11+
public Alert(int caused_member_id, String content_type, int content_id, String alert_type, long alert_date) {
12+
this.caused_member_id = caused_member_id;
13+
this.content_type = content_type;
14+
this.content_id = content_id;
15+
this.alert_type = alert_type;
16+
this.alert_date = alert_date;
17+
}
18+
19+
public int getCausedMemberId() {
20+
return caused_member_id;
21+
}
22+
23+
public String getContentType() {
24+
return content_type;
25+
}
26+
27+
public int getContentId() {
28+
return content_id;
29+
}
30+
31+
public String getAlertType() {
32+
return alert_type;
33+
}
34+
35+
public long getAlertDate() {
36+
return alert_date;
37+
}
38+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package is.swan.mcmarketapi.classes;
2+
3+
public class Ban {
4+
5+
private final int member_id, banned_by_id;
6+
private final long ban_date;
7+
private final String reason;
8+
9+
public Ban(int member_id, int banned_by_id, long ban_date, String reason) {
10+
this.member_id = member_id;
11+
this.banned_by_id = banned_by_id;
12+
this.ban_date = ban_date;
13+
this.reason = reason;
14+
}
15+
16+
public int getMemberId() {
17+
return member_id;
18+
}
19+
20+
public int getBannedById() {
21+
return banned_by_id;
22+
}
23+
24+
public long getBanDate() {
25+
return ban_date;
26+
}
27+
28+
public String getReason() {
29+
return reason;
30+
}
31+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
package is.swan.mcmarketapi.classes;
2+
3+
public class Conversation {
4+
5+
private final int conversation_id;
6+
private final String title;
7+
private final long creation_date;
8+
private final int creator_id;
9+
private final long last_message_id, last_read_date;
10+
private final boolean open;
11+
private final int reply_count;
12+
private final int[] recipient_ids;
13+
14+
public Conversation(int conversation_id, String title, long creation_date, int creator_id, long last_message_id, long last_read_date, boolean open, int reply_count, int[] recipient_ids) {
15+
this.conversation_id = conversation_id;
16+
this.title = title;
17+
this.creation_date = creation_date;
18+
this.creator_id = creator_id;
19+
this.last_message_id = last_message_id;
20+
this.last_read_date = last_read_date;
21+
this.open = open;
22+
this.reply_count = reply_count;
23+
this.recipient_ids = recipient_ids;
24+
}
25+
26+
public int getConversationId() {
27+
return conversation_id;
28+
}
29+
30+
public String getTitle() {
31+
return title;
32+
}
33+
34+
public long getCreationDate() {
35+
return creation_date;
36+
}
37+
38+
public int getCreatorId() {
39+
return creator_id;
40+
}
41+
42+
public long getLastMessageId() {
43+
return last_message_id;
44+
}
45+
46+
public long getLastReadDate() {
47+
return last_read_date;
48+
}
49+
50+
public boolean isOpen() {
51+
return open;
52+
}
53+
54+
public int getReplyCount() {
55+
return reply_count;
56+
}
57+
58+
public int[] getRecipientIds() {
59+
return recipient_ids;
60+
}
61+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
package is.swan.mcmarketapi.classes;
2+
3+
public class DetailedResource {
4+
5+
private final int resource_id, author_id;
6+
private final String title, tag_line, description;
7+
private final long release_date, last_update_date;
8+
private final boolean moderated;
9+
private final String category_title;
10+
private final int current_version_id, discussion_thread_id;
11+
private final double price;
12+
private final String currency;
13+
private final int download_count, review_count;
14+
private final double review_average;
15+
16+
public DetailedResource(int resource_id, int author_id, String title, String tag_line, String description, long release_date, long last_update_date, boolean moderated, String category_title, int current_version_id, int discussion_thread_id, double price, String currency, int download_count, int review_count, double review_average) {
17+
this.resource_id = resource_id;
18+
this.author_id = author_id;
19+
this.title = title;
20+
this.tag_line = tag_line;
21+
this.description = description;
22+
this.release_date = release_date;
23+
this.last_update_date = last_update_date;
24+
this.moderated = moderated;
25+
this.category_title = category_title;
26+
this.current_version_id = current_version_id;
27+
this.discussion_thread_id = discussion_thread_id;
28+
this.price = price;
29+
this.currency = currency;
30+
this.download_count = download_count;
31+
this.review_count = review_count;
32+
this.review_average = review_average;
33+
}
34+
35+
public int getResourceId() {
36+
return resource_id;
37+
}
38+
39+
public int getAuthorId() {
40+
return author_id;
41+
}
42+
43+
public String getTitle() {
44+
return title;
45+
}
46+
47+
public String getTagLine() {
48+
return tag_line;
49+
}
50+
51+
public String getDescription() {
52+
return description;
53+
}
54+
55+
public long getReleaseDate() {
56+
return release_date;
57+
}
58+
59+
public long getLastUpdateDate() {
60+
return last_update_date;
61+
}
62+
63+
public boolean isModerated() {
64+
return moderated;
65+
}
66+
67+
public String getCategoryTitle() {
68+
return category_title;
69+
}
70+
71+
public int getCurrentVersionId() {
72+
return current_version_id;
73+
}
74+
75+
public int getDiscussionThreadId() {
76+
return discussion_thread_id;
77+
}
78+
79+
public double getPrice() {
80+
return price;
81+
}
82+
83+
public String getCurrency() {
84+
return currency;
85+
}
86+
87+
public int getDownloadCount() {
88+
return download_count;
89+
}
90+
91+
public int getReviewCount() {
92+
return review_count;
93+
}
94+
95+
public double getReviewAverage() {
96+
return review_average;
97+
}
98+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package is.swan.mcmarketapi.classes;
2+
3+
public class DetailedThread {
4+
5+
private final int thread_id;
6+
private final String forum_name, title;
7+
private final int reply_count, view_count;
8+
private final long post_date;
9+
private final boolean thread_open;
10+
private final long last_post_date;
11+
12+
public DetailedThread(int thread_id, String forum_name, String title, int reply_count, int view_count, long post_date, boolean thread_open, long last_post_date) {
13+
this.thread_id = thread_id;
14+
this.forum_name = forum_name;
15+
this.title = title;
16+
this.reply_count = reply_count;
17+
this.view_count = view_count;
18+
this.post_date = post_date;
19+
this.thread_open = thread_open;
20+
this.last_post_date = last_post_date;
21+
}
22+
23+
public int getThreadId() {
24+
return thread_id;
25+
}
26+
27+
public String getForumName() {
28+
return forum_name;
29+
}
30+
31+
public String getTitle() {
32+
return title;
33+
}
34+
35+
public int getReplyCount() {
36+
return reply_count;
37+
}
38+
39+
public int getViewCount() {
40+
return view_count;
41+
}
42+
43+
public long getPostDate() {
44+
return post_date;
45+
}
46+
47+
public boolean isThreadOpen() {
48+
return thread_open;
49+
}
50+
51+
public long getLastPostDate() {
52+
return last_post_date;
53+
}
54+
}

0 commit comments

Comments
 (0)