public class JumblrClient extends Object
Constructor and Description |
---|
JumblrClient() |
JumblrClient(String consumerKey,
String consumerSecret)
Instantiate a new Jumblr Client with no token
|
JumblrClient(String consumerKey,
String consumerSecret,
String token,
String tokenSecret)
Instantiate a new Jumblr Client
|
Modifier and Type | Method and Description |
---|---|
String |
blogAvatar(String blogName) |
String |
blogAvatar(String blogName,
Integer size)
Get a specific size avatar for a given blog
|
List<Post> |
blogDraftPosts(String blogName) |
List<Post> |
blogDraftPosts(String blogName,
Map<String,?> options)
Get the draft posts for a given blog
|
List<User> |
blogFollowers(String blogName) |
List<User> |
blogFollowers(String blogName,
Map<String,?> options)
Get the followers for a given blog
|
Blog |
blogInfo(String blogName)
Get the blog info for a given blog
|
List<Post> |
blogLikes(String blogName) |
List<Post> |
blogLikes(String blogName,
Map<String,?> options)
Get the public likes for a given blog
|
Post |
blogPost(String blogName,
Long postId)
Get an individual post by id
|
List<Post> |
blogPosts(String blogName) |
List<Post> |
blogPosts(String blogName,
Map<String,?> options)
Get the posts for a given blog
|
List<Post> |
blogQueuedPosts(String blogName) |
List<Post> |
blogQueuedPosts(String blogName,
Map<String,?> options)
Get the queued posts for a given blog
|
List<Post> |
blogSubmissions(String blogName) |
List<Post> |
blogSubmissions(String blogName,
Map<String,?> options)
Get the submissions for a given blog
|
void |
follow(String blogName)
Follow a given blog
|
RequestBuilder |
getRequestBuilder() |
void |
like(Long postId,
String reblogKey)
Like a given post
|
<T extends Post> |
newPost(String blogName,
Class<T> klass)
Set up a new post of a given type
|
Long |
postCreate(String blogName,
Map<String,?> detail)
Create a post
|
void |
postDelete(String blogName,
Long postId)
Delete a given post
|
void |
postEdit(String blogName,
Long id,
Map<String,?> detail)
Save edits for a given post
|
Post |
postReblog(String blogName,
Long postId,
String reblogKey) |
Post |
postReblog(String blogName,
Long postId,
String reblogKey,
Map<String,?> options)
Reblog a given post
|
void |
setRequestBuilder(RequestBuilder builder) |
void |
setToken(String token,
String tokenSecret)
Set the token for this client
|
List<Post> |
tagged(String tag) |
List<Post> |
tagged(String tag,
Map<String,?> options)
Tagged posts
|
void |
unfollow(String blogName)
Unfollow a given blog
|
void |
unlike(Long postId,
String reblogKey)
Unlike a given post
|
User |
user()
Get the user info for the authenticated User
|
List<Post> |
userDashboard() |
List<Post> |
userDashboard(Map<String,?> options)
Get the user dashboard for the authenticated User
|
List<Blog> |
userFollowing() |
List<Blog> |
userFollowing(Map<String,?> options)
Get the blogs the given user is following
|
List<Post> |
userLikes() |
List<Post> |
userLikes(Map<String,?> options)
Get the likes for the authenticated user
|
public JumblrClient()
public JumblrClient(String consumerKey, String consumerSecret)
consumerKey
- The consumer key for the clientconsumerSecret
- The consumer secret for the clientpublic JumblrClient(String consumerKey, String consumerSecret, String token, String tokenSecret)
consumerKey
- The consumer key for the clientconsumerSecret
- The consumer secret for the clienttoken
- The token for the clienttokenSecret
- The token secret for the clientpublic void setToken(String token, String tokenSecret)
token
- The token for the clienttokenSecret
- The token secret for the clientpublic User user()
public List<Post> userDashboard(Map<String,?> options)
options
- the options for the call (or null)public List<Blog> userFollowing(Map<String,?> options)
public List<Post> tagged(String tag, Map<String,?> options)
tag
- the tag to searchoptions
- the options for the call (or null)public Blog blogInfo(String blogName)
blogName
- the Name of the blogpublic List<User> blogFollowers(String blogName, Map<String,?> options)
blogName
- the name of the blogpublic List<Post> blogLikes(String blogName, Map<String,?> options)
blogName
- the name of the blogoptions
- the options for this call (or null)public List<Post> blogPosts(String blogName, Map<String,?> options)
blogName
- the name of the blogoptions
- the options for this call (or null)public Post blogPost(String blogName, Long postId)
blogName
- the name of the blogpostId
- the id of the post to getpublic List<Post> blogQueuedPosts(String blogName, Map<String,?> options)
blogName
- the name of the blogoptions
- the options for this call (or null)public List<Post> blogDraftPosts(String blogName, Map<String,?> options)
blogName
- the name of the blogoptions
- the options for this call (or null)public List<Post> blogSubmissions(String blogName, Map<String,?> options)
blogName
- the name of the blogoptions
- the options for this call (or null)public List<Post> userLikes(Map<String,?> options)
options
- the options for this call (or null)public String blogAvatar(String blogName, Integer size)
blogName
- the avatar URL of the blogsize
- The size requestedpublic void like(Long postId, String reblogKey)
postId
- the ID of the post to likereblogKey
- The reblog key for the postpublic void unlike(Long postId, String reblogKey)
postId
- the ID of the post to unlikereblogKey
- The reblog key for the postpublic void follow(String blogName)
blogName
- The name of the blog to followpublic void unfollow(String blogName)
blogName
- the name of the blog to unfollowpublic void postDelete(String blogName, Long postId)
blogName
- the name of the blog the post is inpostId
- the id of the post to deletepublic Post postReblog(String blogName, Long postId, String reblogKey, Map<String,?> options)
blogName
- the name of the blog the post is inpostId
- the id of the postreblogKey
- the reblog_key of the postoptions
- Additional options (or null)public void postEdit(String blogName, Long id, Map<String,?> detail) throws IOException
blogName
- The blog name of the postid
- the Post iddetail
- The detail to saveIOException
public Long postCreate(String blogName, Map<String,?> detail) throws IOException
blogName
- The blog name for the postdetail
- the detail to saveIOException
public <T extends Post> T newPost(String blogName, Class<T> klass) throws IllegalAccessException, InstantiationException
blogName
- the name of the blog for this post (or null)klass
- the type of Post to instantiateIllegalAccessException
InstantiationException
public void setRequestBuilder(RequestBuilder builder)
public RequestBuilder getRequestBuilder()
Copyright © 2014. All Rights Reserved.