From 6196f49c4668594e7074e973281389b367e009ac Mon Sep 17 00:00:00 2001
From: Sean Coker
Date: Mon, 9 Jul 2018 18:09:59 -0400
Subject: [PATCH] Add audiomack provider
---
lib/Noembed/Provider/Audiomack.pm | 9 +++++++++
share/demo/index.html | 3 ++-
share/providers.json | 17 +++++++++++++++++
3 files changed, 28 insertions(+), 1 deletion(-)
create mode 100644 lib/Noembed/Provider/Audiomack.pm
diff --git a/lib/Noembed/Provider/Audiomack.pm b/lib/Noembed/Provider/Audiomack.pm
new file mode 100644
index 0000000..ca3dc33
--- /dev/null
+++ b/lib/Noembed/Provider/Audiomack.pm
@@ -0,0 +1,9 @@
+package Noembed::Provider::Audiomack;
+
+use parent 'Noembed::oEmbedProvider';
+
+sub provider_name {"Audiomack"}
+sub patterns {'https?://audiomack\.com/(song|album|playlist)/.+'}
+sub oembed_url {'https://audiomack.com/oembed'}
+
+1;
diff --git a/share/demo/index.html b/share/demo/index.html
index 87bca26..8b32c3c 100644
--- a/share/demo/index.html
+++ b/share/demo/index.html
@@ -84,7 +84,7 @@ Usage
for the url parameter. Noembed also supports a callback
parameter for JSONP.
-
+
An example request might look like this:
@@ -156,6 +156,7 @@ Other
Existing oEmbed Sites
+ - Audiomack
- Clyp
- Flickr
- Funny or Die
diff --git a/share/providers.json b/share/providers.json
index ea3ec84..d179a86 100644
--- a/share/providers.json
+++ b/share/providers.json
@@ -65,6 +65,23 @@
}
]
},
+ {
+ "provider_name": "Audiomack",
+ "provider_url": "https:\/\/audiomack.com",
+ "endpoints": [
+ {
+ "schemes": [
+ "http:\/\/audiomack.com\/song\/*",
+ "https:\/\/audiomack.com\/song\/*",
+ "http:\/\/audiomack.com\/album\/*",
+ "https:\/\/audiomack.com\/album\/*",
+ "http:\/\/audiomack.com\/playlist\/*",
+ "https:\/\/audiomack.com\/playlist\/*"
+ ],
+ "url": "https:\/\/audiomack.com\/oembed"
+ }
+ ]
+ },
{
"provider_name": "AudioSnaps",
"provider_url": "http:\/\/audiosnaps.com",