This repository was archived by the owner on Jan 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545
4646### POST /mappings/add
4747
48- Add new Mapping
48+ Add new Mapping. If mapping already exists (determined via clean_title) it is "upvoted".
4949
5050#### Params
5151| name | type |
@@ -66,6 +66,7 @@ Add new Mapping
6666
6767```
6868{
69+ "id" : 1,
6970 "type" : "title",
7071 "tmdbid" : 11,
7172 "imdbid" : "tt0000011",
@@ -77,6 +78,7 @@ Add new Mapping
7778
7879```
7980{
81+ "id" : 2,
8082 "type" : "year",
8183 "tmdbid" : 11,
8284 "imdbid" : "tt0000011",
@@ -86,6 +88,48 @@ Add new Mapping
8688}
8789```
8890
91+ ### PUT /mappings/vote
92+
93+ "Vote" on existing mapping
94+
95+ #### Params
96+ | name | type |
97+ | --------| ----------|
98+ | id | int |
99+ | direction | int (either 1 or -1, default 1)|
100+
101+ #### Sample Request
102+
103+ ` PUT /mappings/vote?id=1&direction=1 `
104+
105+ ` PUT /mappings/vote?id=2&direction=-1 `
106+
107+ #### Sample Response
108+
109+ ```
110+ {
111+ "id" : 1,
112+ "type" : "title",
113+ "tmdbid" : 11,
114+ "imdbid" : "tt0000011",
115+ "aka_title" : "Star Wars",
116+ "report_count" : 2,
117+ "total_reports" : 2
118+ }
119+ ```
120+
121+ ```
122+ {
123+ "id" : 2,
124+ "type" : "year",
125+ "tmdbid" : 11,
126+ "imdbid" : "tt0000011",
127+ "aka_year" : 1978,
128+ "report_count" : 0,
129+ "total_reports" : 2
130+ }
131+ ```
132+
89133### GET /mappings/get
90134
91135Retrieve mappings for movie
You can’t perform that action at this time.
0 commit comments