2015-05-09 07:20:47 +02:00
|
|
|
/*
|
|
|
|
* Twidere - Twitter client for Android
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-05-08 21:46:58 +02:00
|
|
|
package org.mariotaku.twidere.api.twitter.model;
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2015-12-13 14:30:14 +01:00
|
|
|
import com.bluelinelabs.logansquare.annotation.JsonField;
|
|
|
|
import com.bluelinelabs.logansquare.annotation.JsonObject;
|
2015-10-21 15:53:46 +02:00
|
|
|
|
2015-12-13 14:30:14 +01:00
|
|
|
/**
|
|
|
|
* Created by mariotaku on 15/5/7.
|
|
|
|
*/
|
|
|
|
@JsonObject
|
|
|
|
public class MediaUploadResponse extends TwitterResponseObject implements TwitterResponse {
|
|
|
|
|
2016-01-14 17:15:11 +01:00
|
|
|
@JsonField(name = "media_id")
|
|
|
|
long mediaId;
|
|
|
|
@JsonField(name = "size")
|
|
|
|
long size;
|
|
|
|
@JsonField(name = "image")
|
|
|
|
Image image;
|
|
|
|
@JsonField(name = "video")
|
|
|
|
Video video;
|
|
|
|
|
2015-12-13 14:30:14 +01:00
|
|
|
public long getId() {
|
|
|
|
return mediaId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Image getImage() {
|
|
|
|
return image;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getSize() {
|
|
|
|
return size;
|
|
|
|
}
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2016-01-14 17:15:11 +01:00
|
|
|
public Video getVideo() {
|
|
|
|
return video;
|
|
|
|
}
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2016-01-14 17:15:11 +01:00
|
|
|
@JsonObject
|
|
|
|
public static class Video {
|
|
|
|
@JsonField(name = "video_type")
|
|
|
|
String videoType;
|
|
|
|
|
|
|
|
public String getVideoType() {
|
|
|
|
return videoType;
|
|
|
|
}
|
|
|
|
}
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2015-12-13 14:30:14 +01:00
|
|
|
@JsonObject
|
|
|
|
public static class Image {
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2015-12-13 14:30:14 +01:00
|
|
|
@JsonField(name = "width")
|
|
|
|
int width;
|
|
|
|
@JsonField(name = "height")
|
|
|
|
int height;
|
|
|
|
@JsonField(name = "image_type")
|
|
|
|
String imageType;
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2015-12-13 14:30:14 +01:00
|
|
|
public int getHeight() {
|
|
|
|
return height;
|
|
|
|
}
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2015-12-13 14:30:14 +01:00
|
|
|
public String getImageType() {
|
|
|
|
return imageType;
|
|
|
|
}
|
2014-07-03 07:48:39 +02:00
|
|
|
|
2015-12-13 14:30:14 +01:00
|
|
|
public int getWidth() {
|
|
|
|
return width;
|
|
|
|
}
|
2015-05-07 15:31:13 +02:00
|
|
|
}
|
2014-07-03 07:48:39 +02:00
|
|
|
}
|