Class SwipeableUser
- java.lang.Object
-
- com.rednit.tinder4j.api.entities.Entity
-
- com.rednit.tinder4j.api.entities.user.GenericUser
-
- com.rednit.tinder4j.api.entities.user.swipeable.SwipeableUser
-
- Direct Known Subclasses:
LikedUser
,Recommendation
,UserProfile
public abstract class SwipeableUser extends GenericUser
Abstract top level subtype ofGenericUser
for users the self user can swipe on.- Since:
- 1.0.0
- Version:
- 1.0.0
- Author:
- Kaktushose
- See Also:
GenericUser
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SwipeableUser(DataObject user, TinderClient client)
Constructs a new SwipeableUser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RestAction<Void>
dislike()
Dislikes/passes the user.Optional<String>
getCity()
Gets the city.List<Metadata.Descriptor>
getDescriptors()
Gets a possibly emptyList
ofDescriptors
.float
getDistanceKm()
Gets the distance as kilometers.int
getDistanceMi()
Gets the distance as miles.List<String>
getInterests()
Gets a possibly emptyList
of interests, such as reading, road trips, etc.Optional<Metadata.Job>
getJob()
Gets theJob
.Optional<String>
getSchool()
Gets the school.long
getSNumber()
Gets the sNumber.List<Metadata.Teaser>
getTeasers()
Optional<Spotify.SpotifyTrack>
getThemeTrack()
Gets theSpotifyThemeTrack
.List<Spotify.SpotifyTopArtist>
getTopArtists()
Gets a possibly emptyList
ofSpotifyTopArtists
.RestAction<Optional<String>>
like()
Likes the user.boolean
showGenderOnProfile()
Whether to show the gender on profile.RestAction<Void>
superlike()
Superlikes the user.String
toString()
-
Methods inherited from class com.rednit.tinder4j.api.entities.user.GenericUser
getAge, getBadges, getBio, getBirthdate, getGender, getName, getPhotos, getUserProfile, hasBadges, report
-
-
-
-
Constructor Detail
-
SwipeableUser
protected SwipeableUser(DataObject user, TinderClient client)
Constructs a new SwipeableUser.- Parameters:
user
- theDataObject
to construct the SwipeableUser fromclient
- the correspondingTinderClient
instance
-
-
Method Detail
-
getJob
public Optional<Metadata.Job> getJob()
Gets theJob
.
-
getSchool
public Optional<String> getSchool()
Gets the school.- Returns:
- an
Optional
holding the school
-
getDistanceMi
public int getDistanceMi()
Gets the distance as miles.- Returns:
- the distance as miles
-
getDistanceKm
public float getDistanceKm()
Gets the distance as kilometers.- Returns:
- the distance as kilometers
-
getSNumber
public long getSNumber()
Gets the sNumber. Developer note: I have no idea what the sNumber is.- Returns:
- the sNumber.
-
getTeasers
public List<Metadata.Teaser> getTeasers()
-
getInterests
public List<String> getInterests()
Gets a possibly emptyList
of interests, such as reading, road trips, etc.- Returns:
- a possibly empty
List
of interests
-
getDescriptors
public List<Metadata.Descriptor> getDescriptors()
Gets a possibly emptyList
ofDescriptors
.- Returns:
- a possibly empty
List
ofDescriptors
-
showGenderOnProfile
public boolean showGenderOnProfile()
Whether to show the gender on profile.- Returns:
true
if the gender should be shown
-
getTopArtists
public List<Spotify.SpotifyTopArtist> getTopArtists()
Gets a possibly emptyList
ofSpotifyTopArtists
.- Returns:
- a possibly empty
List
ofSpotifyTopArtists
-
getThemeTrack
public Optional<Spotify.SpotifyTrack> getThemeTrack()
Gets theSpotifyThemeTrack
.- Returns:
- an
Optional
holding theSpotifyThemeTrack
-
like
public RestAction<Optional<String>> like()
Likes the user.- Returns:
RestAction
holding anOptional
holding the match id, if present
-
dislike
public RestAction<Void> dislike()
Dislikes/passes the user.- Returns:
RestAction
-
superlike
public RestAction<Void> superlike()
Superlikes the user. Note: This is a Tinder Gold feature.- Returns:
RestAction
-
toString
public String toString()
- Overrides:
toString
in classGenericUser
-
-