-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
95 lines (86 loc) · 3.76 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
$name = getenv('MYNAME');
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>index</title>
<link rel="stylesheet" href="./styles/main.css">
</head>
<body>
<?php include './components/nav.php'; ?>
<h1> API details </h1>
your name is <?php echo $name; ?>
<h2> Routes & Endpoints </h2>
<h3> Movies </h3>
<ul>
<li>Get Movies - {GET} /movies </li>
<ul>
<li>optional Filter on movie title like : ?title={title}</li>
<li>optional Filter on rating like : ?rating={rating}</li>
<ul>
<li>returns movies with rating higher or equal to the the given rating</li>
</ul>
<li>optionally filter on both title and rating like ?title={title}&rating={rating} or
?rating={rating}&title={title}</li>
</ul>
<li>Get Movie with ID - {GET} /movies/{ID}/ </li>
<li>Get Movie rating with ID - {GET} /movies/{ID}/rating</li>
</ul>
<h3> to Watch List </h3>
<ul>
<li>Get watch list entries - {GET} /toWatchList/entries {X-API-KEY}</li>
<ul>
<li>optional filter on entry priority like : ?priority={priority}</li>
</ul>
<li>Post watch list entry - {POST} /toWatchList/entries {X-API-KEY} {movieId, priority, notes}</li>
<li>Put watch list entry - {PUT} /towatchlist/entries/{movieId} {X-API-KEY} {priority, notes}</li>
<li>Patch watch list entry priority- {PATCH} /towatchlist/entries/{movieId}/priority {X-API-KEY} { priority }
</li>
<li>Patch watch list entry notes - {PATCH} /towatchlist/entries/{movieId}/notes {X-API-KEY} { notes }</li>
<li>Delete watch list entry - {DELETE} /towatchlist/entries/{movieID} {X-API-KEY}</li>
</ul>
<h3> Completed Watch List </h3>
<ul>
<li>Get completed watch list entries - {GET} /completedwatchlist/entries {X-API-KEY} </li>
<ul>
<li>Optional filter on times watched like : ?times_watched={times_watched} </li>
<ul>
<li>returns entries where times watched is greater than or equal to inputted times watched.</li>
</ul>
</ul>
<li>Get completed watch list entry's time-watched - {GET} /completedwatchlist/entries/{movieId}/times-watched
{X-API-KEY} </li>
<li>Get completed watch list entry's rating - {GET} /completedwatchlist/entries/{movieId}/rating {X-API-KEY}
</li>
<li>Post completed watch list entry {POST} /completedwatchlist/entries {X-API-KEY} {movieId, rating, notes,
date_Initially_Watched, date_last_watched, times_watched}</li>
<li>Patch completed watch list entry's rating - {PUT} /completedwatchlist/entries/{movieId}/rating {X-API-KEY}
{rating}</li>
<li>Patch completed watch list entry's times-watched - {PATCH}
/completedwatchlist/entries/{movieId}/times-watched {X-API-KEY} { times_watched }</li>
<li>Patch completed watch list entry's notes - {PATCH}
/completedwatchlist/entries/{movieId}/notes {X-API-KEY} { notes }</li>
<li>Delete completed watch list entry - {DELETE} /completedwatchlist/entries/{movieId} {X-API-KEY} </li>
</ul>
<h3> User </h3>
<ul>
<li>
Get User stats /users/{id}/stats {X-API-KEY}
</li>
<ul>
<li>returns : </li>
<ul>
<li>date of first movies watched</li>
<li>first movies watched title</li>
<li>average movie rating</li>
<li>planned movie watch time</li>
<li>actual movie time watched</li>
</ul>
</ul>
</ul>
</body>
</html>