API
API som kan användas för att bygga applikationer (t.ex. mobil-appar) som kopplas till innehåll på Demolåtar.se.
API:et beskriver olika metoder som returnerar information från vår databas. Metoderna returnerar max 100 låtar/rader per fråga. Detta kan användas för att streama musik från vår tjänst. Informationen returneras med hjälp av JSON.
Krav
Resurser
JSON w3schools
JSON.org
Metoder
getRandomTrack.php
Ex: getRandomTrack.php
{"id":"2873","date":"2009-02-15 16:22:32","band":"toXicshock","track":"Cone - Words From The Gang ( toXic Remix","tracklink":"http://xn--demoltar-e0a.se/demo/toXicshock - Cone - Words From The Gang ( toXic Remix.mp3","genre":"Elektronisk musik","plays":"38","rating":0,"downloads":"0","web":"www.toxicshockz.webs.com"}
getBandTracks.php?q=bandname
Ex: getBandTracks.php?q=simon
[{"id":"8367","date":"2011-02-02 00:22:39","band":"Simon","track":"First day","tracklink":"http://www.demolatar.se/demo/Simon - First day.mp3","genre":"Pop","plays":"107","rating":3,"downloads":"0","web":""},{"id":"8372","date":"2011-02-02 20:35:22","band":"Simon","track":"l\u00e5t arton","tracklink":"http://www.demolatar.se/demo/Simon - lat arton.mp3","genre":"Pop","plays":"95","rating":0,"downloads":"0","web":""},{"id":"8378","date":"2011-02-03 14:12:00","band":"Simon","track":"The start","tracklink":"http://www.demolatar.se/demo/Simon - The start.mp3","genre":"Pop","plays":"102","rating":0,"downloads":"0","web":""},{"id":"8448","date":"2011-02-13 19:52:29","band":"Simon","track":"Min l\u00e5t 111","tracklink":"http://www.demolatar.se/demo/Simon - Min lat 111.mp3","genre":"Pop","plays":"84","rating":0,"downloads":"0","web":""},{"id":"8465","date":"2011-02-14 14:42:51","band":"Simon","track":"34","tracklink":"http://www.demolatar.se/demo/Simon - 34.mp3","genre":"Soul/R&B","plays":"102","rating":0,"downloads":"0","web":""},{"id":"9495","date":"2011-09-06 17:44:30","band":"simon","track":"simon - till dig min \u00e4lskling","tracklink":"http://www.demolatar.se/demo/simon - simon - till dig min alskling.mp3","genre":"Hip-Hop","plays":"134","rating":4.2,"downloads":"0","web":""},{"id":"9496","date":"2011-09-06 17:49:54","band":"simon","track":"simon ft joel - Rosor","tracklink":"http://www.demolatar.se/demo/simon - simon ft joel - Rosor.mp3","genre":"Hip-Hop","plays":"148","rating":5,"downloads":"0","web":""},{"id":"9531","date":"2011-09-15 22:23:54","band":"Simon","track":"Free Right Now","tracklink":"http://www.demolatar.se/demo/Simon - Free Right Now.mp3","genre":"Pop","plays":"95","rating":3,"downloads":"0","web":""},{"id":"11254","date":"2013-07-30 12:51:11","band":"Simon","track":"Friday today","tracklink":"http://www.demolatar.se/demo/Simon - Friday today.mp3","genre":"Rock","plays":"862","rating":4.53,"downloads":"0","web":""}]
getCityTracks.php?q=cityname
Ex: getCityTracks.php?q=kalix
[{"id":"6825","date":"2010-08-28 13:41:47","band":"Crushgrind","track":"Green Piss","tracklink":"http://www.demolatar.se/demo/Crushgrind - Green Piss.mp3","genre":"H\u00e5rdrock","plays":"72","rating":4.5,"downloads":"0","web":""},{"id":"7985","date":"2010-12-16 20:37:49","band":"Hussni M\u00f6rsare","track":"Here we are","tracklink":"http://www.demolatar.se/demo/Hussni Morsare - Here we are.mp3","genre":"Reggae","plays":"102","rating":0,"downloads":"0","web":""},{"id":"7986","date":"2010-12-16 20:42:17","band":"Hussni M\u00f6rsare","track":"Leap of faith","tracklink":"http://www.demolatar.se/demo/Hussni Morsare - Leap of faith.mp3","genre":"Pop","plays":"56","rating":0,"downloads":"0","web":"reverbnation.com/hussnimorsare"},{"id":"9530","date":"2011-09-15 20:57:03","band":"ROFTH","track":"ENOUGH","tracklink":"http://www.demolatar.se/demo/ROFTH - ENOUGH.mp3","genre":"H\u00e5rdrock","plays":"47","rating":0,"downloads":"0","web":"www.myspace.com/rofth"}]
search.php?q=bandortitle
Ex: search.php?q=pelle
[{"id":"10867","date":"2013-01-02 19:10:12","band":"Pelle","track":"Solong","tracklink":"http://www.demolatar.se/demo/Pelle - Solong.mp3","genre":"Country","plays":"91","rating":3,"downloads":"0","web":""},{"id":"10700","date":"2012-10-12 15:04:31","band":"pelle ekblad","track":"den som v\u00e4ntar feat emrik","tracklink":"http://www.demolatar.se/demo/pelle ekblad - den som vantar feat emrik.mp3","genre":"Pop","plays":"281","rating":5,"downloads":"1","web":""},{"id":"13244","date":"2016-07-29 22:05:09","band":"PellePax","track":"Electrofunk","tracklink":"http://www.demolatar.se/demo/PellePax - Electrofunk.mp3","genre":"Funk","plays":"81","rating":0,"downloads":"0","web":""},{"id":"12341","date":"2015-03-13 21:56:48","band":"Pelle Ekblad","track":"idioterna","tracklink":"http://www.demolatar.se/demo/Pelle Ekblad - idioterna.mp3","genre":"Pop","plays":"434","rating":4.5,"downloads":"11","web":""},{"id":"12215","date":"2015-01-08 14:52:08","band":"Pelle Plutt","track":"Porsv\u00e4gen vals","tracklink":"http://www.demolatar.se/demo/Pelle Plutt - Porsvagen vals.mp3","genre":"V\u00e4rldsmusik","plays":"94","rating":4,"downloads":"0","web":""},{"id":"11560","date":"2014-01-18 18:26:24","band":"pelle ekblad","track":"h\u00e4r \u00e4r allting likadant","tracklink":"http://www.demolatar.se/demo/pelle ekblad - har ar allting likadant.mp3","genre":"Pop","plays":"405","rating":4.5,"downloads":"0","web":""},{"id":"11345","date":"2013-09-25 00:24:46","band":"pelle ekblad","track":"sorti","tracklink":"http://www.demolatar.se/demo/sorti - pelle ekblad.mp3","genre":"Pop","plays":"214","rating":3,"downloads":"2","web":""},{"id":"11344","date":"2013-09-25 00:08:53","band":"pelle ekblad","track":"dom som f\u00f6rsvann","tracklink":"http://www.demolatar.se/demo/dom som forsvann - pelle ekblad.mp3","genre":"Pop","plays":"172","rating":0,"downloads":"2","web":""},{"id":"11343","date":"2013-09-24 23:42:15","band":"pelle ekblad","track":"questionaries","tracklink":"http://www.demolatar.se/demo/pelle ekblad - questionaries.mp3","genre":"Pop","plays":"252","rating":0,"downloads":"1","web":""},{"id":"11312","date":"2013-08-22 08:51:48","band":"Pelle Lundblad","track":"Waiting For My Jesus","tracklink":"http://www.demolatar.se/demo/Pelle Lundblad - Waiting For My Jesus.mp3","genre":"Rock","plays":"183","rating":4,"downloads":"4","web":"pellelundblad.se/"},{"id":"11311","date":"2013-08-22 08:43:02","band":"Pelle Lundblad","track":"Back For More","tracklink":"http://www.demolatar.se/demo/Pelle Lundblad - Back For More.mp3","genre":"Rock","plays":"182","rating":0,"downloads":"0","web":"pellelundblad.se/"},{"id":"11310","date":"2013-08-22 08:02:13","band":"Pelle Lundblad","track":"Life Is Hard","tracklink":"http://www.demolatar.se/demo/Pelle Lundblad - Life Is Hard.mp3","genre":"Rock","plays":"184","rating":0,"downloads":"0","web":"pellelundblad.se/"},{"id":"11078","date":"2013-04-25 00:40:18","band":"pelle ekblad","track":"bankiren fr\u00e5n djursholm","tracklink":"http://www.demolatar.se/demo/pelle ekblad - bankiren fran djursholm.mp3","genre":"Pop","plays":"231","rating":0,"downloads":"3","web":""},{"id":"11063","date":"2013-04-13 18:21:19","band":"pelle ekblad","track":"the best thing i ever had","tracklink":"http://www.demolatar.se/demo/pelle ekblad - the best thing i ever had.mp3","genre":"Pop","plays":"417","rating":4.43,"downloads":"3","web":""},{"id":"10916","date":"2013-01-20 18:59:14","band":"pelle ekblad","track":"ensta","tracklink":"http://www.demolatar.se/demo/pelle ekblad - ensta.mp3","genre":"Pop","plays":"537","rating":4.33,"downloads":"3","web":""},{"id":"10629","date":"2012-08-31 20:06:30","band":"pelle ekblad","track":"hunger (side shack studio)","tracklink":"http://www.demolatar.se/demo/Pelle Ekblad - hunger(side shack studio).mp3","genre":"Pop","plays":"209","rating":5,"downloads":"0","web":""},{"id":"10628","date":"2012-08-31 19:52:25","band":"pelle ekblad","track":"m\u00f6ta din blick (side shack studio)","tracklink":"http://www.demolatar.se/demo/Pelle Ekblad - mota din blick(side shack studio).mp3","genre":"Pop","plays":"275","rating":5,"downloads":"0","web":""},{"id":"10627","date":"2012-08-31 19:36:08","band":"pelle ekblad","track":"inget har h\u00e4nt (side shack studio)","tracklink":"http://www.demolatar.se/demo/Pelle Ekblad - inget har hant(side shack studio version.mp3","genre":"Pop","plays":"264","rating":5,"downloads":"1","web":""},{"id":"10635","date":"2012-09-05 00:08:15","band":"pelle ekblad","track":"det finns inget kvar h\u00e4r nu (side shack)","tracklink":"http://www.demolatar.se/demo/pelle ekblad - det finns inget kvar har nu (side shack).mp3","genre":"Pop","plays":"324","rating":5,"downloads":"1","web":""},{"id":"10562","date":"2012-07-17 21:11:57","band":"pelle ekblad","track":"l\u00e4ngesen (top floor studio)","tracklink":"http://www.demolatar.se/demo/Pelle Ekblad - Langesen(demo Top Floor Studio).mp3","genre":"Pop","plays":"519","rating":4.69,"downloads":"5","web":""},{"id":"4184","date":"2009-08-11 18:14:33","band":"technorockarn","track":"technorockarn - pelle katt (radio edit)","tracklink":"http://xn--demoltar-e0a.se/demo/technorockarn - technorockarn - pelle katt (radio edit).mp3","genre":"Elektronisk musik","plays":"217","rating":4.5,"downloads":"13","web":"www.myspace.com/technorockarn"},{"id":"961","date":"2008-03-26 08:44:42","band":"Pelle H\u00f6glund","track":"Ruben lever!","tracklink":"http://xn--demoltar-e0a.se/demo/Pelle Hoglund - Ruben lever!.mp3","genre":"Rock","plays":"137","rating":0,"downloads":"0","web":"www.vitrock.webb-plats.se"},{"id":"960","date":"2008-03-26 08:43:47","band":"Pelle H\u00f6glund","track":"Kallets begravning och underg\u00e5ng","tracklink":"http://xn--demoltar-e0a.se/demo/Pelle Hoglund - Kallets begravning och undergang.mp3","genre":"Rock","plays":"126","rating":0,"downloads":"0","web":"www.vitrock.webb-plats.se"},{"id":"959","date":"2008-03-26 08:41:40","band":"Pelle H\u00f6glund","track":"Babels hus","tracklink":"http://xn--demoltar-e0a.se/demo/Pelle Hoglund - Babels hus.mp3","genre":"Rock","plays":"126","rating":0,"downloads":"0","web":"www.vitrock.webb-plats.se"},{"id":"958","date":"2008-03-26 08:39:19","band":"Pelle H\u00f6glund","track":"Benet","tracklink":"http://xn--demoltar-e0a.se/demo/Pelle Hoglund - Benet.mp3","genre":"Rock","plays":"216","rating":3.5,"downloads":"0","web":"www.vitrock.webb-plats.se"},{"id":"957","date":"2008-03-26 08:37:40","band":"Pelle H\u00f6glund","track":"Nu f\u00e5r det vara slut","tracklink":"http://xn--demoltar-e0a.se/demo/Pelle Hoglund - Nu far det vara slut.mp3","genre":"Rock","plays":"123","rating":0,"downloads":"0","web":"www.vitrock.webb-plats.se"},{"id":"956","date":"2008-03-26 08:36:23","band":"Pelle H\u00f6glund","track":"Vi \u00e4r beredda","tracklink":"http://xn--demoltar-e0a.se/demo/Pelle Hoglund - Vi ar beredda.mp3","genre":"Rock","plays":"113","rating":0,"downloads":"0","web":"www.vitrock.webb-plats.se"},{"id":"653","date":"2007-12-12 18:40:27","band":"Alexander Hentschel","track":"Propellerpelle","tracklink":"http://xn--demoltar-e0a.se/demo/Alexander Hentschel - Propellerpelle.mp3","genre":"Elektronisk musik","plays":"179","rating":0,"downloads":"0","web":""}]
getLatestTracks.php?q=number
Ex: getLatestTracks.php?q=5
[{"id":"14704","date":"2024-11-18 11:42:29","band":"Lilla du","track":"tokar o d\u00e5rar","tracklink":"http://www.demolatar.se/demo/Lilla du - tokar o darar.mp3","genre":"Rock","plays":"26","rating":0,"downloads":"0","web":""},{"id":"14703","date":"2024-10-16 22:38:49","band":"Majo","track":"Tre minuter av magi","tracklink":"http://www.demolatar.se/demo/Majo - Tre minuter av magi.mp3","genre":"Pop","plays":"24","rating":0,"downloads":"0","web":""},{"id":"14702","date":"2024-10-08 17:45:43","band":"Axwald \u00d6lr\u00f6de","track":"A Pair of Shades","tracklink":"http://www.demolatar.se/demo/Axwald Olrode - A Pair of Shades.mp3","genre":"Rock","plays":"20","rating":0,"downloads":"0","web":""},{"id":"14701","date":"2024-08-05 13:14:18","band":"LILIUS","track":"Vi \u00e4r h\u00e4r (nu det \u00e4r v\u00e5r tid)","tracklink":"http://www.demolatar.se/demo/LILIUS - Vi ar har (nu det ar var tid).mp3","genre":"Pop","plays":"89","rating":0,"downloads":"0","web":""},{"id":"14700","date":"2024-07-11 11:21:21","band":"Stefan Nyback","track":"Ingenting kan s\u00e4nka mig","tracklink":"http://www.demolatar.se/demo/Stefan Nyback - Ingenting kan sanka mig.mp3","genre":"Pop","plays":"56","rating":0,"downloads":"0","web":"www.stefan.ax"}]