bug fix, code cleanup
This commit is contained in:
parent
5e53678fb2
commit
9495d34f20
|
@ -3,10 +3,14 @@ package org.nuclearfog.twidda.backend.items;
|
||||||
public class Message {
|
public class Message {
|
||||||
|
|
||||||
private final long messageId;
|
private final long messageId;
|
||||||
private final TwitterUser sender, receiver;
|
|
||||||
private final String message;
|
|
||||||
private final long time;
|
private final long time;
|
||||||
|
|
||||||
|
private final TwitterUser sender;
|
||||||
|
private final TwitterUser receiver;
|
||||||
|
|
||||||
|
private final String message;
|
||||||
|
|
||||||
|
|
||||||
public Message(long messageId, TwitterUser sender, TwitterUser receiver, long time, String message) {
|
public Message(long messageId, TwitterUser sender, TwitterUser receiver, long time, String message) {
|
||||||
this.messageId = messageId;
|
this.messageId = messageId;
|
||||||
this.sender = sender;
|
this.sender = sender;
|
||||||
|
@ -59,4 +63,5 @@ public class Message {
|
||||||
public long getTime() {
|
public long getTime() {
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,15 +1,15 @@
|
||||||
package org.nuclearfog.twidda.backend.items;
|
package org.nuclearfog.twidda.backend.items;
|
||||||
|
|
||||||
public class Trend {
|
public class Trend {
|
||||||
private final String trend;
|
|
||||||
private final int position;
|
private final int position;
|
||||||
|
private final String trend;
|
||||||
|
|
||||||
public Trend(int position, String trend) {
|
public Trend(int position, String trend) {
|
||||||
this.position = position;
|
this.position = position;
|
||||||
this.trend = trend;
|
this.trend = trend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get Trend name
|
* get Trend name
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,6 @@ public class Trend {
|
||||||
return trend;
|
return trend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get trend rank
|
* get trend rank
|
||||||
*
|
*
|
||||||
|
@ -28,4 +27,5 @@ public class Trend {
|
||||||
public int getPosition() {
|
public int getPosition() {
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -3,30 +3,36 @@ package org.nuclearfog.twidda.backend.items;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
public class Tweet {
|
public class Tweet {
|
||||||
|
|
||||||
|
private final long tweetID;
|
||||||
|
private final long time;
|
||||||
|
private final String tweet;
|
||||||
|
private final String[] media;
|
||||||
|
private final String source;
|
||||||
|
|
||||||
private final TwitterUser user;
|
private final TwitterUser user;
|
||||||
private final Tweet embedded;
|
private final Tweet embedded;
|
||||||
private final long tweetID;
|
|
||||||
private final String tweet;
|
|
||||||
private final String replyName;
|
|
||||||
private final String source;
|
|
||||||
private final long time;
|
|
||||||
private final long replyID;
|
private final long replyID;
|
||||||
private final long retweetId;
|
|
||||||
private final long replyUserId;
|
private final long replyUserId;
|
||||||
private final int retweet;
|
private final String replyName;
|
||||||
private final int favorit;
|
|
||||||
private final String[] media;
|
private final int retweetCount;
|
||||||
|
private final int favoriteCount;
|
||||||
|
|
||||||
private final boolean retweeted;
|
private final boolean retweeted;
|
||||||
private final boolean favorized;
|
private final boolean favorized;
|
||||||
|
|
||||||
|
private final long retweetId;
|
||||||
|
|
||||||
public Tweet(long tweetID, int retweet, int favorit, TwitterUser user, String tweet, long time,
|
|
||||||
|
public Tweet(long tweetID, int retweetCount, int favoriteCount, TwitterUser user, String tweet, long time,
|
||||||
String replyName, long replyUserId, String[] media, String source, long replyID,
|
String replyName, long replyUserId, String[] media, String source, long replyID,
|
||||||
@Nullable Tweet embedded, long retweetId, boolean retweeted, boolean favorized) {
|
Tweet embedded, long retweetId, boolean retweeted, boolean favorized) {
|
||||||
this.tweetID = tweetID;
|
this.tweetID = tweetID;
|
||||||
this.user = user;
|
this.user = user;
|
||||||
this.retweet = retweet;
|
this.retweetCount = retweetCount;
|
||||||
this.favorit = favorit;
|
this.favoriteCount = favoriteCount;
|
||||||
this.tweet = tweet;
|
this.tweet = tweet;
|
||||||
this.time = time;
|
this.time = time;
|
||||||
this.replyID = replyID;
|
this.replyID = replyID;
|
||||||
|
@ -40,7 +46,6 @@ public class Tweet {
|
||||||
this.replyUserId = replyUserId;
|
this.replyUserId = replyUserId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tweet ID
|
* Tweet ID
|
||||||
*
|
*
|
||||||
|
@ -138,7 +143,7 @@ public class Tweet {
|
||||||
* @return retweet count
|
* @return retweet count
|
||||||
*/
|
*/
|
||||||
public int getRetweetCount() {
|
public int getRetweetCount() {
|
||||||
return retweet;
|
return retweetCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -147,7 +152,7 @@ public class Tweet {
|
||||||
* @return favor count
|
* @return favor count
|
||||||
*/
|
*/
|
||||||
public int getFavorCount() {
|
public int getFavorCount() {
|
||||||
return favorit;
|
return favoriteCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -176,4 +181,5 @@ public class Tweet {
|
||||||
public boolean favorized() {
|
public boolean favorized() {
|
||||||
return favorized;
|
return favorized;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,26 +1,32 @@
|
||||||
package org.nuclearfog.twidda.backend.items;
|
package org.nuclearfog.twidda.backend.items;
|
||||||
|
|
||||||
public class TwitterUser {
|
public class TwitterUser {
|
||||||
private final String username;
|
|
||||||
private final String screenname;
|
|
||||||
private final String bio;
|
|
||||||
private final String profileImg;
|
|
||||||
private final String bannerImg;
|
|
||||||
private final String location;
|
|
||||||
private final String link;
|
|
||||||
private final boolean isVerified;
|
|
||||||
private final boolean isLocked;
|
|
||||||
private final long userID;
|
private final long userID;
|
||||||
private final long created;
|
private final long created;
|
||||||
|
|
||||||
|
private final String username;
|
||||||
|
private final String screenname;
|
||||||
|
|
||||||
|
private final boolean isVerified;
|
||||||
|
private final boolean isLocked;
|
||||||
|
|
||||||
private final int following;
|
private final int following;
|
||||||
private final int follower;
|
private final int follower;
|
||||||
|
|
||||||
|
private final String bio;
|
||||||
|
private final String location;
|
||||||
|
private final String link;
|
||||||
|
|
||||||
|
private final String profileImg;
|
||||||
|
private final String bannerImg;
|
||||||
|
|
||||||
|
|
||||||
public TwitterUser(long userID, String username, String screenname, String profileImg,
|
public TwitterUser(long userID, String username, String screenname, String profileImg,
|
||||||
String bio, String location, boolean isVerified, boolean isLocked, String link,
|
String bio, String location, boolean isVerified, boolean isLocked, String link,
|
||||||
String bannerImg, long created, int following, int follower) {
|
String bannerImg, long created, int following, int follower) {
|
||||||
this.userID = userID;
|
this.userID = userID;
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.screenname = '@' + screenname;
|
this.screenname = screenname;
|
||||||
this.profileImg = profileImg;
|
this.profileImg = profileImg;
|
||||||
this.bio = bio;
|
this.bio = bio;
|
||||||
this.link = link;
|
this.link = link;
|
||||||
|
@ -149,4 +155,5 @@ public class TwitterUser {
|
||||||
public int getFollower() {
|
public int getFollower() {
|
||||||
return follower;
|
return follower;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue