updates API
This commit is contained in:
parent
abd399a2da
commit
6cdfcd49c1
|
@ -1500,6 +1500,21 @@ public class API {
|
||||||
}
|
}
|
||||||
status.setTags(tags);
|
status.setTags(tags);
|
||||||
|
|
||||||
|
//Retrieves emjis
|
||||||
|
List<Emojis> emojiList = new ArrayList<>();
|
||||||
|
JSONArray emojisTag = resobj.getJSONArray("emojis");
|
||||||
|
if( arrayTag != null){
|
||||||
|
for(int j = 0 ; j < emojisTag.length() ; j++){
|
||||||
|
JSONObject emojisObj = emojisTag.getJSONObject(j);
|
||||||
|
Emojis emojis = new Emojis();
|
||||||
|
emojis.setShortcode(emojisObj.get("shortcode").toString());
|
||||||
|
emojis.setStatic_url(emojisObj.get("static_url").toString());
|
||||||
|
emojis.setUrl(emojisObj.get("url").toString());
|
||||||
|
emojiList.add(emojis);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
status.setEmojis(emojiList);
|
||||||
|
|
||||||
status.setAccount(parseAccountResponse(context, resobj.getJSONObject("account")));
|
status.setAccount(parseAccountResponse(context, resobj.getJSONObject("account")));
|
||||||
status.setContent(resobj.get("content").toString());
|
status.setContent(resobj.get("content").toString());
|
||||||
status.setFavourites_count(Integer.valueOf(resobj.get("favourites_count").toString()));
|
status.setFavourites_count(Integer.valueOf(resobj.get("favourites_count").toString()));
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class Status implements Parcelable {
|
||||||
private ArrayList<Attachment> media_attachments;
|
private ArrayList<Attachment> media_attachments;
|
||||||
private List<Status> replies;
|
private List<Status> replies;
|
||||||
private List<Mention> mentions;
|
private List<Mention> mentions;
|
||||||
private List<Tag> emojis;
|
private List<Emojis> emojis;
|
||||||
private List<Tag> tags;
|
private List<Tag> tags;
|
||||||
private Application application;
|
private Application application;
|
||||||
private String language;
|
private String language;
|
||||||
|
@ -381,11 +381,11 @@ public class Status implements Parcelable {
|
||||||
isVisible = visible;
|
isVisible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Tag> getEmojis() {
|
public List<Emojis> getEmojis() {
|
||||||
return emojis;
|
return emojis;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmojis(List<Tag> emojis) {
|
public void setEmojis(List<Emojis> emojis) {
|
||||||
this.emojis = emojis;
|
this.emojis = emojis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue