mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
apply formatter
This commit is contained in:
@@ -24,8 +24,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
|
||||
@ApiClass("Entry details")
|
||||
public class Entry implements Serializable {
|
||||
|
||||
public static Entry build(FeedEntryStatus status, String publicUrl,
|
||||
boolean proxyImages) {
|
||||
public static Entry build(FeedEntryStatus status, String publicUrl, boolean proxyImages) {
|
||||
Entry entry = new Entry();
|
||||
|
||||
FeedEntry feedEntry = status.getEntry();
|
||||
@@ -38,8 +37,7 @@ public class Entry implements Serializable {
|
||||
entry.setId(String.valueOf(feedEntry.getId()));
|
||||
entry.setGuid(feedEntry.getGuid());
|
||||
entry.setTitle(feedEntry.getContent().getTitle());
|
||||
entry.setContent(FeedUtils.proxyImages(feedEntry.getContent()
|
||||
.getContent(), publicUrl, proxyImages));
|
||||
entry.setContent(FeedUtils.proxyImages(feedEntry.getContent().getContent(), publicUrl, proxyImages));
|
||||
entry.setRtl(FeedUtils.isRTL(feedEntry));
|
||||
entry.setAuthor(feedEntry.getContent().getAuthor());
|
||||
entry.setEnclosureUrl(feedEntry.getContent().getEnclosureUrl());
|
||||
|
||||
@@ -20,8 +20,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
|
||||
@ApiClass("User information")
|
||||
public class Subscription implements Serializable {
|
||||
|
||||
public static Subscription build(FeedSubscription subscription,
|
||||
String publicUrl, long unreadCount) {
|
||||
public static Subscription build(FeedSubscription subscription, String publicUrl, long unreadCount) {
|
||||
Date now = new Date();
|
||||
FeedCategory category = subscription.getCategory();
|
||||
Feed feed = subscription.getFeed();
|
||||
@@ -35,12 +34,9 @@ public class Subscription implements Serializable {
|
||||
sub.setFeedLink(feed.getLink());
|
||||
sub.setIconUrl(FeedUtils.getFaviconUrl(subscription, publicUrl));
|
||||
sub.setLastRefresh(feed.getLastUpdated());
|
||||
sub.setNextRefresh((feed.getDisabledUntil() != null && feed
|
||||
.getDisabledUntil().before(now)) ? null : feed
|
||||
.getDisabledUntil());
|
||||
sub.setNextRefresh((feed.getDisabledUntil() != null && feed.getDisabledUntil().before(now)) ? null : feed.getDisabledUntil());
|
||||
sub.setUnread(unreadCount);
|
||||
sub.setCategoryId(category == null ? null : String.valueOf(category
|
||||
.getId()));
|
||||
sub.setCategoryId(category == null ? null : String.valueOf(category.getId()));
|
||||
return sub;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.wordnik.swagger.annotations.ApiProperty;
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@ApiClass("Feed information request")
|
||||
public class FeedInfoRequest implements Serializable {
|
||||
|
||||
|
||||
@ApiProperty(value = "feed url", required = true)
|
||||
private String url;
|
||||
|
||||
@@ -25,7 +25,5 @@ public class FeedInfoRequest implements Serializable {
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@ public class MarkRequest implements Serializable {
|
||||
@ApiProperty(value = "mark as read or unread")
|
||||
private boolean read;
|
||||
|
||||
@ApiProperty(value = "only entries older than this, pass the timestamp you got from the entry list to prevent marking an entry that was not retrieved", required = false)
|
||||
@ApiProperty(
|
||||
value = "only entries older than this, pass the timestamp you got from the entry list to prevent marking an entry that was not retrieved",
|
||||
required = false)
|
||||
private Long olderThan;
|
||||
|
||||
public String getId() {
|
||||
|
||||
Reference in New Issue
Block a user