achievements-app / psn-api

A JavaScript library that lets you get trophy, user, and game data from the PlayStation Network.
https://psn-api.achievements.app
MIT License
268 stars 32 forks source link

feat: add function to retrieve recently played games #134

Closed evanshortiss closed 1 year ago

evanshortiss commented 1 year ago

I had been relying on the trophy titles endpoint/functions to find my recently played games. I noticed this approach wasn't accurate since I don't always unlock a trophy when playing a given game.

This PR provides an alternative that appears to be based purely on activity. It uses a GraphQL endpoint that has persisted queries enabled, so it might be a little tedious to support if PSN makes changes to their GraphQL queries/schemas.

LMK what you think. I'm happy to make changes to keep the code more aligned with the existing style etc.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
psn-api ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 14, 2023 at 4:51AM (UTC)
wescopeland commented 1 year ago

Yo!

Briefly skimming, it looks like a huge yarn.lock update made it into the PR. I just pulled the latest and ran yarn and ensured nothing changed in the yarn.lock. Any idea what happened here?

wescopeland commented 1 year ago

Looks like Prettier and possibly ESLint did not run. Can you do yarn format:write and yarn lint:fix to auto-resolve most (if not all) styling and semantic issues?

yarn verify should ensure checks pass. I am unclear why proper checks aren't running on the PR itself- maybe I have an unpaid GitHub bill 😆

evanshortiss commented 1 year ago

Alrighty, I think I've addressed alot of whats mentioned here. I'm sure there's some other minor things I might have missed, or need tweaking, so LMK 😄

wescopeland commented 1 year ago

Looking good! I think the last thing we're missing is a small addition to README.md which will contain a direct URL to the new docs.

I believe the URL will be: https://psn-api.achievements.app/api-docs/users#getrecentlyplayedgames

evanshortiss commented 1 year ago

Almost there! Addressed the newest comments 😄

wescopeland commented 1 year ago

@all-contributors please add @evanshortiss for code and documentation

allcontributors[bot] commented 1 year ago

@wescopeland

I've put up a pull request to add @evanshortiss! :tada:

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 2.9.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: