Similar to PR: #63, but targets v2 branch for Craft4.
best to Review both and pick what you need.
Changes have been done in mind to not break the existing API.
For easier Review, the changes are split in several commits addressing the corresponding issues.
What is the purpose of this pull request?
[x] Bug fix
[x] New Feature
[x] Documentation update
[ ] Other
What is this pull request trying to solve?
Fixes Bug when having multiple Sites configured in Craft and different Instagram Accounts connected to it, only the first long access token is refreshed
Fixes Bug when using the console Command craftagram/token/index to refresh the tokens, the ExitCode of the Console Command is 1 when the command finished successful, which should be by convention ExitCode of 0)
Add feature to optionally pass a siteId to console Command craftagram/token/index to target a specific site only, call without the optional siteId will refesh all tokens.
Add feature to update tokens via the Web Controller on a per Site basis when passing the optional siteId param.
Known Issues
when configuring the same Instagram Account for different Sites refreshToken() will contact the Instagram API multiple times
Description
Similar to PR: #63, but targets
v2
branch for Craft4. best to Review both and pick what you need.Changes have been done in mind to not break the existing API.
For easier Review, the changes are split in several commits addressing the corresponding issues.
What is the purpose of this pull request?
What is this pull request trying to solve?
craftagram/token/index
to refresh the tokens, the ExitCode of the Console Command is1
when the command finished successful, which should be by convention ExitCode of 0)siteId
to console Commandcraftagram/token/index
to target a specific site only, call without the optionalsiteId
will refesh all tokens.siteId
param.Known Issues