Unlock Achievements in your Editor
Install this now to opt-in to achievements from various packages.
Package Developers: Achievements can be submitted by any package using the achievement:unlock
event.
This package takes care of storing the user's state of achievement so you don't have to.
Read on for more details!
Achievements can be triggered using the achievement:unlock
event:
atom.emit "achievement:unlock",
name: "So many scripts, so little time!"
requirement: "Run a script while another is still running"
category: "runners"
package: "script"
points: 200
iconURL: "http://i.imgur.com/qRXoLmE.png"
🎉
The name is what uniquely identifies the achievement.
event - The {Object} event to process.
:name - The {String} message to display to the user.
Part of the key that uniquely identifies the achievement.
:requirement - The {String} that says how the user achieved this
:category - The {String} category where it belongs with other
achievements (e.g. linting, git, ruby)
:package - The {String} package this event was emitted from.
Part of the key that uniquely identifies the achievement.
:points - The {Integer} number of points
:iconURL - The {String} URL of an icon to display for the user, which
can be base64 encoded but must have a valid data prefix
such as "data:image/png;base64,". Optional, defaults to
spinning octocat.
Achievements are stored under key {package}:{name}
within an associative array
of unlocked achievements.
Set how long the achievements banner lasts by changing the notice delay (in milliseconds).
Emit events from your own packages to grant achievements to your users!
- Use the swirling octocat icon ✅
- Populate achievement bar using a message ✅
- Time achievements display out ✅
- Add configuration for timer ✅
- Create an event spec for triggering achievements ✅
- Create some default achievements ✅
- Store achievements so they're only earned once. (per user, per project?) ✅
- Allow for a custom icon ✅