Commit 5b0705b3 authored by jade.woodward's avatar jade.woodward

Added method to fetch a song's attributes from the database

parent 15492547
...@@ -134,6 +134,21 @@ public class databaseInterface { ...@@ -134,6 +134,21 @@ public class databaseInterface {
return true; return true;
} }
/*
* one string input - should still be in 123 format though
* returns the three attributes for that song
* in the order cuisine, vibe, time
*/
public ArrayList<String> getAttributesBySongID(String id) {
HashMap<String, String> params = new HashMap<>();
params.put("id", id);
String attribute = getFromDatabase("https://cs2s.yorkdc.net/~jade.woodward/mobile-app-development/getattributesbysongid.php", params);
ArrayList<String> attributes = parseOutSpaces(attribute);
return attributes;
}
/* /*
* one string input - should still be in 123 format though * one string input - should still be in 123 format though
* gets a list of song ids from the database * gets a list of song ids from the database
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment