Open map34 opened 6 years ago
@scaraclette any updates here? Thanks!
Will work on it soon
@map34 @scaraclette Ooooh are we starting this up again? :smile:
@lsetiawan I am actually not against resurrecting this project again 💯
@map34 I've started tweaking things to get it working again :)
@scaraclette @lsetiawan Hello all, what's the status of this project? Should we replace this w/ Rust?
I'm down in trying to implement all of this in Rust! Good learning 🙂
Yeah this is easy in Rust. Literally just a webscraper. I can set something up
@scaraclette Any updates here?
Introduction
The purpose of this REST API is to retrieve a list of videos that are stored inside the Ocean Observatories website. From this API, we should be able to retrieve an array of video metadata. There are two parts of this project: implementing the GET endpoint and use the information from the API to display in the frontend.
Concepts gained from here:
Part 1. Implement the Video List API
Endpoint Specification
The endpoint that we should implement is
GET /videos/
Hitting this endpoint should return:
The descriptions of each property of the metadata is as follows:
"id": This should represent a unique representation of each video, since we do not know the ID of the videos retrieved, let us make one by hashing the URL (using md5). This will be used both internally in our Kafka system, and the endpoint.
"name": This should be just a human readable name format, could be the last part of the URL for now.
"frame_count": This should return the number of frames the video has.
"date": This should be the date of when the video was taken. This should conform to the ISO8601 format.
"url": Return the url of the video.
Steps Overview
https://rawdata.oceanobservatories.org/files/
. PyCamHD seems to suffice, but if you need to get something from Beautiful Soup, then that is fine.backend/requirements.txt
then rebuild the Docker images. Be aware that if you think you don't need both of them, don't add both of them.backend/server/oceanhub/videos/views.py
, read up a little bit on Flask's endpoint setup in here.jsonify
the response, we want to return a JSON-serialized response.Additional Information