public class RequestCreator
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
RequestCreator(PkRSS singleton,
java.lang.String url) |
Modifier and Type | Method and Description |
---|---|
void |
async()
Executes request asynchronously.
|
RequestCreator |
callback(Callback callback)
Adds a callback listener to this request.
|
java.util.List<Article> |
get()
Executes request and returns a full list containing all
articles loaded from this request's URL.
|
Article |
getFirst()
Executes request and returns the first Article associated
with this request.
|
RequestCreator |
individual()
Threats this request as an individual article,
rather than full feed.
|
RequestCreator |
nextPage()
Loads the next page of the current RSS feed.
|
RequestCreator |
page(int page)
Loads a specific page of the RSS feed.
|
RequestCreator |
search(java.lang.String search)
Looks up a specific query on the RSS feed.
|
RequestCreator |
skipCache()
Ignores already cached responses when making this
request.
|
RequestCreator |
tag(java.lang.String tag)
Assigns a reference tag to this request.
|
protected RequestCreator(PkRSS singleton, java.lang.String url)
public RequestCreator tag(java.lang.String tag)
tag
- public RequestCreator search(java.lang.String search)
search
- public RequestCreator individual()
public RequestCreator skipCache()
public RequestCreator page(int page)
page
- Page to load.public RequestCreator nextPage()
public RequestCreator callback(Callback callback)
callback
- Callback interface to respond to.public java.util.List<Article> get() throws java.io.IOException
If this request is marked as individual, the list will contain only 1 index. It is recommended to use getFirst() for individual requests instead.
java.io.IOException
public Article getFirst()
May return null.
public void async()
Be sure to add a callback to handle this.