Class AddFavoriteRequest
java.lang.Object
com.amilesend.tmdb.client.model.acount.AddFavoriteRequest
- All Implemented Interfaces:
AccountBasedRequest, BodyBasedRequest, QueryParameterBasedRequest, SessionBasedRequest
public class AddFavoriteRequest
extends Object
implements BodyBasedRequest, AccountBasedRequest, SessionBasedRequest
Defines the attributes when adding or removing a favorite for an account.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanintThe account identifier (required).intThe unique media identifier (required).The media type (i.e., "movie" or "tv", required)The session identifier (optional).inthashCode()booleanWhentrue, the media is added as a favorite; elsefalse, removes the media as a favorite (required).okhttp3.HttpUrl.BuilderpopulateQueryParameters(okhttp3.HttpUrl.Builder urlBuilder) Helper method to populate query parameters of aHttpUrl.Builder.toString()Methods inherited from interface AccountBasedRequest
validateAccountIdMethods inherited from interface SessionBasedRequest
populateSessionIdQueryParameterIfDefined
-
Method Details
-
populateQueryParameters
public okhttp3.HttpUrl.Builder populateQueryParameters( okhttp3.HttpUrl.Builder urlBuilder) Description copied from interface:QueryParameterBasedRequestHelper method to populate query parameters of aHttpUrl.Builder.- Specified by:
populateQueryParametersin interfaceQueryParameterBasedRequest- Parameters:
urlBuilder- the HttpUrl.Builder instance- Returns:
- the HttpUrl.Builder instance
-
builder
-
getAccountId
public int getAccountId()The account identifier (required).- Specified by:
getAccountIdin interfaceAccountBasedRequest- Returns:
- the account identifier
-
getSessionId
The session identifier (optional).- Specified by:
getSessionIdin interfaceSessionBasedRequest- Returns:
- the session identifier
-
getMediaType
The media type (i.e., "movie" or "tv", required) -
getMediaId
public int getMediaId()The unique media identifier (required). -
isFavorite
public boolean isFavorite()Whentrue, the media is added as a favorite; elsefalse, removes the media as a favorite (required). -
equals
-
hashCode
-
toString
-