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

Add [Steam] Service #2140

Merged
merged 3 commits into from Oct 10, 2018
Merged

Add [Steam] Service #2140

merged 3 commits into from Oct 10, 2018

Conversation

TagnumElite
Copy link
Contributor

Originally #2130, however, some problems were made with git rebase which caused duplicated commits.

I believe I have addressed all the reported problems with the previous pull request. I do admit I could compress and make this code either more compact or easier to understand, I will do that if everybody needs it.


This pull request adds 7 badges which come the data fetched from Steams Web API ISteamRemoteStorage interface two end points GetCollectionDetails and GetPublishedFileDetails

These seven are:

  1. Collection Size: Returns the number of files in a collection
  2. File Size: Returns the file size of a workshop file
  3. Release Date: Returns the initial release date (last update date not included)
  4. Subscriptions: Returns the number of current subscribers
  5. Favorites: Returns the current amount of favorites an file has received
  6. Downloads: Returns the all-time amount of subscriptions a file has received
  7. Views: Returns the view count of an file

And once again this pull request resolves #2121

PS: @chris48s Hopefully this is it.

@shields-ci
Copy link

Messages
📖

✨ Thanks for your contribution to Shields, @TagnumElite!

Generated by 🚫 dangerJS

chris48s
chris48s previously approved these changes Oct 2, 2018
Copy link
Member

@chris48s chris48s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great - thanks for following this up and improving those last two points @TagnumElite 👍

I've left one really minor comment about a variable name, but other that I think this is in good shape. As noted in #2130 (comment) given this is quite a large submission, it would be useful to get a second pass from another maintainer before we merge. Is anyone able to give this a check to make sure we haven't missed anything?

The previous review comments are at #2130 (review) and I've deployed a new review app at https://shields-staging-pr-2140.herokuapp.com/

.required(),
}).required()

const collectionFoundOrNoteSchema = Joi.alternatives(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably this var name should be

collectionFoundOrNotSchema

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I have a few other variables I wish to rename, but I will wait for another reviewer before making any more commits, at the time I will also update the branch

@PyvesB PyvesB added the service-badge Accepted and actionable changes, features, and bugs label Oct 5, 2018
@PyvesB
Copy link
Member

PyvesB commented Oct 5, 2018

Will go over this during the week-end. Taken care of by another maintainer.

RedSparr0w
RedSparr0w previously approved these changes Oct 6, 2018
Copy link
Member

@RedSparr0w RedSparr0w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Thanks for this PR,
Looks good to me,
Just a couple of notes:

  • The second image takes up quite a large amount of space, how do you feel about just having written instructions or something like right clickCopy Page URL?
    image
  • Update the var name @chris48s mentioned.
  • Do you think it would also be worth adding the ratings (as a x/5, star rating):
    image
    amo/mozilla example:

@TagnumElite
Copy link
Contributor Author

TagnumElite commented Oct 6, 2018

While I am at it, do you wish for me to split the file into more files corresponding to their category?

I have updated the var name and a few other ones.

It seems the Web API doesn't support ratings, will ask steam (and/or public forum) about this.
I could scrape the website for the ratings but I don't think it would be worth it.
If you really want it I sure I can do it.

May I use your picture then because that is a much better, user-friendly, fewer steps approach to getting the URL!

@RedSparr0w
Copy link
Member

RedSparr0w commented Oct 8, 2018

While I am at it, do you wish for me to split the file into more files corresponding to their category?

Sorry not quite sure what you mean by this?

I have updated the var name and a few other ones.

👍

It seems the Web API doesn't support ratings, will ask steam (and/or public forum) about this.
I could scrape the website for the ratings but I don't think it would be worth it.
If you really want it I sure I can do it.

That's fine, we can always add it later in a separate PR once we find a better method to obtain them.

May I use your picture then because that is a much better, user-friendly, fewer steps approach to getting the URL!

👍 No Problem

@TagnumElite
Copy link
Contributor Author

While I am at it, do you wish for me to split the file into more files corresponding to their category?

Sorry not quite sure what you mean by this?

I mean splitting different categories into their own folder i.e:

  • steam-other.service.js = [SteamCollectionFiles, SteamReleaseDate, SteamViews]
  • steam-size.service.js = [SteamFileSize]
  • steam-ratings.service.js = [SteamSubscriptions, SteamFavorites]
  • steam-downloads.service.js = [SteamDownloads]

At the same time renaming the following to be easier to understand:

  1. SteamCollectionFiles => SteamCollectionSize
  2. SteamReleaseDate => SteamFileReleaseDate
  3. SteamSubscriptions => SteamFileSubscriptions
  4. SteamFavorites => SteamFileFavorites
  5. SteamDownloads => SteamFileDownloads
  6. SteamViews => SteamFileViews

@RedSparr0w
Copy link
Member

I mean splitting different categories into their own folder i.e:

Thanks, I see what you mean now, yeah it may be worth splitting them into separate files,
as the steam badges definitely have a lot of room to grow.

Maybe something similar to these?:

  • steam-workshop-size.service.js
  • steam-workshop-downloads.service.js
    or
  • steam-file-size.service.js
  • steam-file-downloads.service.js

just so it has a little more context as to what part of steam the badge is referring to, in case we add an app/game badge which shows similar info (steam-app-downloads.service.js).

Or we could just put the workshop/file badges together in 1 seperate file steam-workshop.service.js or steam-files.service.js?

At the same time renaming the following to be easier to understand:

Sounds good 👍

- Documentation
Create steam-base for base api call
Update documentation
Fix Variable names and rename most classes for easier to understand context
@TagnumElite TagnumElite dismissed stale reviews from RedSparr0w and chris48s via aaeec0b October 9, 2018 06:21
@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2140 October 9, 2018 06:21 Inactive
Copy link
Member

@chris48s chris48s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything outstanding for you on this @RedSparr0w or shall we get this merged?

Copy link
Member

@RedSparr0w RedSparr0w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Looks good to me!
Thanks for your contribution 😄

@shields-deployment
Copy link

This pull request was merged to master branch. This change is now waiting for deployment, which will usually happen within a few days. Stay tuned by joining our #ops channel on Discord!

After deployment, changes are copied to gh-pages branch:

@TagnumElite TagnumElite deleted the service-steam branch October 27, 2018 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Steam workshop item stats to shield
6 participants