-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
[3.2] Switch Embed.ly to oEmbed API #6636
[3.2] Switch Embed.ly to oEmbed API #6636
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Monkeytested on release/3.2
and release/3.3
. Works like a charm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does embed vs oembed not tweak you? :twitch:
@@ -107,11 +107,13 @@ | |||
*/ | |||
_update: function () { | |||
var self = this, | |||
url = 'https://api.embed.ly/1/oembed', | |||
url = bolt.conf('paths.async') + 'oembed/request', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been trying to get away from string concatenation with paths. Can you assign url generator result to a data attribute in twig and fetch that here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of it is getting re-done … I just went with what is there … maybe tomorrow, but I think that will have to wait for 3.3 TBH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 😉
@@ -0,0 +1,99 @@ | |||
<?php | |||
|
|||
namespace Bolt\Request\Oembed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is making a request to (O)embed, but I don't think it belongs here. It has nothing to do with our Symfony HTTP Requests. Instead it's a service we are calling. I think Bolt\(O)embed
would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tomorrow, or anyone with push access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/Controller/Async/Oembed.php
Outdated
$oEmbedFactory = $this->app['oembed.factory']; | ||
|
||
return $oEmbedFactory($url); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda think having our own service class that wraps the ombed api that the controller could call here would be better. Then the controller doesn't have to know anything about the Embed\*
code. But if there's a rush don't worry about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs to be a factory, and I have over spend hugely my allowed computer time today.
So if someone wants to pick it up tonight, go for it … but a) this is 3.2; b) urgent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done … I got a better sense of what you meant after sleeping on it, and yeah 😄
Merging in! |
Does the job, gets us through, relies on the SF Forms token to be valid in editcontent …
… RFC
Fixes #6635