Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@InsertDisc
Copy link
Contributor

Proposed change

Refactor to include optional 'token' key to provide an authorization code to some services that may require it to function fully.

Closes # (issue)

Type of change

  • New service widget
  • Bug fix (non-breaking change which fixes an issue)
  • New feature or enhancement (non-breaking change which adds functionality)
  • Documentation only
  • Other (please explain)

Checklist:

  • If applicable, I have added corresponding documentation changes.
  • If applicable, I have reviewed the feature / enhancement and / or service widget guidelines.
  • I have checked that all code style checks pass using pre-commit hooks and linting checks.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.

InsertDisc added 5 commits May 5, 2025 09:08
Added an optional 'token' parameter for services that may call on it for authorization.
Explain new and optional 'token' field required for some authorizations.
Remove defined number type of port variable
Linting fix
@shamoon shamoon changed the title Refactor GameDig with optional 'token' parameter. Enhancement: add optional token parameter for gamedig May 5, 2025
Copy link
Collaborator

@shamoon shamoon left a comment

Choose a reason for hiding this comment

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

Thanks, but did you test this? It won't actually work without adding the fields to the service helpers...

@InsertDisc
Copy link
Contributor Author

Thanks, but did you test this? It won't actually work without adding the fields to the service helpers...

There are no additional fields to add, is you're referring to the ones I believe you are. The 'gameToken' is required to even show current players for the particular game server that I know you know I added this for. GameDig is pretty consistent with the information that is returned. No additional fields required. Yes, I have tested this, with and without a gameToken. I'll make the changes asap.

@shamoon
Copy link
Collaborator

shamoon commented May 5, 2025

Thanks, but did you test this? It won't actually work without adding the fields to the service helpers...

There are no additional fields to add, is you're referring to the ones I believe you are. The 'gameToken' is required to even show current players for the particular game server that I know you know I added this for. GameDig is pretty consistent with the information that is returned. No additional fields required. Yes, I have tested this, with and without a gameToken. I'll make the changes asap.

Not sure we totally understood each other, as written this won't work in homepage because homepage will strip out the serviceWidget.gameToken property (or whatever we call it), I can fix this if youre not clear what I mean.

InsertDisc and others added 2 commits May 5, 2025 11:46
Fixed incorrectly named service widget reference name token to gameToken.
@InsertDisc
Copy link
Contributor Author

Thanks, but did you test this? It won't actually work without adding the fields to the service helpers...

There are no additional fields to add, is you're referring to the ones I believe you are. The 'gameToken' is required to even show current players for the particular game server that I know you know I added this for. GameDig is pretty consistent with the information that is returned. No additional fields required. Yes, I have tested this, with and without a gameToken. I'll make the changes asap.

Not sure we totally understood each other, as written this won't work in homepage because homepage will strip out the serviceWidget.gameToken property (or whatever we call it), I can fix this if youre not clear what I mean.

If you wouldn't mind. Apologies, I'm not sure exactly what you mean. I had no problems during testing. If you don't mind showing me what I'm missing.. Still learning here, thanks for your patience.

@shamoon
Copy link
Collaborator

shamoon commented May 5, 2025

No worries, take a look and let me know if you notice anything else, otherwise should be good thanks!

@shamoon shamoon enabled auto-merge (squash) May 5, 2025 15:55
@InsertDisc
Copy link
Contributor Author

Oh, I see now. 'token' worked but gameToken wouldn't have. I honestly didn't even know those definitions existed. Thank you

@shamoon
Copy link
Collaborator

shamoon commented May 5, 2025

It's funny, I dont see the token listed here: https://github.com/gamedig/node-gamedig?tab=readme-ov-file#optional-fields

But: gamedig/node-gamedig#653

@InsertDisc
Copy link
Contributor Author

It's funny, I dont see the token listed here: https://github.com/gamedig/node-gamedig?tab=readme-ov-file#optional-fields

But: gamedig/node-gamedig#653

It's referenced directly in the satisfactory method.

@shamoon
Copy link
Collaborator

shamoon commented May 5, 2025

@InsertDisc
Copy link
Contributor Author

If you can confirm 'if serviceWidget.gameToken' got changed appropriately. We both missed it initially but it should be correct now. It was still referencing token after the initial change.

@shamoon
Copy link
Collaborator

shamoon commented May 5, 2025

yes thanks

@shamoon shamoon merged commit 2509d8c into gethomepage:dev May 5, 2025
5 checks passed
@InsertDisc
Copy link
Contributor Author

yes thanks

No, thank you for all your help.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2025

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants