Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
fschiettecatte committed Nov 10, 2020
2 parents 7ec9def + cacc5fa commit 8d38dcc
Show file tree
Hide file tree
Showing 19 changed files with 425 additions and 216 deletions.
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,21 @@ List<Item> itemList = feed.getItemList()

```java
// Create a new item
Item item = new DefaultItem("1");
item.setTitle("First Item");
item.setSummary("First item summary.");
item.setUrl(new URL("https://somehost.com/article/1"));
Item item = new DefaultItem("1")
.setTitle("First Item")
.setSummary("First item summary.")
.setUrl(new URL("https://somehost.com/article/1"));

// Create an item list and add the item
List<Item> itemList = new ArrayList<Item>();
itemList.add(item)
itemList.add(item);

// Create a new feed
Feed feed = new DefaultFeed();

// Add some fields to the feed
feed.setTitle("Feed Title");
feed.setDescription("Feed Description");
feed.setHomePageUrl(new URL("https://somehost.com/"));
feed.setFeedUrl(new URL("https://somehost.com/feed.json"));
Feed feed = new DefaultFeed()
.setTitle("Feed Title")
.setDescription("Feed Description")
.setHomePageUrl(new URL("https://somehost.com/"))
.setFeedUrl(new URL("https://somehost.com/feed.json"));

// Add the item list to the feed
feed.setItemList(itemList);
Expand Down
2 changes: 1 addition & 1 deletion lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}


version = '0.4.0'
version = '0.5.0'
project.archivesBaseName = rootProject.name


Expand Down
26 changes: 19 additions & 7 deletions lib/src/main/java/org/kaderate/jsonfeed/Attachment.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Attachment interface
*
* @author François Schiettecatte ([email protected])
* @version 0.4.0
* @version 0.5.0
*/
public interface Attachment extends JSONString {

Expand All @@ -47,8 +47,10 @@ public interface Attachment extends JSONString {
* Set the URL
*
* @param url the URL
*
* @return the attachment
*/
public void setUrl(URL url);
public Attachment setUrl(URL url);


/**
Expand All @@ -63,8 +65,10 @@ public interface Attachment extends JSONString {
* Set the mime type
*
* @param mimeType the mime type
*
* @return the attachment
*/
public void setMimeType(String mimeType);
public Attachment setMimeType(String mimeType);


/**
Expand All @@ -79,8 +83,10 @@ public interface Attachment extends JSONString {
* Set the title
*
* @param title the title
*
* @return the attachment
*/
public void setTitle(String title);
public Attachment setTitle(String title);


/**
Expand All @@ -95,8 +101,10 @@ public interface Attachment extends JSONString {
* Set the size in bytes
*
* @param sizeInBytes the size in bytes
*
* @return the attachment
*/
public void setSizeInBytes(Integer sizeInBytes);
public Attachment setSizeInBytes(Integer sizeInBytes);


/**
Expand All @@ -111,8 +119,10 @@ public interface Attachment extends JSONString {
* Set the duration in seconds
*
* @param durationInSeconds the duration in seconds
*
* @return the attachment
*/
public void setDurationInSeconds(Integer durationInSeconds);
public Attachment setDurationInSeconds(Integer durationInSeconds);


/**
Expand All @@ -127,8 +137,10 @@ public interface Attachment extends JSONString {
* Set the attachment extensions JSON object
*
* @param extensionsJsonObject the extensions JSON object
*
* @return the attachment
*/
public void setExtensionsJSONObject(JSONObject extensionsJsonObject);
public Attachment setExtensionsJSONObject(JSONObject extensionsJsonObject);


/**
Expand Down
18 changes: 13 additions & 5 deletions lib/src/main/java/org/kaderate/jsonfeed/Author.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Author interface
*
* @author François Schiettecatte ([email protected])
* @version 0.4.0
* @version 0.5.0
*/
public interface Author extends JSONString {

Expand All @@ -48,8 +48,10 @@ public interface Author extends JSONString {
* Set the name
*
* @param name the name
*
* @return the author
*/
public void setName(String name);
public Author setName(String name);


/**
Expand All @@ -64,8 +66,10 @@ public interface Author extends JSONString {
* Set the URL
*
* @param url the URL
*
* @return the author
*/
public void setUrl(URL url);
public Author setUrl(URL url);


/**
Expand All @@ -80,8 +84,10 @@ public interface Author extends JSONString {
* Set the avatar (URL)
*
* @param avatar the avatar URL
*
* @return the author
*/
public void setAvatar(URL avatar);
public Author setAvatar(URL avatar);


/**
Expand All @@ -96,8 +102,10 @@ public interface Author extends JSONString {
* Set the author extensions JSON object
*
* @param extensionsJsonObject the extensions JSON object
*
* @return the author
*/
public void setExtensionsJSONObject(JSONObject extensionsJsonObject);
public Author setExtensionsJSONObject(JSONObject extensionsJsonObject);


/**
Expand Down
62 changes: 46 additions & 16 deletions lib/src/main/java/org/kaderate/jsonfeed/Feed.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* Feed interface
*
* @author François Schiettecatte ([email protected])
* @version 0.4.0
* @version 0.5.0
*/
public interface Feed extends JSONString {

Expand All @@ -64,8 +64,10 @@ public interface Feed extends JSONString {
* Set the title
*
* @param title the title
*
* @return the feed
*/
public void setTitle(String title);
public Feed setTitle(String title);


/**
Expand All @@ -80,8 +82,10 @@ public interface Feed extends JSONString {
* Set the home page URL
*
* @param homePageUrl the home page URL
*
* @return the feed
*/
public void setHomePageUrl(URL homePageUrl);
public Feed setHomePageUrl(URL homePageUrl);


/**
Expand All @@ -96,8 +100,10 @@ public interface Feed extends JSONString {
* Set the feed URL
*
* @param feedUrl the feed URL
*
* @return the feed
*/
public void setFeedUrl(URL feedUrl);
public Feed setFeedUrl(URL feedUrl);


/**
Expand All @@ -112,8 +118,10 @@ public interface Feed extends JSONString {
* Set the description
*
* @param description the description
*
* @return the feed
*/
public void setDescription(String description);
public Feed setDescription(String description);


/**
Expand All @@ -128,8 +136,10 @@ public interface Feed extends JSONString {
* Set the user comment
*
* @param userComment the user comment
*
* @return the feed
*/
public void setUserComment(String userComment);
public Feed setUserComment(String userComment);


/**
Expand All @@ -144,8 +154,10 @@ public interface Feed extends JSONString {
* Set the next URL
*
* @param nextUrl the next URL
*
* @return the feed
*/
public void setNextUrl(URL nextUrl);
public Feed setNextUrl(URL nextUrl);


/**
Expand All @@ -160,8 +172,10 @@ public interface Feed extends JSONString {
* Set the icon (URL)
*
* @param icon the icon URL
*
* @return the feed
*/
public void setIcon(URL icon);
public Feed setIcon(URL icon);


/**
Expand All @@ -176,8 +190,10 @@ public interface Feed extends JSONString {
* Set the favicon (URL)
*
* @param favicon the favicon URL
*
* @return the feed
*/
public void setFavicon(URL favicon);
public Feed setFavicon(URL favicon);


/**
Expand All @@ -192,8 +208,10 @@ public interface Feed extends JSONString {
* Set the author
*
* @param author the author
*
* @return the feed
*/
public void setAuthor(Author author);
public Feed setAuthor(Author author);


/**
Expand All @@ -208,8 +226,10 @@ public interface Feed extends JSONString {
* Set the author list (JSON Feed 1.1 only)
*
* @param authorList the author list
*
* @return the feed
*/
public void setAuthorList(List<Author> authorList);
public Feed setAuthorList(List<Author> authorList);


/**
Expand All @@ -224,8 +244,10 @@ public interface Feed extends JSONString {
* Set the language
*
* @param language the language
*
* @return the feed
*/
public void setLanguage(String language);
public Feed setLanguage(String language);


/**
Expand All @@ -240,8 +262,10 @@ public interface Feed extends JSONString {
* Set the expired
*
* @param expired the expired
*
* @return the feed
*/
public void setExpired(Boolean expired);
public Feed setExpired(Boolean expired);


/**
Expand All @@ -256,8 +280,10 @@ public interface Feed extends JSONString {
* Set the hub list
*
* @param hubList the hub list
*
* @return the feed
*/
public void setHubList(List<Hub> hubList);
public Feed setHubList(List<Hub> hubList);


/**
Expand All @@ -272,8 +298,10 @@ public interface Feed extends JSONString {
* Set the item list
*
* @param itemList the item list
*
* @return the feed
*/
public void setItemList(List<Item> itemList);
public Feed setItemList(List<Item> itemList);


/**
Expand All @@ -288,8 +316,10 @@ public interface Feed extends JSONString {
* Set the feed extensions JSON object
*
* @param extensionsJsonObject the extensions JSON object
*
* @return the feed
*/
public void setExtensionsJSONObject(JSONObject extensionsJsonObject);
public Feed setExtensionsJSONObject(JSONObject extensionsJsonObject);


/**
Expand Down
Loading

0 comments on commit 8d38dcc

Please sign in to comment.