We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
needs_api_tokens()
Might it be a good idea to add this helper function to helpers.php, now that there are 3 silo's that need API keys?
function needs_api_tokens($url) { if(Formats\GitHub::matches_host($url)) return 'github'; if(Formats\Twitter::matches_host($url)) return 'twitter'; if(Formats\Facebook::matches_host($url)) return 'facebook'; return false; }
Instead of these strings, we can also return an array of the credentials we expect.
function needs_api_tokens($url) { if(Formats\GitHub::matches_host($url)) return ['github_access_token']; if(Formats\Twitter::matches_host($url)) return ['twitter_api_key','twitter_api_secret','twitter_access_token','twitter_access_token_secret']; if(Formats\Facebook::matches_host($url)) return ['facebook_app_id','facebook_app_secret']; return []; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Might it be a good idea to add this helper function to helpers.php, now that there are 3 silo's that need API keys?
Instead of these strings, we can also return an array of the credentials we expect.
The text was updated successfully, but these errors were encountered: