Need help with wiring|| Vex Motor and button

Hello! I need help with some wiring. Is it possible to wire a VEX 2-wire Motor 393 to the project diagram in this link: https://docs.arduino.cc/built-in-examples/digital/Button
If it is possible, please let me know. Have a good day!

Any datasheet available for that motor?

yes
http://cmra.rec.ri.cmu.edu/products/cortex_video_trainer/lesson/media_files/2_wire_393_motor_ig.pdf

Some data on this link:

http://cmra.rec.ri.cmu.edu/products/cortex_video_trainer/lesson/media_files/IntegratedEncoderModule.pdf

And, a button-motor simulation: