Skip to content

Commit

Permalink
Added some providers
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed May 10, 2008
1 parent a7882a5 commit 1b5ab0c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/oembed/providers.rb
Expand Up @@ -11,9 +11,29 @@ def register(*providers)
end
end

def register_all
register(Flickr, Viddler, Qik, Pownce, Revision3)
end

def find(url)
@@urls[@@urls.keys.detect { |u| u =~ url }] || false
end
end

# Custom providers:
Flickr = OEmbed::Provider.new("http://www.flickr.com/services/oembed/")
Flickr << "http://*.flickr.com/*"

Viddler = OEmbed::Provider.new("http://lab.viddler.com/services/oembed/")
Viddler << "http://*.viddler.com/*"

Qik = OEmbed::Provider.new("http://qik.com/api/oembed.{format}")
Qik << "http://qik.com/*"

Pownce = OEmbed::Provider.new("http://api.pownce.com/2.1/oembed.{format}")
Pownce << "http://*.pownce.com/*"

Revision3 = OEmbed::Provider.new("http://revision3.com/api/oembed/")
Revision3 << "http://*.revision3.com/*"
end
end

0 comments on commit 1b5ab0c

Please sign in to comment.