public class JodelAccount
extends java.lang.Object
Constructor and Description |
---|
JodelAccount(java.lang.String lat,
java.lang.String lng,
java.lang.String city,
java.lang.String country,
java.lang.String name)
Overloads constructor to simplify creating a new account
|
JodelAccount(java.lang.String lat,
java.lang.String lng,
java.lang.String city,
java.lang.String country,
java.lang.String name,
java.lang.Boolean updateLocation,
JodelAccountData accountData)
Overloads constructor using JodelAccountData object instead of single values for account data
|
JodelAccount(java.lang.String lat,
java.lang.String lng,
java.lang.String city,
java.lang.String country,
java.lang.String name,
java.lang.Boolean updateLocation,
java.lang.String accessToken,
java.lang.String deviceUID,
java.lang.String refreshToken,
java.lang.String distinctID,
java.lang.String expirationDate)
Constructor for JodelAccount class
|
Modifier and Type | Method and Description |
---|---|
JodelRequestResponse |
createPost(java.lang.String message,
java.lang.String base64Image,
java.lang.String color,
java.lang.String channel)
Creates a new Jodel with no ancestor (i.e. no reply)
|
JodelRequestResponse |
createPost(java.lang.String message,
java.lang.String base64Image,
java.lang.String color,
java.lang.String channel,
int ancestor)
Creates a new Jodel
|
JodelRequestResponse |
deleteJodel(java.lang.String postID)
Deletes a (own) Jodel
|
JodelRequestResponse |
disableNotification(java.lang.String postID)
Disables notifications of a Jodel
|
JodelRequestResponse |
dismissStickyJodel(java.lang.String postID)
Dismisses a sticky Jodel
|
JodelRequestResponse |
downvoteJodel(java.lang.String postID)
Downvotes a post
|
JodelRequestResponse |
downvoteStickyJodel(java.lang.String postID)
Downvotes a sticky Jodel
|
JodelRequestResponse |
enableNotification(java.lang.String postID)
Enable notifications of a Jodel
|
JodelRequestResponse |
followChannel(java.lang.String channel)
Follows a channel
|
JodelAccountData |
getAccountData()
Returns current account data as object of type JodelAccountData
|
JodelRequestResponse |
getCaptchaData()
Gets the captcha image url and key for not verified users
|
JodelRequestResponse |
getChannelMeta(java.lang.String channel)
Gets metadata of a channel
|
JodelRequestResponse |
getJodelShareLink(java.lang.String postID)
Get share url
|
JodelRequestResponse |
getKarma()
Gets your karma
|
JodelRequestResponse |
getMyPinnedPosts(int skip,
int limit,
java.lang.String after)
Gets your pinned Jodels matching given criteria
|
JodelRequestResponse |
getMyRepliedPosts(int skip,
int limit,
java.lang.String after)
Gets Jodels you replied to matching given criteria
|
JodelRequestResponse |
getMyVotedPosts(int skip,
int limit,
java.lang.String after)
Gets Jodels you voted to matching given criteria
|
JodelRequestResponse |
getNotifications()
Gets Notifications for current account
|
JodelRequestResponse |
getNotificationsNew()
Gets new Notifications for current account
|
JodelRequestResponse |
getPicturesDiscussed(int skip,
int limit,
java.lang.String after)
Gets most discussed picture Jodels matching given criteria
|
JodelRequestResponse |
getPicturesPopular(int skip,
int limit,
java.lang.String after)
Gets popular picture Jodels matching given criteria
|
JodelRequestResponse |
getPicturesRecent(int skip,
int limit,
java.lang.String after)
Gets recent picture Jodels matching given criteria
|
JodelRequestResponse |
getPostDetails(java.lang.String postID)
Gets a single Jodel with all replies by post ID
|
JodelRequestResponse |
getPostDetailsV3(java.lang.String postID,
int skip)
Gets a single Jodel in new V3 of endpoint with all replies by post ID
|
JodelRequestResponse |
getPosts(java.lang.String postTypes,
int skip,
int limit,
java.lang.String after,
boolean mine,
java.lang.String hashtag,
java.lang.String channel,
boolean pictures)
Gets Jodels matching given criteria
|
JodelRequestResponse |
getPostsDiscussed(int skip,
int limit,
java.lang.String after,
boolean mine,
java.lang.String hashtag,
java.lang.String channel)
Gets most discussed Jodels matching given criteria
|
JodelRequestResponse |
getPostsPopular(int skip,
int limit,
java.lang.String after,
boolean mine,
java.lang.String hashtag,
java.lang.String channel)
Gets popular Jodels matching given criteria
|
JodelRequestResponse |
getPostsRecent(int skip,
int limit,
java.lang.String after,
boolean mine,
java.lang.String hashtag,
java.lang.String channel)
Gets recent Jodels matching given criteria
|
JodelRequestResponse |
getRecommendedChannels()
Gets the recommended channels
|
JodelRequestResponse |
pinJodel(java.lang.String postID)
Pins a Jodel
|
void |
refreshAccessToken()
Refreshes the Access Token of the currently used account
|
void |
refreshAllTokens()
Creates a new account with random ID if self.device_uid is not set.
|
JodelRequestResponse |
setNotificationRead(java.lang.String postID,
java.lang.String notificationID)
Sets a notification "read" by postID or notificationID
|
JodelRequestResponse |
setUserProfile(java.lang.String userType,
java.lang.String gender,
int age)
Sets the user profile
|
JodelRequestResponse |
thankJodel(java.lang.String postID)
Thanks a post
|
JodelRequestResponse |
unfollowChannel(java.lang.String channel)
Unfollows a channel
|
JodelRequestResponse |
unpinJodel(java.lang.String postID)
Unpins a Jodel
|
JodelRequestResponse |
upvoteJodel(java.lang.String postID)
Upvotes a post
|
JodelRequestResponse |
upvoteStickyJodel(java.lang.String postID)
Upvotes a sticky Jodel
|
JodelRequestResponse |
verifyCaptcha(java.lang.String key,
java.util.List<java.lang.Integer> positions)
Solves the captcha so that a user can verify his account
|
public JodelAccount(java.lang.String lat, java.lang.String lng, java.lang.String city, java.lang.String country, java.lang.String name, java.lang.Boolean updateLocation, java.lang.String accessToken, java.lang.String deviceUID, java.lang.String refreshToken, java.lang.String distinctID, java.lang.String expirationDate)
lat
- Latitute of locationlng
- Longitude of locationcity
- Name of the citycountry
- Countrycode (e.g. DE for Germany)name
- Name of the location (normally the same as city)updateLocation
- Boolean to update a location for existing accountaccessToken
- Access token of accountdeviceUID
- Device ID of accountrefreshToken
- Refresh token of accountdistinctID
- Distinct ID of accountexpirationDate
- Timestamp of expiration datepublic JodelAccount(java.lang.String lat, java.lang.String lng, java.lang.String city, java.lang.String country, java.lang.String name, java.lang.Boolean updateLocation, JodelAccountData accountData)
lat
- Latitute of locationlng
- Longitude of locationcity
- Name of the citycountry
- Countrycode (e.g. DE for Germany)name
- Name of the location (normally the same as city)updateLocation
- Boolean to update a location for existing accountaccountData
- Object of type JodelAccountData containing all necessary account datapublic JodelAccount(java.lang.String lat, java.lang.String lng, java.lang.String city, java.lang.String country, java.lang.String name)
lat
- Latitute of locationlng
- Longitude of locationcity
- Name of the citycountry
- Countrycode (e.g. DE for Germany)name
- Name of the location (normally the same as city)public JodelAccountData getAccountData()
public void refreshAllTokens()
public void refreshAccessToken()
public JodelRequestResponse getCaptchaData()
public JodelRequestResponse verifyCaptcha(java.lang.String key, java.util.List<java.lang.Integer> positions)
key
- Key of captchapositions
- List of positions with racoon (starting with 0 from left to right)public JodelRequestResponse createPost(java.lang.String message, java.lang.String base64Image, java.lang.String color, java.lang.String channel, int ancestor)
message
- Text message for new Jodelbase64Image
- Base64 encoded imagecolor
- Color of the Jodelchannel
- Channel to post Jodel toancestor
- For replies specify an ancestorpublic JodelRequestResponse createPost(java.lang.String message, java.lang.String base64Image, java.lang.String color, java.lang.String channel)
message
- Text message for new Jodelbase64Image
- Base64 encoded imagecolor
- Color of the Jodelchannel
- Channel to post Jodel topublic JodelRequestResponse getPosts(java.lang.String postTypes, int skip, int limit, java.lang.String after, boolean mine, java.lang.String hashtag, java.lang.String channel, boolean pictures)
postTypes
- Types of Jodels to return (e.g. popular, discussed etc.)skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postmine
- Boolean to set output to only own Jodelshashtag
- Hashtag to filter Jodelschannel
- Channel to filter Jodelspictures
- Boolean for selecting picturespublic JodelRequestResponse getPostsRecent(int skip, int limit, java.lang.String after, boolean mine, java.lang.String hashtag, java.lang.String channel)
skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postmine
- Boolean to set output to only own Jodelshashtag
- Hashtag to filter Jodelschannel
- Channel to filter Jodelspublic JodelRequestResponse getPostsPopular(int skip, int limit, java.lang.String after, boolean mine, java.lang.String hashtag, java.lang.String channel)
skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postmine
- Boolean to set output to only own Jodelshashtag
- Hashtag to filter Jodelschannel
- Channel to filter Jodelspublic JodelRequestResponse getPostsDiscussed(int skip, int limit, java.lang.String after, boolean mine, java.lang.String hashtag, java.lang.String channel)
skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postmine
- Boolean to set output to only own Jodelshashtag
- Hashtag to filter Jodelschannel
- Channel to filter Jodelspublic JodelRequestResponse getPicturesRecent(int skip, int limit, java.lang.String after)
skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postpublic JodelRequestResponse getPicturesPopular(int skip, int limit, java.lang.String after)
skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postpublic JodelRequestResponse getPicturesDiscussed(int skip, int limit, java.lang.String after)
skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postpublic JodelRequestResponse getMyPinnedPosts(int skip, int limit, java.lang.String after)
skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postpublic JodelRequestResponse getMyRepliedPosts(int skip, int limit, java.lang.String after)
skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postpublic JodelRequestResponse getMyVotedPosts(int skip, int limit, java.lang.String after)
skip
- Skip valuelimit
- Limit returned Jodels to a certain numberafter
- Return only Jodels after a certain postpublic JodelRequestResponse getPostDetails(java.lang.String postID)
postID
- ID of the post to retrieve details forpublic JodelRequestResponse getPostDetailsV3(java.lang.String postID, int skip)
postID
- ID of the post to retrieve details forskip
- Skip valuepublic JodelRequestResponse upvoteJodel(java.lang.String postID)
postID
- ID of the post to votepublic JodelRequestResponse downvoteJodel(java.lang.String postID)
postID
- ID of the post to votepublic JodelRequestResponse thankJodel(java.lang.String postID)
postID
- ID of the post to thankpublic JodelRequestResponse getJodelShareLink(java.lang.String postID)
postID
- ID of the post to sharepublic JodelRequestResponse pinJodel(java.lang.String postID)
postID
- ID of the post to pinpublic JodelRequestResponse unpinJodel(java.lang.String postID)
postID
- ID of the post to unpinpublic JodelRequestResponse enableNotification(java.lang.String postID)
postID
- ID of the post to enable notificationpublic JodelRequestResponse disableNotification(java.lang.String postID)
postID
- ID of the post to disable notificationpublic JodelRequestResponse deleteJodel(java.lang.String postID)
postID
- ID of the post to deletepublic JodelRequestResponse upvoteStickyJodel(java.lang.String postID)
postID
- ID of the sticky post to upvotepublic JodelRequestResponse downvoteStickyJodel(java.lang.String postID)
postID
- ID of the sticky post to downvotepublic JodelRequestResponse dismissStickyJodel(java.lang.String postID)
postID
- ID of the sticky post to dismisspublic JodelRequestResponse getNotifications()
public JodelRequestResponse getNotificationsNew()
public JodelRequestResponse setNotificationRead(java.lang.String postID, java.lang.String notificationID)
postID
- ID of the post to set notification readnotificationID
- ID of the notification to set readpublic JodelRequestResponse getRecommendedChannels()
public JodelRequestResponse getChannelMeta(java.lang.String channel)
channel
- Name of the channelpublic JodelRequestResponse followChannel(java.lang.String channel)
channel
- Name of the channelpublic JodelRequestResponse unfollowChannel(java.lang.String channel)
channel
- Name of the channelpublic JodelRequestResponse setUserProfile(java.lang.String userType, java.lang.String gender, int age)
userType
- Type of user (as defined in JodelUsertype)gender
- Gender (m or f)age
- Age of the userpublic JodelRequestResponse getKarma()