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

Update providers list #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marcbelletre
Copy link

Hi Ricardo,

Thanks for this very useful package.

I made this PR just to update the providers list from oembed.com as it has been updated since last time it was copied into your package and it now contains a service I need to handle.

I think there could be a better way to handle this JSON file. Maybe the OEmbed class could take an array of providers as an argument?

$array = [
    [
        'provider_name' => '23HQ',
        'provider_url' => 'http://www.23hq.com',
        'endpoints' => [
            [
                'schemes' => [
                    'http://www.23hq.com/*/photo/*',
                ],
                'url' => 'http://www.23hq.com/23/oembed',
            ],
        ],
    ],
    ...
];

$service = new OEmbed($array);

This way users could just store their own array of supported providers in a separate config file instead of relying on the default ones.

I can work on a PR if you are interested in this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant