Android Open Source - Android-VKontakte-SDK Group Topic






From Project

Back to project page Android-VKontakte-SDK.

License

The source code is released under:

MIT License

If you think the Android project Android-VKontakte-SDK listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.perm.kate.api;
/*from w  w w  .j  a  v  a2s .  c  om*/
import java.io.Serializable;
import org.json.JSONException;
import org.json.JSONObject;

public class GroupTopic implements Serializable {
    private static final long serialVersionUID = 1L;
    public long tid;
    public long gid;
    public String title;
    public long created;
    public long created_by;
    public long updated;
    public long updated_by;
    public int is_closed;
    public int is_fixed;
    public int comments;
    
    public static GroupTopic parse(JSONObject o) throws NumberFormatException, JSONException {
        GroupTopic topic = new GroupTopic();
        topic.tid = o.getLong("id");
        topic.title = Api.unescape(o.getString("title"));
        topic.created = o.optLong("created");
        topic.created_by = o.optLong("created_by");
        topic.updated = o.optLong("updated");
        topic.updated_by = o.optLong("updated_by");
        topic.is_closed = o.optInt("is_closed");
        topic.is_fixed = o.optInt("is_fixed");
        topic.comments = o.optInt("comments");
        return topic;
    }
    
    public static GroupTopic parseForNotifications(JSONObject o) throws NumberFormatException, JSONException {
        GroupTopic topic = new GroupTopic();
        topic.tid = o.getLong("id");
        topic.title = Api.unescape(o.getString("title"));
        topic.gid = -o.getLong("owner_id");
        //topic.created = Long.parseLong(o.getString("created"));
        //topic.created_by = Long.parseLong(o.getString("created_by"));
        //topic.updated = Long.parseLong(o.getString("updated"));
        //topic.updated_by = Long.parseLong(o.getString("updated_by"));
        //topic.is_closed = Integer.parseInt(o.getString("is_closed"));
        //topic.is_fixed = Integer.parseInt(o.getString("is_fixed"));
        //topic.comments = Integer.parseInt(o.getString("comments"));
        return topic;
    }
}




Java Source Code List

com.perm.kate.api.Album.java
com.perm.kate.api.Api.java
com.perm.kate.api.Attachment.java
com.perm.kate.api.AudioAlbum.java
com.perm.kate.api.Audio.java
com.perm.kate.api.Auth.java
com.perm.kate.api.BanInfo.java
com.perm.kate.api.BannArg.java
com.perm.kate.api.City.java
com.perm.kate.api.CommentList.java
com.perm.kate.api.Comment.java
com.perm.kate.api.Constants.java
com.perm.kate.api.Contact.java
com.perm.kate.api.Counters.java
com.perm.kate.api.Country.java
com.perm.kate.api.Document.java
com.perm.kate.api.FriendsList.java
com.perm.kate.api.Geo.java
com.perm.kate.api.Gift.java
com.perm.kate.api.Graffiti.java
com.perm.kate.api.GroupBanItem.java
com.perm.kate.api.GroupTopic.java
com.perm.kate.api.Group.java
com.perm.kate.api.IdsPair.java
com.perm.kate.api.KException.java
com.perm.kate.api.LastActivity.java
com.perm.kate.api.Link.java
com.perm.kate.api.Media.java
com.perm.kate.api.Message.java
com.perm.kate.api.NameCases.java
com.perm.kate.api.NewsItem.java
com.perm.kate.api.NewsJTags.java
com.perm.kate.api.NewsTypes.java
com.perm.kate.api.Newsfeed.java
com.perm.kate.api.Note.java
com.perm.kate.api.Notification.java
com.perm.kate.api.Notifications.java
com.perm.kate.api.Page.java
com.perm.kate.api.Params.java
com.perm.kate.api.PhotoComment.java
com.perm.kate.api.PhotoTag.java
com.perm.kate.api.Photo.java
com.perm.kate.api.Place.java
com.perm.kate.api.Reply.java
com.perm.kate.api.SearchDialogItem.java
com.perm.kate.api.User.java
com.perm.kate.api.Video.java
com.perm.kate.api.VkApp.java
com.perm.kate.api.VkPollAnswer.java
com.perm.kate.api.VkPoll.java
com.perm.kate.api.VkStatus.java
com.perm.kate.api.WallMessage.java
com.perm.kate.api.sample.Account.java
com.perm.kate.api.sample.Constants.java
com.perm.kate.api.sample.LoginActivity.java
com.perm.kate.api.sample.MainActivity.java
com.perm.utils.Utils.java
com.perm.utils.WrongResponseCodeException.java