Skip to content

Commit ec89b2e

Browse files
committed
Fix #151 ; Work on #142 ; Work on #140 ; Work on #75 ; Fix #43 ; Work on #95
1 parent b0d755f commit ec89b2e

180 files changed

Lines changed: 5376 additions & 1505 deletions

File tree

Some content is hidden

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

core/src/main/java/eu/bittrade/libs/steemj/SteemJ.java

Lines changed: 345 additions & 356 deletions
Large diffs are not rendered by default.

core/src/main/java/eu/bittrade/libs/steemj/apis/database/DatabaseApi.java

Lines changed: 679 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package eu.bittrade.libs.steemj.apis.database.enums;
2+
3+
/**
4+
* An enumeration for all existing order types.
5+
*
6+
* @author <a href="http://steemit.com/@dez1337">dez1337</a>
7+
*/
8+
public enum OrderType {
9+
/** Indicates that the operation is of type "buy". */
10+
BUY,
11+
/** Indicates that the operation is of type "sell". */
12+
SELL
13+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
package eu.bittrade.libs.steemj.apis.database.models.state;
2+
3+
import org.apache.commons.lang3.builder.ToStringBuilder;
4+
import org.joou.UInteger;
5+
6+
import com.fasterxml.jackson.annotation.JsonProperty;
7+
8+
import eu.bittrade.libs.steemj.base.models.TimePointSec;
9+
10+
/**
11+
* This class represents a Steem "candle_stick" object.
12+
*
13+
* @author <a href="http://steemit.com/@dez1337">dez1337</a>
14+
*/
15+
public class CandleStick {
16+
@JsonProperty("open_time")
17+
private TimePointSec openTime;
18+
@JsonProperty("period")
19+
// The original type is "uint32_t".
20+
private UInteger period;
21+
@JsonProperty("high")
22+
private double high;
23+
@JsonProperty("low")
24+
private double low;
25+
@JsonProperty("open")
26+
private double opne;
27+
@JsonProperty("close")
28+
private double close;
29+
@JsonProperty("steem_volume")
30+
private double steemVolume;
31+
@JsonProperty("dollar_volume")
32+
private double dollarVolume;
33+
34+
/**
35+
* This object is only used to wrap the JSON response in a POJO, so
36+
* therefore this class should not be instantiated.
37+
*/
38+
protected CandleStick() {
39+
}
40+
41+
/**
42+
* @return the openTime
43+
*/
44+
public TimePointSec getOpenTime() {
45+
return openTime;
46+
}
47+
48+
/**
49+
* @return the period
50+
*/
51+
public UInteger getPeriod() {
52+
return period;
53+
}
54+
55+
/**
56+
* @return the high
57+
*/
58+
public double getHigh() {
59+
return high;
60+
}
61+
62+
/**
63+
* @return the low
64+
*/
65+
public double getLow() {
66+
return low;
67+
}
68+
69+
/**
70+
* @return the opne
71+
*/
72+
public double getOpne() {
73+
return opne;
74+
}
75+
76+
/**
77+
* @return the close
78+
*/
79+
public double getClose() {
80+
return close;
81+
}
82+
83+
/**
84+
* @return the steemVolume
85+
*/
86+
public double getSteemVolume() {
87+
return steemVolume;
88+
}
89+
90+
/**
91+
* @return the dollarVolume
92+
*/
93+
public double getDollarVolume() {
94+
return dollarVolume;
95+
}
96+
97+
@Override
98+
public String toString() {
99+
return ToStringBuilder.reflectionToString(this);
100+
}
101+
}

core/src/main/java/eu/bittrade/libs/steemj/base/models/Comment.java renamed to core/src/main/java/eu/bittrade/libs/steemj/apis/database/models/state/Comment.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
package eu.bittrade.libs.steemj.base.models;
1+
package eu.bittrade.libs.steemj.apis.database.models.state;
22

33
import java.math.BigInteger;
44

55
import org.apache.commons.lang3.builder.ToStringBuilder;
66

77
import com.fasterxml.jackson.annotation.JsonProperty;
88

9+
import eu.bittrade.libs.steemj.base.models.AccountName;
10+
import eu.bittrade.libs.steemj.base.models.Asset;
11+
import eu.bittrade.libs.steemj.base.models.Permlink;
12+
import eu.bittrade.libs.steemj.base.models.TimePointSec;
13+
914
/**
1015
* This class represents the Steem "comment_api_obj".
1116
*

core/src/main/java/eu/bittrade/libs/steemj/base/models/Discussion.java renamed to core/src/main/java/eu/bittrade/libs/steemj/apis/database/models/state/Discussion.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package eu.bittrade.libs.steemj.base.models;
1+
package eu.bittrade.libs.steemj.apis.database.models.state;
22

33
import java.util.Date;
44
import java.util.List;
@@ -7,6 +7,10 @@
77

88
import com.fasterxml.jackson.annotation.JsonProperty;
99

10+
import eu.bittrade.libs.steemj.base.models.AccountName;
11+
import eu.bittrade.libs.steemj.base.models.Asset;
12+
import eu.bittrade.libs.steemj.base.models.VoteState;
13+
1014
/**
1115
* This class represents the Steem "discussion" object.
1216
*
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
package eu.bittrade.libs.steemj.apis.database.models.state;
2+
3+
import java.util.List;
4+
5+
import org.apache.commons.lang3.builder.ToStringBuilder;
6+
7+
import com.fasterxml.jackson.annotation.JsonProperty;
8+
9+
/**
10+
* This class represents a Steem "discussion_index" object.
11+
*
12+
* @author <a href="http://steemit.com/@dez1337">dez1337</a>
13+
*/
14+
public class DiscussionIndex {
15+
/** The category by which everything is filtered. */
16+
@JsonProperty("category")
17+
private String category;
18+
/** The trending posts over the last 24 hours. */
19+
@JsonProperty("trending")
20+
private List<String> trending;
21+
// TODO: Is that JavaDoc correct?
22+
/** The pending posts by payout. */
23+
@JsonProperty("payout")
24+
private List<String> payout;
25+
// TODO: Is that JavaDoc correct?
26+
/** The pending comments by payout. */
27+
@JsonProperty("payout_comments")
28+
private List<String> payout_comments;
29+
// TODO: Is that JavaDoc correct?
30+
/** The pending lifetime payout. */
31+
@JsonProperty("trending30")
32+
private List<String> trending30;
33+
/** . */
34+
@JsonProperty("created")
35+
private List<String> created;
36+
/** . */
37+
@JsonProperty("responses")
38+
private List<String> responses;
39+
/** . */
40+
@JsonProperty("updated")
41+
private List<String> updated;
42+
/** . */
43+
@JsonProperty("active")
44+
private List<String> active;
45+
/** . */
46+
@JsonProperty("votes")
47+
private List<String> votes;
48+
/** . */
49+
@JsonProperty("cashout")
50+
private List<String> cashout;
51+
/** . */
52+
@JsonProperty("maturing")
53+
private List<String> maturing;
54+
/** . */
55+
@JsonProperty("best")
56+
private List<String> best;
57+
/** . */
58+
@JsonProperty("hot")
59+
private List<String> hot;
60+
/** . */
61+
@JsonProperty("promoted")
62+
private List<String> promoted;
63+
64+
/**
65+
* This object is only used to wrap the JSON response in a POJO, so
66+
* therefore this class should not be instantiated.
67+
*/
68+
protected DiscussionIndex() {
69+
}
70+
71+
/**
72+
* @return the category
73+
*/
74+
public String getCategory() {
75+
return category;
76+
}
77+
78+
/**
79+
* @return the trending
80+
*/
81+
public List<String> getTrending() {
82+
return trending;
83+
}
84+
85+
/**
86+
* @return the payout
87+
*/
88+
public List<String> getPayout() {
89+
return payout;
90+
}
91+
92+
/**
93+
* @return the payout_comments
94+
*/
95+
public List<String> getPayout_comments() {
96+
return payout_comments;
97+
}
98+
99+
/**
100+
* @return the trending30
101+
*/
102+
public List<String> getTrending30() {
103+
return trending30;
104+
}
105+
106+
/**
107+
* @return the created
108+
*/
109+
public List<String> getCreated() {
110+
return created;
111+
}
112+
113+
/**
114+
* @return the responses
115+
*/
116+
public List<String> getResponses() {
117+
return responses;
118+
}
119+
120+
/**
121+
* @return the updated
122+
*/
123+
public List<String> getUpdated() {
124+
return updated;
125+
}
126+
127+
/**
128+
* @return the active
129+
*/
130+
public List<String> getActive() {
131+
return active;
132+
}
133+
134+
/**
135+
* @return the votes
136+
*/
137+
public List<String> getVotes() {
138+
return votes;
139+
}
140+
141+
/**
142+
* @return the cashout
143+
*/
144+
public List<String> getCashout() {
145+
return cashout;
146+
}
147+
148+
/**
149+
* @return the maturing
150+
*/
151+
public List<String> getMaturing() {
152+
return maturing;
153+
}
154+
155+
/**
156+
* @return the best
157+
*/
158+
public List<String> getBest() {
159+
return best;
160+
}
161+
162+
/**
163+
* @return the hot
164+
*/
165+
public List<String> getHot() {
166+
return hot;
167+
}
168+
169+
/**
170+
* @return the promoted
171+
*/
172+
public List<String> getPromoted() {
173+
return promoted;
174+
}
175+
176+
@Override
177+
public String toString() {
178+
return ToStringBuilder.reflectionToString(this);
179+
}
180+
}

0 commit comments

Comments
 (0)