1.0.0 • Published 9 years ago
playstation-trophies v1.0.0
Playstation Trophies
A nodejs
API to retrieve a user's Playstation trophy data from the Playstation website.
Usage
To use the API within your code you can use #request
to return all the games that have been attached to a user's account.
import { Trophies } from 'playstation-trophies';
Trophies.request('{{username}}', (err, games) => {
console.log(`{{username}} has ${games.length} games`);
})
Each Game
may contain:
{
"id": "Playstation Game ID",
"title": "Name of the game",
"platforms": "[PS3|PS4|VITA]",
"progress": "Completion percentage for trophies",
"trophies": "[list of trophies completed]",
"avatar": "URL for game avatar"
}
CLI
A CLI is also available for quickly searching users data to use in your shell.
# return all games belonging to {{username}} in JSON format
npm run cli {{username}} -- --format json
License
MIT
1.0.0
9 years ago