Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
more API work, check the ref
- Loading branch information
Jeremy Mill
committed
Dec 7, 2015
1 parent
83249db
commit 6459541
Showing
9 changed files
with
234 additions
and
3 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
TeamDBAwesome/TeamDBAwesome/Controllers/AddTrackCustomPlaylistController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Web.Http; | ||
using TeamDBAwesome.SqlService; | ||
|
||
namespace TeamDBAwesome.Controllers | ||
{ | ||
public class AddTrackCustomPlaylistController : ApiController | ||
{ | ||
public HttpResponseMessage Get(int PlaylistID, int TrackID) | ||
{ | ||
HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK); | ||
|
||
MySqlService sql = new MySqlService(); | ||
|
||
int status = sql.addToCustomPlaylist(TrackID, PlaylistID); | ||
|
||
message.Content = new StringContent(status.ToString()); | ||
|
||
return message; | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
TeamDBAwesome/TeamDBAwesome/Controllers/AddTrackPlaylistController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Web.Http; | ||
using TeamDBAwesome.SqlService; | ||
using TeamDBAwesome.Models; | ||
|
||
namespace TeamDBAwesome.Controllers | ||
{ | ||
public class AddTrackPlaylistController : ApiController | ||
{ | ||
public HttpResponseMessage Get(int PlaylistID, int TrackID) | ||
{ | ||
HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK); | ||
|
||
MySqlService sql = new MySqlService(); | ||
|
||
int status = sql.addToPlaylist(TrackID, PlaylistID); | ||
|
||
message.Content = new StringContent(status.ToString()); | ||
|
||
return message; | ||
} | ||
|
||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
TeamDBAwesome/TeamDBAwesome/Controllers/CreateOrderController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Web.Http; | ||
using TeamDBAwesome.SqlService; | ||
|
||
namespace TeamDBAwesome.Controllers | ||
{ | ||
public class CreateOrderController : ApiController | ||
{ | ||
public HttpResponseMessage Get(int CustomerID) | ||
{ | ||
HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK); | ||
|
||
MySqlService sql = new MySqlService(); | ||
|
||
int newOrder = sql.createOrder(CustomerID); | ||
|
||
message.Content = new StringContent(newOrder.ToString()); | ||
|
||
return message; | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
TeamDBAwesome/TeamDBAwesome/Controllers/RemoveCustomTrackController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Web.Http; | ||
using TeamDBAwesome.SqlService; | ||
|
||
namespace TeamDBAwesome.Controllers | ||
{ | ||
public class RemoveCustomTrackController : ApiController | ||
{ | ||
public HttpResponseMessage Get(int PlaylistID, int TrackID) | ||
{ | ||
HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK); | ||
|
||
MySqlService sql = new MySqlService(); | ||
|
||
int status = sql.removeFromCustomPlaylist(TrackID, PlaylistID); | ||
|
||
message.Content = new StringContent(status.ToString()); | ||
|
||
return message; | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
TeamDBAwesome/TeamDBAwesome/Controllers/RemoveTrackController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Net; | ||
using System.Net.Http; | ||
using System.Web.Http; | ||
using TeamDBAwesome.SqlService; | ||
|
||
namespace TeamDBAwesome.Controllers | ||
{ | ||
public class RemoveTrackController : ApiController | ||
{ | ||
public HttpResponseMessage Get(int PlaylistID, int TrackID) | ||
{ | ||
HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK); | ||
|
||
MySqlService sql = new MySqlService(); | ||
|
||
int status = sql.removeFromPlaylist(TrackID, PlaylistID); | ||
|
||
message.Content = new StringContent(status.ToString()); | ||
|
||
return message; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.