{"id":18394399,"url":"https://github.com/romac/rroembed","last_synced_at":"2025-04-12T13:19:01.739Z","repository":{"id":66930136,"uuid":"694600","full_name":"romac/RRoEmbed","owner":"romac","description":"RRoEmbed is a PHP 5.3+ library which provides an object-oriented interface to consume oEmbed resources (ABANDONED)","archived":false,"fork":false,"pushed_at":"2012-12-20T16:29:24.000Z","size":703,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T13:18:59.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romac.png","metadata":{"files":{"readme":"README.mdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-30T22:46:26.000Z","updated_at":"2016-11-02T15:30:03.000Z","dependencies_parsed_at":"2023-02-20T14:45:32.674Z","dependency_job_id":null,"html_url":"https://github.com/romac/RRoEmbed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romac%2FRRoEmbed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romac%2FRRoEmbed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romac%2FRRoEmbed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romac%2FRRoEmbed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romac","download_url":"https://codeload.github.com/romac/RRoEmbed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571839,"owners_count":21126522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T02:05:35.596Z","updated_at":"2025-04-12T13:19:01.720Z","avatar_url":"https://github.com/romac.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"RRoEmbed\n========\n\nDescription\n-----------\n\nRRoEmbed is a PHP 5.3+ library that provides an interface to consume oEmbed resources.\n\noEmbed\n------\n\noEmbed is a format for allowing an embedded representation of a URL on third party sites.\nThe simple API allows a website to display embedded content (such as photos or videos)\nwhen a user posts a link to that resource, without having to parse the resource directly.\n\nRead more: [oEmbed website](http://www.oembed.com/)\n\nUsage\n-----\n\n```php\n\u003c?php\n\n// Include the autoloader.\nrequire_once( __DIR__ . '/Classes/Autoloader.class.php' );\n\n// Register the autoloader.\nRRoEmbed\\Autoloader::getInstance()-\u003eregister();\n\n// Create a new consumer.\n$consumer = new RRoEmbed\\Consumer();\n\n// Call the \"consume\" method and supply it the URL of the resource you'd like\n// to get the oEmbed representation of and the Provider instance.\n$resource = $consumer-\u003econsume(\n    'http://www.youtube.com/watch?v=ThvBJMzmSZI',\n    new RRoEmbed\\Provider\\YouTube()\n);\n\n// Will call __toString()\nprint $resource;\n\nResult:\n\u003cobject width=\"480\" height=\"295\"\u003e […] \u003c/object\u003e\n\n// You can also omit to specify the provider, if so the Consumer will try to\n// automatically find a valid provider endpoint.\n// Note that, as the Consumer class implements the __invoke method you\n// can use any of its instances as a callable.\n$resource = $consumer( 'http://www.youtube.com/watch?v=ThvBJMzmSZI' );\n\nprint_r( $resource );\n\nResult:\n\nRRoEmbed\\Resource\\Video Object\n(\n    [_html:protected]            =\u003e \u003cobject width=\"480\" height=\"295\"\u003e\u003cparam name=\"movie\" […]\n    [_width:protected]           =\u003e 480\n    [_height:protected]          =\u003e 295\n    [_type:protected]            =\u003e video\n    [_version:protected]         =\u003e 1.0\n    [_title:protected]           =\u003e The Most AMAZING video on the internet #Egypt #jan25\n    [_authorName:protected]      =\u003e hadi15\n    [_authorUrl:protected]       =\u003e http://www.youtube.com/user/hadi15\n    [_providerName:protected]    =\u003e YouTube\n    [_providerUrl:protected]     =\u003e http://www.youtube.com/\n    [_cacheAge:protected]        =\u003e 0\n    [_thumbnailUrl:protected]    =\u003e http://i1.ytimg.com/vi/ThvBJMzmSZI/hqdefault.jpg\n    [_thumbnailWidth:protected]  =\u003e 480\n    [_thumbnailHeight:protected] =\u003e 360\n)\n```\n    \nLicense\n-------\nCopyright (c) 2012 Romain Ruetschi  \nDual licensed under the [MIT](http://opensource.org/licenses/mit-license.html) and [GPL](http://www.gnu.org/licenses/gpl-2.0.html) licenses.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromac%2Frroembed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromac%2Frroembed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromac%2Frroembed/lists"}