diff --git a/README.rst b/README.rst
index 909724e..17c3d49 100644
--- a/README.rst
+++ b/README.rst
@@ -5,3 +5,19 @@ A simple analytics dashboard for aggregate data on PyPI downloads. PyPI Stats
is built using Flask with plotly.js and deployed to AWS elasticbeanstalk.
`PyPI Stats `_
+
+GitHub OAuth
+------------
+
+PyPI Stats has an integration with GitHub so you can track install data on the
+packages you maintain.
+
+`User page `_
+
+JSON API
+--------
+
+PyPI Stats provides a simple JSON API to retrieve aggregate download stats
+and time histories of pypi packages.
+
+`JSON API `_
diff --git a/pypistats/templates/api.html b/pypistats/templates/api.html
index 481140f..9ad29cb 100644
--- a/pypistats/templates/api.html
+++ b/pypistats/templates/api.html
@@ -17,7 +17,7 @@
Endpoints
- /api/<package>/recent
+ /api/package/<package>/recent
Retrieve the aggregate download quantities for the last day/week/month.
Query arguments:
@@ -43,7 +43,7 @@
"type": "recent_downloads"
}
- /api/<package>/overall
+ /api/package/<package>/overall
Retrieve the aggregate daily download time series with or without mirror downloads.
Query arguments:
@@ -75,7 +75,7 @@
"type": "overall_downloads"
}
- /api/<package>/python_major
+ /api/package/<package>/python_major
Retrieve the aggregate daily download time series by Python major version number.
Query arguments:
@@ -113,7 +113,7 @@
"type": "python_major_downloads"
}
- /api/<package>/python_minor
+ /api/package/<package>/python_minor
Retrieve the aggregate daily download time series by Python minor version number.
Query arguments:
@@ -181,7 +181,7 @@
"type": "python_minor_downloads"
}
- /api/<package>/system
+ /api/package/<package>/system
Retrieve the aggregate daily download time series by operating system.
Query arguments:
@@ -232,4 +232,4 @@
}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/pypistats/views/api.py b/pypistats/views/api.py
index e613587..4b1102e 100644
--- a/pypistats/views/api.py
+++ b/pypistats/views/api.py
@@ -23,7 +23,7 @@ def api():
return render_template("api.html", user=g.user)
-@blueprint.route("//recent")
+@blueprint.route("/package//recent")
def api_downloads_recent(package):
"""Get the recent downloads of a package."""
category = request.args.get('period')
@@ -50,7 +50,7 @@ def api_downloads_recent(package):
return jsonify(response)
-@blueprint.route("//overall")
+@blueprint.route("/package//overall")
def api_downloads_overall(package):
"""Get the overall download time series of a package."""
mirrors = request.args.get('mirrors')
@@ -81,21 +81,21 @@ def api_downloads_overall(package):
return jsonify(response)
-@blueprint.route("//python_major")
+@blueprint.route("/package//python_major")
def api_downloads_python_major(package):
"""Get the python major download time series of a package."""
return generic_downloads(
PythonMajorDownloadCount, package, "version", "python_major")
-@blueprint.route("//python_minor")
+@blueprint.route("/package//python_minor")
def api_downloads_python_minor(package):
"""Get the python minor download time series of a package."""
return generic_downloads(
PythonMinorDownloadCount, package, "version", "python_minor")
-@blueprint.route("//system")
+@blueprint.route("/package//system")
def api_downloads_system(package):
"""Get the system download time series of a package."""
return generic_downloads(