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