Out of the box the Arduino Leonardo or the Arduino Micro (and some other) can appear to the host computer as a generic keyboard and mouse but the arduino uno is not one of those and does not act as a USB joystick...(which joystick class are you trying to use?)
This library can be used with Arduino IDE 1.6.6 (or above) to add one or more joysticks (or gamepads) to the list of HID devices an Arduino Leonardo or Arduino Micro (or any Arduino clone that is based on the ATmega32u4) can support. This library will also work with the Arduino Due, thanks to @Palakis. A complete list of supported boards can be found in the Wiki. This will not work with Arduino IDE 1.6.5 (or below) or with non-32u4 based Arduino devices (e.g. Arduino UNO, Arduino MEGA, etc.).
what about the arduino digispark does the work
From the link you posted:It specifically says it can't be used with an Uno. The library can only use used with ATmega32U4-based boards and the Arduino Due.No. It won't work. The Digispark uses the ATtiny85 microcontroller. That microcontroller doesn't have the native USB functionality required by the library.