- return makePutBodyRequest({ url, path, token, fields, statusCodeExpected: 204 })
+ return makePutBodyRequest({ url, path, token, fields, statusCodeExpected })
+}
+
+function listMyVideosHistory (url: string, token: string) {
+ const path = '/api/v1/users/me/history/videos'
+
+ return makeGetRequest({
+ url,
+ path,
+ token,
+ statusCodeExpected: 200
+ })
+}
+
+function removeMyVideosHistory (url: string, token: string, beforeDate?: string) {
+ const path = '/api/v1/users/me/history/videos/remove'
+
+ return makePostBodyRequest({
+ url,
+ path,
+ token,
+ fields: beforeDate ? { beforeDate } : {},
+ statusCodeExpected: 204
+ })