summaryrefslogtreecommitdiff
path: root/lib/rms.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rms.php')
-rw-r--r--lib/rms.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/rms.php b/lib/rms.php
new file mode 100644
index 0000000..1e76d53
--- /dev/null
+++ b/lib/rms.php
@@ -0,0 +1,10 @@
+<?php
+
+const RMS_API_BASE = 'https://rms.api.bbc.co.uk/v2';
+const RMS_SOUNDS_HOME = '/experience/inline/listen/sign-in';
+const RMS_SOUNDS_CONTAINER = '/experience/inline/container';
+const RMS_SOUNDS_PLAYABLE = '/experience/inline/play';
+
+function rms_fetch(string $path): stdClass {
+ return json_decode(file_get_contents(RMS_API_BASE . $path));
+}