Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-data-api-client
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-analytics-data-api-client
Commits
14207e13
Commit
14207e13
authored
Aug 12, 2016
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add API method for retrieving status and URL of CSV reports
parent
1cb0b260
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
1 deletions
+28
-1
AUTHORS
+1
-0
analyticsclient/course.py
+10
-0
analyticsclient/tests/test_course.py
+16
-0
setup.py
+1
-1
No files found.
AUTHORS
View file @
14207e13
...
@@ -5,3 +5,4 @@ Gabe Mulley <gabe@edx.org>
...
@@ -5,3 +5,4 @@ Gabe Mulley <gabe@edx.org>
Dylan Rhodes <dylanr@stanford.edu>
Dylan Rhodes <dylanr@stanford.edu>
Dmitry Viskov <dmitry.viskov@webenterprise.ru>
Dmitry Viskov <dmitry.viskov@webenterprise.ru>
Tyler Hallada <thallada@edx.org>
Tyler Hallada <thallada@edx.org>
Braden MacDonald <braden@opencraft.com>
analyticsclient/course.py
View file @
14207e13
...
@@ -115,6 +115,16 @@ class Course(object):
...
@@ -115,6 +115,16 @@ class Course(object):
path
=
'courses/{0}/problems_and_tags/'
.
format
(
self
.
course_id
)
path
=
'courses/{0}/problems_and_tags/'
.
format
(
self
.
course_id
)
return
self
.
client
.
get
(
path
,
data_format
=
data_format
)
return
self
.
client
.
get
(
path
,
data_format
=
data_format
)
def
reports
(
self
,
report_name
,
data_format
=
DF
.
JSON
):
"""
Get CSV download information for a particular report in the course.
Arguments:
report_name (str): Report name, e.g. "problem_response"
"""
path
=
'courses/{0}/reports/{1}/'
.
format
(
self
.
course_id
,
report_name
)
return
self
.
client
.
get
(
path
,
data_format
=
data_format
)
def
videos
(
self
,
data_format
=
DF
.
JSON
):
def
videos
(
self
,
data_format
=
DF
.
JSON
):
"""
"""
Get the videos for the course.
Get the videos for the course.
...
...
analyticsclient/tests/test_course.py
View file @
14207e13
...
@@ -162,6 +162,22 @@ class CoursesTests(ClientTestCase):
...
@@ -162,6 +162,22 @@ class CoursesTests(ClientTestCase):
self
.
assertEqual
(
body
,
self
.
course
.
problems_and_tags
())
self
.
assertEqual
(
body
,
self
.
course
.
problems_and_tags
())
@httpretty.activate
@httpretty.activate
def
test_reports
(
self
):
body
=
{
"last_modified"
:
"2016-08-12T043411"
,
"file_size"
:
3419
,
"course_id"
:
"Example_Demo_2016-08"
,
"expiration_date"
:
"2016-08-12T233704"
,
"download_url"
:
"https://bucket.s3.amazonaws.com/foo_bar_1_problem_response.csv?Signature=123&Expires=456"
,
"report_name"
:
"problem_response"
}
uri
=
self
.
get_api_url
(
'courses/{0}/reports/problem_response/'
.
format
(
self
.
course_id
))
httpretty
.
register_uri
(
httpretty
.
GET
,
uri
,
body
=
json
.
dumps
(
body
))
self
.
assertEqual
(
body
,
self
.
course
.
reports
(
"problem_response"
))
@httpretty.activate
def
test_videos
(
self
):
def
test_videos
(
self
):
body
=
[
body
=
[
...
...
setup.py
View file @
14207e13
...
@@ -2,7 +2,7 @@ from distutils.core import setup
...
@@ -2,7 +2,7 @@ from distutils.core import setup
setup
(
setup
(
name
=
'edx-analytics-data-api-client'
,
name
=
'edx-analytics-data-api-client'
,
version
=
'0.
8
.0'
,
version
=
'0.
9
.0'
,
packages
=
[
'analyticsclient'
,
'analyticsclient.constants'
],
packages
=
[
'analyticsclient'
,
'analyticsclient.constants'
],
url
=
'https://github.com/edx/edx-analytics-data-api-client'
,
url
=
'https://github.com/edx/edx-analytics-data-api-client'
,
description
=
'Client used to access edX analytics data warehouse'
,
description
=
'Client used to access edX analytics data warehouse'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment