java.lang.Object
it.auties.whatsapp.api.MobileRegistrationBuilder<MobileRegistrationBuilder.Unregistered>
it.auties.whatsapp.api.MobileRegistrationBuilder.Unregistered
- Enclosing class:
MobileRegistrationBuilder<T extends MobileRegistrationBuilder<T>>
public static final class MobileRegistrationBuilder.Unregistered
extends MobileRegistrationBuilder<MobileRegistrationBuilder.Unregistered>
-
Nested Class Summary
Nested classes/interfaces inherited from class it.auties.whatsapp.api.MobileRegistrationBuilder
MobileRegistrationBuilder.Unregistered, MobileRegistrationBuilder.Unverified -
Field Summary
FieldsFields inherited from class it.auties.whatsapp.api.MobileRegistrationBuilder
errorHandler, keys, socketExecutor, store, verificationCodeSupplier, whatsapp -
Constructor Summary
ConstructorsConstructorDescriptionUnregistered(Store store, Keys keys, ErrorHandler errorHandler, ExecutorService socketExecutor) -
Method Summary
Modifier and TypeMethodDescriptionregister(long phoneNumber) Registers a phone number by asking for a verification code and then sending it to WhatsapprequestVerificationCode(long phoneNumber) Asks Whatsapp for a one-time-password to start the registration processverificationCodeMethod(VerificationCodeMethod verificationCodeMethod) Sets the type of method used to verify the accountMethods inherited from class it.auties.whatsapp.api.MobileRegistrationBuilder
buildWhatsapp, verificationCodeSupplier, verificationCodeSupplier
-
Field Details
-
unverified
-
verificationCodeMethod
-
-
Constructor Details
-
Unregistered
Unregistered(Store store, Keys keys, ErrorHandler errorHandler, ExecutorService socketExecutor)
-
-
Method Details
-
verificationCodeMethod
public MobileRegistrationBuilder.Unregistered verificationCodeMethod(VerificationCodeMethod verificationCodeMethod) Sets the type of method used to verify the account- Parameters:
verificationCodeMethod- the non-null method- Returns:
- the same instance
-
register
Registers a phone number by asking for a verification code and then sending it to Whatsapp- Parameters:
phoneNumber- a phone number(include the prefix)- Returns:
- a future
-
requestVerificationCode
public CompletableFuture<MobileRegistrationBuilder.Unverified> requestVerificationCode(long phoneNumber) Asks Whatsapp for a one-time-password to start the registration process- Parameters:
phoneNumber- a phone number(include the prefix)- Returns:
- a future
-