Deprecating REST APIs per DOC-2101, DOC-2653. Also adding the -W shpinx-build option per DOC-2530.
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
##################################################
|
||||
Mobile API Course Information Resource
|
||||
##################################################
|
||||
|
||||
With the Mobile API **Course Information** resource, you can complete the
|
||||
following tasks.
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. _Get Course Updates:
|
||||
|
||||
*******************
|
||||
Get Course Updates
|
||||
*******************
|
||||
|
||||
.. autoclass:: mobile_api.course_info.views.CourseUpdatesList
|
||||
|
||||
**Example response**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
HTTP 200 OK
|
||||
Content-Type: application/json
|
||||
Vary: Accept
|
||||
Allow: GET, HEAD, OPTIONS
|
||||
|
||||
[
|
||||
{
|
||||
"date": "October 4, 2014",
|
||||
"content": "Reminder about the quiz due today.
|
||||
"status": "visible",
|
||||
"id": 2
|
||||
},
|
||||
|
||||
{ "date": "October 1, 2014",
|
||||
"content": "Welcome to the course. We
|
||||
built this to help you become more familiar with taking a course on
|
||||
edX prior to your first day of class. \n<br>\n<br>\nIn a live course,
|
||||
this section is where all of the latest course announcements and
|
||||
updates would be.,
|
||||
"id": 1 } ]
|
||||
|
||||
.. _Get Course Handouts:
|
||||
|
||||
*******************
|
||||
Get Course Handouts
|
||||
*******************
|
||||
|
||||
.. autoclass:: mobile_api.course_info.views.CourseHandoutsList
|
||||
|
||||
**Example response**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
HTTP 200 OK
|
||||
Content-Type: application/json
|
||||
Vary: Accept
|
||||
Allow: GET, HEAD, OPTIONS
|
||||
|
||||
{
|
||||
"handouts_html": "\n\n<ol class=\"treeview-handoutsnav\">\n
|
||||
<li><a href=\"/static/demoPDF.pdf\">Example handout</a></li>
|
||||
</ol>\n\n"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,29 @@
|
||||
.. _edX Platform Mobile API Version 0.5:
|
||||
|
||||
#####################################
|
||||
Mobile API Version 0.5
|
||||
Mobile API Version 0.5 (Deprecated)
|
||||
#####################################
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
overview
|
||||
course_info
|
||||
users
|
||||
video_outlines
|
||||
The mobile API version 0.5 is deprecated. EdX platform developers should not
|
||||
implement new client functions that use the mobile API version 0.5.
|
||||
|
||||
You can get information about the courses offered by an edX platform
|
||||
installation by using the ``/api/courses/v1/courses/`` REST endpoint.
|
||||
|
||||
You can get information about the parameters and return values of
|
||||
``/api/courses/v1/courses`` from the Django REST framework web page for that
|
||||
endpoint. For example, `https://courses.edx.org/api/courses/v1/courses/`_
|
||||
provides information about the courses offered by edx.org.
|
||||
|
||||
.. note::
|
||||
|
||||
The documentation available at `docs.edx.org`_ does not include information
|
||||
about the ``/api/courses/v1/courses/`` REST endpoint. Developer
|
||||
documentation for the ``/api/courses/v1/courses/`` is planned in upcoming
|
||||
documentation releases.
|
||||
|
||||
You can get and update information about learners by using the edX platform
|
||||
user API. For more information about getting and updating learner information
|
||||
in the user API, see :ref:`Get and Update the User's Account Information`.
|
||||
|
||||
.. include:: ../links.rst
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
.. _edX Platform Mobile API Overview:
|
||||
|
||||
################################################
|
||||
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
|
||||
******************************************
|
||||
|
||||
The Mobile API is currently at version 0.5 and is an alpha release. We plan on
|
||||
making significant enhancements and changes to the API.
|
||||
|
||||
.. caution::
|
||||
As this is a new and rapidly evolving API, at this time edX does not
|
||||
guarantee forward compatibility. We encourage you to use and experiment with
|
||||
the API, while keeping in mind that endpoints might change.
|
||||
|
||||
*************************************
|
||||
Mobile API Resources and Endpoints
|
||||
*************************************
|
||||
|
||||
The Mobile API supports the following resources, tasks, methods, and
|
||||
endpoints.
|
||||
|
||||
========================
|
||||
Mobile API User Resource
|
||||
========================
|
||||
|
||||
.. list-table::
|
||||
:widths: 20 10 70
|
||||
:header-rows: 1
|
||||
|
||||
* - Task
|
||||
- Method
|
||||
- Endpoint
|
||||
* - :ref:`Get details about a user<Get User Details>`
|
||||
- GET
|
||||
- /api/mobile/v0.5/users/{username}
|
||||
* - :ref:`Get course enrollments for a user<Get a User's Course Enrollments>`
|
||||
- GET
|
||||
- /api/mobile/v0.5/users/{username}/course_enrollments/
|
||||
* - :ref:`Get a user's status in a course<Get or Change User Status in a Course>`
|
||||
- GET
|
||||
- /api/mobile/v0.5/users/{username}/course_status_info/{course_id}
|
||||
* - :ref:`Change a user's status in a course<Get or Change User Status in a Course>`
|
||||
- PATCH
|
||||
- /api/mobile/v0.5/users/{username}/course_status_info/{course_id}
|
||||
|
||||
========================================
|
||||
Mobile API Course Information Resource
|
||||
========================================
|
||||
|
||||
.. list-table::
|
||||
:widths: 20 10 70
|
||||
:header-rows: 1
|
||||
|
||||
* - Task
|
||||
- Method
|
||||
- Endpoint
|
||||
* - :ref:`Get updates for a course<Get Course Updates>`
|
||||
- GET
|
||||
- /api/mobile/v0.5/course_info/{organization}/{course_number}/{course_run}/updates
|
||||
* - :ref:`Get handouts for a course<Get Course Handouts>`
|
||||
- GET
|
||||
- /api/mobile/v0.5/course_info/{organization}/{course_number}/{course_run}/handouts
|
||||
|
||||
=====================================
|
||||
Mobile API Video Outlines Resource
|
||||
=====================================
|
||||
|
||||
.. list-table::
|
||||
:widths: 20 10 70
|
||||
:header-rows: 1
|
||||
|
||||
* - Task
|
||||
- Method
|
||||
- Endpoint
|
||||
* - :ref:`Get videos in a course<Get the Video List>`
|
||||
- GET
|
||||
- /api/mobile/v0.5/video_outlines/courses/{organization}/{course_number}/{course_run}
|
||||
* - :ref:`Get a video transcript<Get a Video Transcript>`
|
||||
- GET
|
||||
- /api/mobile/v0.5/video_outlines/transcripts/{organization}/{course_number}/{course_run}/{video ID}/{language code}
|
||||
@@ -1,125 +0,0 @@
|
||||
####################################
|
||||
Mobile API User Resource
|
||||
####################################
|
||||
|
||||
With the Mobile API **User** resource, you can complete the following tasks.
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. _Get User Details:
|
||||
|
||||
*******************
|
||||
Get User Details
|
||||
*******************
|
||||
|
||||
.. autoclass:: mobile_api.users.views.UserDetail
|
||||
|
||||
**Example response**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
HTTP 200 OK
|
||||
Vary: Accept
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Allow: GET, HEAD, OPTIONS
|
||||
|
||||
{
|
||||
"id": 67,
|
||||
"username": "mtwain",
|
||||
"email": "mtwain@email-domain.com",
|
||||
"name": "mtwain",
|
||||
"course_enrollments": "http://localhost:8000/api/mobile/v0.5/users/mtwain/course_enrollments/"
|
||||
}
|
||||
|
||||
.. _Get a User's Course Enrollments:
|
||||
|
||||
**************************************
|
||||
Get a User's Course Enrollments
|
||||
**************************************
|
||||
|
||||
.. autoclass:: mobile_api.users.views.UserCourseEnrollmentsList
|
||||
|
||||
**Example response**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
HTTP 200 OK
|
||||
Vary: Accept
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Allow: GET, HEAD, OPTIONS
|
||||
|
||||
{
|
||||
"created": "2014-04-18T13:44:25Z",
|
||||
"mode": "honor",
|
||||
"is_active": true,
|
||||
"course": {
|
||||
"course_about": "http://localhost:8000/api/mobile/v0.5/course_info/edX/Open_DemoX/edx_demo_course/about",
|
||||
"course_updates": "http://localhost:8000/api/mobile/v0.5/course_info/edX/Open_DemoX/edx_demo_course/updates",
|
||||
"number": "Open_DemoX",
|
||||
"org": "edX",
|
||||
"video_outline": "http://localhost:8000/api/mobile/v0.5/video_outlines/courses/edX/Open_DemoX/edx_demo_course",
|
||||
"id": "edX/Open_DemoX/edx_demo_course",
|
||||
"latest_updates": {
|
||||
"video": null
|
||||
},
|
||||
"end": null,
|
||||
"name": "edX Demonstration Course",
|
||||
"course_handouts": "http://localhost:8000/api/mobile/v0.5/course_info/edX/Open_DemoX/edx_demo_course/handouts",
|
||||
"start": "1970-01-01T05:00:00Z",
|
||||
"course_image": "/c4x/edX/Open_DemoX/asset/images_course_image.jpg",
|
||||
"discussion_url": "http://localhost:8000/api/discussion/v1/courses/course-v1:edX/Open_DemoX/edx_demo_course"
|
||||
}
|
||||
},
|
||||
{
|
||||
"created": "2014-09-29T13:46:06Z",
|
||||
"mode": "honor",
|
||||
"is_active": true,
|
||||
"course": {
|
||||
"course_about": "http://localhost:8000/api/mobile/v0.5/course_info/edX/DemoX/Demo_Course/about",
|
||||
"course_updates": "http://localhost:8000/api/mobile/v0.5/course_info/edX/DemoX/Demo_Course/updates",
|
||||
"number": "DemoX",
|
||||
"org": "edX",
|
||||
"video_outline": "http://localhost:8000/api/mobile/v0.5/video_outlines/courses/edX/DemoX/Demo_Course",
|
||||
"id": "edX/DemoX/Demo_Course",
|
||||
"latest_updates": {
|
||||
"video": null
|
||||
},
|
||||
"end": null,
|
||||
"name": "edX Demonstration Course",
|
||||
"course_handouts": "http://localhost:8000/api/mobile/v0.5/course_info/edX/DemoX/Demo_Course/handouts",
|
||||
"start": "2013-02-05T05:00:00Z",
|
||||
"course_image": "/c4x/edX/DemoX/asset/images_course_image.jpg",
|
||||
"discussion_url": "http://localhost:8000/api/discussion/v1/courses/course-v1:edX/DemoX/Demo_Course",
|
||||
}
|
||||
}
|
||||
|
||||
.. _Get or Change User Status in a Course:
|
||||
|
||||
**************************************
|
||||
Get or Change User Status in a Course
|
||||
**************************************
|
||||
|
||||
.. autoclass:: mobile_api.users.views.UserCourseStatus
|
||||
|
||||
**Example Response**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
HTTP 200 OK
|
||||
Vary: Accept
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Allow: GET, HEAD, OPTIONS
|
||||
|
||||
{
|
||||
"last_visited_module_id": "i4x://edX/DemoX/html/6018785795994726950614ce7d0f38c5",
|
||||
|
||||
"last_visited_module_path": [
|
||||
"i4x://edX/DemoX/html/6018785795994726950614ce7d0f38c5",
|
||||
"i4x://edX/DemoX/vertical/26d89b08f75d48829a63520ed8b0037d",
|
||||
"i4x://edX/DemoX/sequential/dbe8fc027bcb4fe9afb744d2e8415855",
|
||||
"i4x://edX/DemoX/chapter/social_integration",
|
||||
"i4x://edX/DemoX/course/Demo_Course"
|
||||
]
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
##################################################
|
||||
Mobile API Video Outlines Resource
|
||||
##################################################
|
||||
|
||||
With the Mobile API **Video Outlines** resource, you can complete the
|
||||
following tasks.
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. _Get the Video List:
|
||||
|
||||
**************************
|
||||
Get the Course Video List
|
||||
**************************
|
||||
|
||||
.. autoclass:: mobile_api.video_outlines.views.VideoSummaryList
|
||||
|
||||
|
||||
**Example response**
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
HTTP 200 OK
|
||||
Vary: Accept
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Allow: GET, HEAD, OPTIONS
|
||||
|
||||
[
|
||||
{
|
||||
"section_url": "http://localhost:8000/courses/edX/Open_DemoX/edx_demo_course/courseware/d8a6192ade314473a78242dfeedfbf5b/edx_introduction/",
|
||||
"path": [
|
||||
{
|
||||
"category": "chapter",
|
||||
"name": "Introduction"
|
||||
},
|
||||
{
|
||||
"category": "sequential",
|
||||
"name": "Demo Course Overview"
|
||||
},
|
||||
{
|
||||
"category": "vertical",
|
||||
"name": "Introduction: Video and Sequences"
|
||||
}
|
||||
],
|
||||
"unit_url": "http://localhost:8000/courses/edX/Open_DemoX/edx_demo_course/courseware/d8a6192ade314473a78242dfeedfbf5b/edx_introduction/1",
|
||||
"named_path": [
|
||||
"Introduction",
|
||||
"Demo Course Overview"
|
||||
],
|
||||
"summary": {
|
||||
"category": "video",
|
||||
"video_thumbnail_url": null,
|
||||
"language": "en",
|
||||
"name": "Welcome!",
|
||||
"video_url": "https://s3.amazonaws.com/edx-course-videos/edx-edx101/EDXSPCPJSP13-H010000_100.mp4",
|
||||
"duration": null,
|
||||
"transcripts": {
|
||||
"en": "http://localhost:8000/api/mobile/v0.5/video_outlines/transcripts/edX/Open_DemoX/edx_demo_course/0b9e39477cf34507a7a48f74be381fdd/en"
|
||||
},
|
||||
"id": "i4x://edX/Open_DemoX/video/0b9e39477cf34507a7a48f74be381fdd",
|
||||
"size": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
.. _Get a Video Transcript:
|
||||
|
||||
***********************
|
||||
Get a Video Transcript
|
||||
***********************
|
||||
|
||||
.. autoclass:: mobile_api.video_outlines.views.VideoTranscripts
|
||||
Reference in New Issue
Block a user