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

[3.2] Switch Embed.ly to oEmbed API #6636

Merged
merged 6 commits into from
May 9, 2017
Merged

[3.2] Switch Embed.ly to oEmbed API #6636

merged 6 commits into from
May 9, 2017

Conversation

GwendolenLynch
Copy link
Contributor

@GwendolenLynch GwendolenLynch commented May 8, 2017

Does the job, gets us through, relies on the SF Forms token to be valid in editcontent …
… RFC

Fixes #6635

@GwendolenLynch GwendolenLynch added bug A bug that has been verified enhancement RFC Request For Comments labels May 8, 2017
@GwendolenLynch GwendolenLynch added this to the Bolt 3.2 - Feature release milestone May 8, 2017
Copy link
Member

@bobdenotter bobdenotter left a 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!

Copy link
Member

@CarsonF CarsonF left a 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',
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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;
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

$oEmbedFactory = $this->app['oembed.factory'];

return $oEmbedFactory($url);
}
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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 😄

@GwendolenLynch GwendolenLynch changed the title [3.2][RFC] Switch Embed.ly to oEmbed API [3.2] Switch Embed.ly to oEmbed API May 9, 2017
@GwendolenLynch GwendolenLynch removed the RFC Request For Comments label May 9, 2017
@bobdenotter
Copy link
Member

Merging in! :shipit:

@bobdenotter bobdenotter merged commit 4ef4e6b into bolt:release/3.2 May 9, 2017
@GwendolenLynch GwendolenLynch deleted the feature/oembed-api branch May 9, 2017 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that has been verified enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants