com.github.twitch4j.graphql.command.CommandUnfollowUser Maven / Gradle / Ivy
The newest version!
package com.github.twitch4j.graphql.command;
import com.apollographql.apollo.ApolloCall;
import com.apollographql.apollo.ApolloClient;
import com.github.twitch4j.graphql.internal.UnfollowMutation;
import com.github.twitch4j.graphql.internal.type.UnfollowUserInput;
/**
* Unfollow User
*/
public class CommandUnfollowUser extends BaseCommand {
private final Long targetUserId;
public CommandUnfollowUser(ApolloClient apolloClient, Long targetUserId) {
super(apolloClient);
this.targetUserId = targetUserId;
}
@Override
protected ApolloCall getGraphQLCall() {
ApolloCall apolloCall = apolloClient.mutate(
UnfollowMutation.builder()
.unfollowUserInput(
UnfollowUserInput.builder()
.targetID(targetUserId.toString())
.build()
)
.build()
);
return apolloCall;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy