Coder Social home page Coder Social logo

api's Introduction

Audiopedia API

View the docs here: https://audiopedia-t4sg.github.io/api-docs/


Local installation instructions:

  • Use Python 3.6.5
    • Recommended: use virtualenv -p ~/.pyenv/shims/python3.6 ~/.virtualenvs/api to create the virtual environment (must install virtualenv and pyenv and run pyenv install -v 3.6.5 for this to work)
    • source ~/.virtualenvs/api/bin/activate to activate the virtual environment
    • deactivate to deactivate
  • Add secure.py (not included in GitHub repo) to audiopedia/audiopedia directory
  • From the audiopedia/ directory run pip install -r requirements.txt
  • From the audiopedia/ directory run python manage.py migrate

To run the project locally, run python manage.py runserver and navigate to http://localhost/graphql to interact with the GraphiQL explorer. See documentation for example queries/mutations.

api's People

Contributors

bachtothefuture avatar syoon123 avatar tp0119 avatar benwubenwu avatar

Watchers

James Cloos avatar  avatar  avatar

api's Issues

Authentication

Creating, updating, and deleting data should have restricted access so that only authorized (authenticated) users — i.e. admins like Marcel — can access those mutations.

  • These Graphene docs might help
  • Update documentation appropriately

Fix foreign key issue

I’m not sure if this is just lacking in the documentation or if we’ve had different understandings of how we’d implement the mutations for creating tracks/playlists/topics, but at the moment it doesn’t seem like there’s a way to create a track and attach it to a given playlist, create a playlist and attach it to a given topic, or create a topic and attach it to a given language — this is important and would be the whole reason why we have implemented these as foreign keys. From what I understood, the inclusion of an array of tracks in a playlist mutation is not for the creation of said tracks or for their attachment to the new playlist (this would be incredibly inefficient) — this is solely for ordering the tracks already attached to the playlist (therefore only relevant to updating as opposed to creating a playlist).

Documentation

  • Add descriptions to schema (for viewing on GraphiQL).
  • If there's time, start a CONTRIBUTING.md file for this repo: write up instructions for setting up one's environment and running tests.

Design UI for content management (MVP)

UPDATE: Figma sketches here

@BachToTheFuture @benwubenwu @paulazoo @tp0119 please add feedback in the comments (on this issue or on this Notion doc)


Browse audiopedia.app and audiopedia.io, as well as the old codebase. Design (hand-drawn sketch is fine) the UI for content management:

  • uploading playlists as zipped folders of tracks (mp3s)
  • updating tracks: adding transcripts
  • grouping playlists by topic
  • changing order of playlists within topic
  • changing order of playlist topics
  • updating playlists: adding/removing tracks, changing order of tracks within playlist

Implement models + basic queries

Implement models as specified in #4 (note revisions in this comment), and update schema to include queries for
- [ ] fetching playlist by id
- [ ] fetching topic by id
- [ ] fetching tracks by playlist
- [ ] fetching playlists by topic

Implement basic mutations

After #9 is done, implement mutations for
- [ ] creating/updating a topic (title, audio url)
- [ ] creating/updating a playlist (title, audio url, topic)
- [ ] bulk creating tracks (title, audio url, transcript optional, playlist)
- [ ] updating a track by id
- [ ] deleting a topic/playlist/track
- [ ] "removing"/archiving a topic/playlist/track

Language not accounted for in these specs; if you are confident that having a Language model is sufficient/good practice you can implement that and the mutations accordingly, otherwise we can add that in a future migration.

Create a new issue for other mutations you think will be necessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.