ADLSOceanHub / OceanHub

See the ocean from your favorite device
MIT License
0 stars 4 forks source link

Implement the Video List API and Visualize Data #14

Open map34 opened 6 years ago

map34 commented 6 years ago

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:

[
    {
        "id" [String],
        "name": [String],
        "frame_count": [Integer],
        "date": [String],
        "url": [String]
    },
    .
    .
    .
]

The descriptions of each property of the metadata is as follows:

Steps Overview

  1. Play around with either Beautiful Soup or PyCamHD on a script somewhere. The PyCamHD library especially has a function where you can get a list of MOV files in the server. The link to get the files is under https://rawdata.oceanobservatories.org/files/. PyCamHD seems to suffice, but if you need to get something from Beautiful Soup, then that is fine.
  2. Once you are comfortable with working with the libraries, add them to 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.
  3. Add your endpoint under backend/server/oceanhub/videos/views.py, read up a little bit on Flask's endpoint setup in here.
  4. Make sure you jsonify the response, we want to return a JSON-serialized response.
  5. Add tests to the endpoint, use the How to Test your Flask Application to add the tests. Also, test your class / functions if you create them, for the code level tests, use Py.test, here is a quick intro to it: https://github.com/pluralsight/intro-to-pytest.

Additional Information

map34 commented 4 years ago

@scaraclette any updates here? Thanks!

scaraclette commented 4 years ago

Will work on it soon

lsetiawan commented 4 years ago

@map34 @scaraclette Ooooh are we starting this up again? :smile:

map34 commented 4 years ago

@lsetiawan I am actually not against resurrecting this project again 💯

lsetiawan commented 4 years ago

@map34 I've started tweaking things to get it working again :)

map34 commented 4 months ago

@scaraclette @lsetiawan Hello all, what's the status of this project? Should we replace this w/ Rust?

lsetiawan commented 4 months ago

I'm down in trying to implement all of this in Rust! Good learning 🙂

scaraclette commented 4 months ago

Yeah this is easy in Rust. Literally just a webscraper. I can set something up

map34 commented 1 month ago

@scaraclette Any updates here?