Commit d33f2376 by Mark Hoeber

Fix and cleanup of API doc

parent 8b704cc2
......@@ -189,17 +189,34 @@ MOCK_MODULES = [
'ecommerce_api_client',
'client',
'ecommerce_api_client.client',
'ecommerce_api_client.exceptions'
'ecommerce_api_client.exceptions',
'student.auth',
'ccx_keys',
'ccx_keys.locator',
'user_api.preferences.api'
]
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock(class_that_is_extended=object)
if "DJANGO_SETTINGS_MODULE" not in os.environ:
docs_path = os.getcwd()
mezzanine_path_parts = (docs_path, "..")
sys.path.insert(0, docs_path)
sys.path.insert(0, os.path.realpath(os.path.join(*mezzanine_path_parts)))
os.environ["DJANGO_SETTINGS_MODULE"] = "docs_settings"
# Django 1.7's setup is required before touching translated strings.
import django
try:
django.setup()
except AttributeError: # < 1.7
pass
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
sys.path.append('../../../../')
os.environ['DJANGO_SETTINGS_MODULE'] = 'lms.envs.dev'
#os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.envs.dev")
from docs.shared.conf import *
......@@ -227,6 +244,7 @@ sys.path.insert(0, root)
sys.path.append(root / "common/lib/xmodule")
sys.path.append(root / "common/djangoapps")
sys.path.append(root / "lms/djangoapps")
sys.path.append(root / "lms/envs")
sys.path.append(root / "openedx/core/djangoapps")
sys.path.insert(
......
########################################
Course Structure API
Course Structure API Resource
########################################
This page contains information on using the Course Structure API to
complete the following actions.
With the Course Structure API **Course Structure** resource, you can complete
the following tasks.
* :ref:`Get a list of courses in the edX platform <Get a List of Courses>`
* :ref:`Get details about a course <Get Course Details>`
* :ref:`Get a course's structure, or blocks <Get the Course Structure>`
* :ref:`Get a courses grading policy <Get the Course Grading Policy>`
.. contents::
:local:
:depth: 1
.. _Get a List of Courses:
......@@ -58,6 +54,8 @@ Get a List of Courses
. . .
]
}
.. _Get Course Details:
**************************
......@@ -94,7 +92,7 @@ Get Course Details
Get the Course Structure
**************************
.. autoclass:: course_structure_api.v0.views.CourseStructure
.. .. autoclass:: course_structure_api.v0.views.CourseStructure
**Example response**
......
......@@ -7,6 +7,10 @@ Course Structure API Overview
Use the edX Platform Course Structure API to view course details, including the
blocks in the course and the course grading policy.
.. contents::
:local:
:depth: 1
********************************************
Course Structure API Version 0
********************************************
......
"""
This is the local_settings file for platform API doc.
"""
# Generate a SECRET_KEY for this build
from random import choice
characters = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
SECRET_KEY = ''.join([choice(characters) for i in range(50)])
......@@ -5,14 +5,9 @@ Enrollment API Enrollment Resource
With the Enrollment API **Enrollment** resource, you can complete the
following tasks.
* :ref:`Get the user's enrollment status in a course <Get the Users Enrollment
Status in a Course>`.
* :ref:`Get the user's enrollment information for a course<Get Enrollment Details for a
Course>`.
* :ref:`View a user's enrollments <View and add to a Users Course
Enrollments>`.
* :ref:`Enroll a user in a course <View and add to a Users Course
Enrollments>`.
.. contents::
:local:
:depth: 1
.. _Get the Users Enrollment Status in a Course:
......@@ -62,7 +57,7 @@ Get the User's Enrollment Status in a Course
Get the User's Enrollment Information for a Course
**************************************************
.. autoclass:: enrollment.views.EnrollmentCourseDetailView
.. .. autoclass:: enrollment.views.EnrollmentCourseDetailView
**Example response showing a user's course enrollment information**
......
......@@ -7,8 +7,9 @@ Enrollment API Overview
Use the Enrollment API to view user and course enrollment
information and to enroll a user in a course.
You can use the Enrollment API for web, desktop, and mobile
applications.
.. contents::
:local:
:depth: 1
****************************************
Enrollment API Version and Status
......
......@@ -5,8 +5,9 @@ Mobile API Course Information Resource
With the Mobile API **Course Information** resource, you can complete the
following tasks.
* :ref:`Get updates about a course<Get Course Updates>`.
* :ref:`Get a list of course handouts<Get Course Handouts>`.
.. contents::
:local:
:depth: 1
.. _Get Course Updates:
......
......@@ -7,6 +7,10 @@ Mobile API Overview
Use the Mobile API to build mobile applications for students to view course
information and videos for courses on your instance of Open edX.
.. contents::
:local:
:depth: 1
******************************************
Mobile API Version and Status
******************************************
......
......@@ -4,10 +4,9 @@ Mobile API User Resource
With the Mobile API **User** resource, you can complete the following tasks.
* :ref:`Get details about a user<Get User Details>`.
* :ref:`Get course enrollments for a user<Get a User's Course Enrollments>`.
* :ref:`Get a user's status in a course<Get or Change User Status in a Course>`.
* :ref:`Change a user's status in a course<Get or Change User Status in a Course>`.
.. contents::
:local:
:depth: 1
.. _Get User Details:
......
......@@ -5,8 +5,9 @@ Mobile API Video Outlines Resource
With the Mobile API **Video Outlines** resource, you can complete the
following tasks.
* :ref:`Get a list of all videos in the course <Get the Video List>`.
* :ref:`Get a transcript for a specified video and language <Get a Video Transcript>`.
.. contents::
:local:
:depth: 1
.. _Get the Video List:
......
......@@ -8,6 +8,10 @@ The requesting user can upload or remove his or her own profile image.
Users with staff access can remove profile images from any user account.
.. contents::
:local:
:depth: 1
*************************************
Profile Images API Version and Status
*************************************
......
......@@ -7,8 +7,9 @@ Profile Images API Profile Images Resource
With the Profile Images API **Profile Images** resource, you can complete the
following tasks.
* :ref:`Upload a profile image <Upload a Profile Image>`.
* :ref:`Remove profile images <Remove a Profile Image>`.
.. contents::
:local:
:depth: 1
.. _Upload a Profile Image:
......
......@@ -7,7 +7,9 @@ User API User Accounts Resource
With the User API **User Accounts** resource, you can complete the following
tasks.
* `Get and Update the User's Account Information`_
.. contents::
:local:
:depth: 1
.. _Get and Update the User's Account Information:
......
......@@ -4,7 +4,9 @@ User API Overview
Use the User API to view and update account and preference information.
You can use the User API for web, desktop, and mobile applications.
.. contents::
:local:
:depth: 1
*************************************
User API Version and Status
......
......@@ -7,8 +7,9 @@ User API User Preferences Resource
With the User API **User Preferences** resource, you can complete the
following tasks.
* `Get and Update the User's Preferences Information`_
* `Get, Update, or Delete a Specific Preference`_
.. contents::
:local:
:depth: 1
.. _Get and Update the User's Preferences Information:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment