Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
soulfood
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
charley.punshon
soulfood
Commits
5b0705b3
Commit
5b0705b3
authored
May 18, 2019
by
jade.woodward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added method to fetch a song's attributes from the database
parent
15492547
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
databaseInterface.java
...a/com/example/soulfood_assignment2/databaseInterface.java
+15
-0
No files found.
app/src/main/java/com/example/soulfood_assignment2/databaseInterface.java
View file @
5b0705b3
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment