Commit d33f2376 by Mark Hoeber

Fix and cleanup of API doc

parent 8b704cc2
...@@ -189,17 +189,34 @@ MOCK_MODULES = [ ...@@ -189,17 +189,34 @@ MOCK_MODULES = [
'ecommerce_api_client', 'ecommerce_api_client',
'client', 'client',
'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: for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock(class_that_is_extended=object) 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' on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
sys.path.append('../../../../') 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 * from docs.shared.conf import *
...@@ -227,6 +244,7 @@ sys.path.insert(0, root) ...@@ -227,6 +244,7 @@ sys.path.insert(0, root)
sys.path.append(root / "common/lib/xmodule") sys.path.append(root / "common/lib/xmodule")
sys.path.append(root / "common/djangoapps") sys.path.append(root / "common/djangoapps")
sys.path.append(root / "lms/djangoapps") sys.path.append(root / "lms/djangoapps")
sys.path.append(root / "lms/envs")
sys.path.append(root / "openedx/core/djangoapps") sys.path.append(root / "openedx/core/djangoapps")
sys.path.insert( sys.path.insert(
......
######################################## ########################################
Course Structure API Course Structure API Resource
######################################## ########################################
This page contains information on using the Course Structure API to With the Course Structure API **Course Structure** resource, you can complete
complete the following actions. the following tasks.
* :ref:`Get a list of courses in the edX platform <Get a List of Courses>` .. contents::
:local:
* :ref:`Get details about a course <Get Course Details>` :depth: 1
* :ref:`Get a course's structure, or blocks <Get the Course Structure>`
* :ref:`Get a courses grading policy <Get the Course Grading Policy>`
.. _Get a List of Courses: .. _Get a List of Courses:
...@@ -58,6 +54,8 @@ Get a List of Courses ...@@ -58,6 +54,8 @@ Get a List of Courses
. . . . . .
] ]
} }
.. _Get Course Details: .. _Get Course Details:
************************** **************************
...@@ -94,7 +92,7 @@ Get Course Details ...@@ -94,7 +92,7 @@ Get Course Details
Get the Course Structure Get the Course Structure
************************** **************************
.. autoclass:: course_structure_api.v0.views.CourseStructure .. .. autoclass:: course_structure_api.v0.views.CourseStructure
**Example response** **Example response**
......
...@@ -7,6 +7,10 @@ Course Structure API Overview ...@@ -7,6 +7,10 @@ Course Structure API Overview
Use the edX Platform Course Structure API to view course details, including the Use the edX Platform Course Structure API to view course details, including the
blocks in the course and the course grading policy. blocks in the course and the course grading policy.
.. contents::
:local:
:depth: 1
******************************************** ********************************************
Course Structure API Version 0 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 ...@@ -5,14 +5,9 @@ Enrollment API Enrollment Resource
With the Enrollment API **Enrollment** resource, you can complete the With the Enrollment API **Enrollment** resource, you can complete the
following tasks. following tasks.
* :ref:`Get the user's enrollment status in a course <Get the Users Enrollment .. contents::
Status in a Course>`. :local:
* :ref:`Get the user's enrollment information for a course<Get Enrollment Details for a :depth: 1
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>`.
.. _Get the Users Enrollment Status in a Course: .. _Get the Users Enrollment Status in a Course:
...@@ -62,7 +57,7 @@ Get the User's 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 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** **Example response showing a user's course enrollment information**
......
...@@ -7,8 +7,9 @@ Enrollment API Overview ...@@ -7,8 +7,9 @@ Enrollment API Overview
Use the Enrollment API to view user and course enrollment Use the Enrollment API to view user and course enrollment
information and to enroll a user in a course. information and to enroll a user in a course.
You can use the Enrollment API for web, desktop, and mobile .. contents::
applications. :local:
:depth: 1
**************************************** ****************************************
Enrollment API Version and Status Enrollment API Version and Status
......
...@@ -5,8 +5,9 @@ Mobile API Course Information Resource ...@@ -5,8 +5,9 @@ Mobile API Course Information Resource
With the Mobile API **Course Information** resource, you can complete the With the Mobile API **Course Information** resource, you can complete the
following tasks. following tasks.
* :ref:`Get updates about a course<Get Course Updates>`. .. contents::
* :ref:`Get a list of course handouts<Get Course Handouts>`. :local:
:depth: 1
.. _Get Course Updates: .. _Get Course Updates:
......
...@@ -7,6 +7,10 @@ Mobile API Overview ...@@ -7,6 +7,10 @@ Mobile API Overview
Use the Mobile API to build mobile applications for students to view course Use the Mobile API to build mobile applications for students to view course
information and videos for courses on your instance of Open edX. information and videos for courses on your instance of Open edX.
.. contents::
:local:
:depth: 1
****************************************** ******************************************
Mobile API Version and Status Mobile API Version and Status
****************************************** ******************************************
......
...@@ -4,10 +4,9 @@ Mobile API User Resource ...@@ -4,10 +4,9 @@ Mobile API User Resource
With the Mobile API **User** resource, you can complete the following tasks. With the Mobile API **User** resource, you can complete the following tasks.
* :ref:`Get details about a user<Get User Details>`. .. contents::
* :ref:`Get course enrollments for a user<Get a User's Course Enrollments>`. :local:
* :ref:`Get a user's status in a course<Get or Change User Status in a Course>`. :depth: 1
* :ref:`Change a user's status in a course<Get or Change User Status in a Course>`.
.. _Get User Details: .. _Get User Details:
......
...@@ -5,8 +5,9 @@ Mobile API Video Outlines Resource ...@@ -5,8 +5,9 @@ Mobile API Video Outlines Resource
With the Mobile API **Video Outlines** resource, you can complete the With the Mobile API **Video Outlines** resource, you can complete the
following tasks. following tasks.
* :ref:`Get a list of all videos in the course <Get the Video List>`. .. contents::
* :ref:`Get a transcript for a specified video and language <Get a Video Transcript>`. :local:
:depth: 1
.. _Get the Video List: .. _Get the Video List:
...@@ -70,4 +71,4 @@ Get the Course Video List ...@@ -70,4 +71,4 @@ Get the Course Video List
Get a Video Transcript Get a Video Transcript
*********************** ***********************
.. autoclass:: mobile_api.video_outlines.views.VideoTranscripts .. autoclass:: mobile_api.video_outlines.views.VideoTranscripts
\ No newline at end of file
...@@ -8,6 +8,10 @@ The requesting user can upload or remove his or her own profile image. ...@@ -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. Users with staff access can remove profile images from any user account.
.. contents::
:local:
:depth: 1
************************************* *************************************
Profile Images API Version and Status Profile Images API Version and Status
************************************* *************************************
......
...@@ -7,8 +7,9 @@ Profile Images API Profile Images Resource ...@@ -7,8 +7,9 @@ Profile Images API Profile Images Resource
With the Profile Images API **Profile Images** resource, you can complete the With the Profile Images API **Profile Images** resource, you can complete the
following tasks. following tasks.
* :ref:`Upload a profile image <Upload a Profile Image>`. .. contents::
* :ref:`Remove profile images <Remove a Profile Image>`. :local:
:depth: 1
.. _Upload a Profile Image: .. _Upload a Profile Image:
......
...@@ -7,7 +7,9 @@ User API User Accounts Resource ...@@ -7,7 +7,9 @@ User API User Accounts Resource
With the User API **User Accounts** resource, you can complete the following With the User API **User Accounts** resource, you can complete the following
tasks. tasks.
* `Get and Update the User's Account Information`_ .. contents::
:local:
:depth: 1
.. _Get and Update the User's Account Information: .. _Get and Update the User's Account Information:
......
...@@ -4,7 +4,9 @@ User API Overview ...@@ -4,7 +4,9 @@ User API Overview
Use the User API to view and update account and preference information. 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 User API Version and Status
......
...@@ -7,8 +7,9 @@ User API User Preferences Resource ...@@ -7,8 +7,9 @@ User API User Preferences Resource
With the User API **User Preferences** resource, you can complete the With the User API **User Preferences** resource, you can complete the
following tasks. following tasks.
* `Get and Update the User's Preferences Information`_ .. contents::
* `Get, Update, or Delete a Specific Preference`_ :local:
:depth: 1
.. _Get and Update the User's Preferences Information: .. _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