Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Steam friends into follows #897

Open
tsa96 opened this issue Jan 21, 2024 · 0 comments
Open

Import Steam friends into follows #897

tsa96 opened this issue Jan 21, 2024 · 0 comments
Labels
For: Backend This is something to do for the backend (server folder) of the website. For: Frontend This is something to do for the front end (client folder) of the website. Priority: Low Something not very essential to the release, can be done in free time and bumped back if needed. Size: Medium Something that may take a few days or so to implement.

Comments

@tsa96
Copy link
Member

tsa96 commented Jan 21, 2024

Steam's API lets us fetch all of a user's Steam friends, so we can use that to automatically follow them.

Backend

Let's do a GET /user/steamfriends endpoint that uses the SteamService.getSteamFriends method to fetch Steam friends, then query DB for the matching SteamIDs. Then return an array of UserDto for every found user. A regular array is probably better than PagedResponseDto since we want to avoid calling Steam's API too often, and users can have at most 500 Steam friends. The likelihood that someone has more than ~100 friends with Momentum is always going to be pretty low.

Be sure to check out LeaderboardRunsService.getRuns to see an example of how to handle Steam friend data.

Then we'll want an endpoint for bulk following users. This can be at POST /user/follow and take an array (just CSV in the URL) of Momentum User IDs.

Frontend

Add a button with a Steam icon to the activity feed component that opens a new PrimeNG dialog component. It should contain a scrolling list of every user (<a> containing their avatar and alias) next to a checkbox, plus "Select All" and "Deselect All" buttons at the top right of the list. If >0 users are selected, enable a "Follow users" button that creates a POST /user/follow query on press, then closes the dialog.

@tsa96 tsa96 added Priority: Low Something not very essential to the release, can be done in free time and bumped back if needed. Size: Medium Something that may take a few days or so to implement. For: Backend This is something to do for the backend (server folder) of the website. For: Frontend This is something to do for the front end (client folder) of the website. labels Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: Backend This is something to do for the backend (server folder) of the website. For: Frontend This is something to do for the front end (client folder) of the website. Priority: Low Something not very essential to the release, can be done in free time and bumped back if needed. Size: Medium Something that may take a few days or so to implement.
Projects
None yet
Development

No branches or pull requests

1 participant