From 3d6376f98d78b880c4f4c1abe67f85e19dafb4de Mon Sep 17 00:00:00 2001 From: magnus2142 <magnus.bredeli@hotmail.com> Date: Thu, 24 Mar 2022 17:20:03 +0100 Subject: [PATCH] ADded some notes to help start creating the content services --- bbcli/services/ContentService.py | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/bbcli/services/ContentService.py b/bbcli/services/ContentService.py index b28b04f..182b104 100644 --- a/bbcli/services/ContentService.py +++ b/bbcli/services/ContentService.py @@ -1,3 +1,37 @@ +import json +from subprocess import call +from typing import Dict, Any +import requests +from bbcli.services.course_service import list_courses +import click +# User gets a tree structure view of the courses content +# where each content is listed something like this: _030303_1 Lectures Folder +def list_course_content(cookies: Dict, course_id: str): + print('Getting course content!') + +# If it is a folder, list it like a tree structure view like mentioned above. +# If it is a document, download and open the document maybe? +# Find all types of content and have an appropriate response for them. This +# should maybe be handled in the view... +def get_content(cookies: Dict, course_id: str, content_id: str): + print('Getting content by its ID.') + + +# List all contents of type assignment, should be executed if a flag for example like --content-type assignment or smth is used +def list_assignments(cookies: Dict, course_id: str): + print('Getting all assignments') + +# TODO: add methods for all content types like the one above + + +# Create content. This should have a flag which says what kind of content type it is + + +# Create assignment. Creates an assignment + +# Delete spesific content + +# Update spesific content \ No newline at end of file -- GitLab