diff --git a/docs/api.rst b/docs/api.rst
index 4b51fd85614..d1204960a73 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -44,9 +44,6 @@ Alternatively you can try with the following value::
#val = api.version('pip').get()
#val = api.version('pip').get(slug='1.0.1')
- #val = api.version('pip').highest.get()
- #val = api.version('pip').highest('0.8').get()
-
API Endpoints
-------------
@@ -484,59 +481,6 @@ Version
Filtering Examples
------------------
-Find Highest Version
-~~~~~~~~~~~~~~~~~~~~
-::
-
- http://readthedocs.org/api/v1/version/pip/highest/?format=json
-
-.. http:get:: /api/v1/version/{id}/highest/
-
- :arg id: A Version id.
-
- Retrieve highest version.
-
- .. sourcecode:: js
-
- {
- "is_highest": true,
- "project": "Version 1.0.1 of pip (5476)",
- "slug": [
- "1.0.1"
- ],
- "url": "/docs/pip/en/1.0.1/",
- "version": "1.0.1"
- }
-
-
-Compare Highest Version
-~~~~~~~~~~~~~~~~~~~~~~~
-
-This will allow you to compare whether a certain version is the highest version of a specific project. The below query should return a `'is_highest': false` in the returned dictionary.
-
-::
-
- http://readthedocs.org/api/v1/version/pip/highest/0.8/?format=json
-
-.. http:get:: /api/v1/version/{id}/highest/{version}
-
- :arg id: A Version id.
- :arg version: A Version number or string.
-
- Retrieve highest version.
-
- .. sourcecode:: js
-
- {
- "is_highest": false,
- "project": "Version 1.0.1 of pip (5476)",
- "slug": [
- "1.0.1"
- ],
- "url": "/docs/pip/en/1.0.1/",
- "version": "1.0.1"
- }
-
File Search
~~~~~~~~~~~
diff --git a/media/javascript/rtd.js b/media/javascript/rtd.js
deleted file mode 100644
index 2c37cb90707..00000000000
--- a/media/javascript/rtd.js
+++ /dev/null
@@ -1,95 +0,0 @@
-(function () {
- var checkVersion = function (slug, version) {
- var versionURL = ["//readthedocs.org/api/v1/version/", slug,
- "/highest/", version, "/?callback=?"].join("");
-
- $.getJSON(versionURL, onData);
-
- function onData (data) {
- if (data.is_highest) {
- return;
- }
-
- var currentURL = window.location.pathname.replace(version, data.slug),
- warning = $('
Note
\
- You are not using the most up to date version \
- of the library. is the newest version.
\
-
');
-
- warning
- .find('a')
- .attr('href', currentURL)
- .text(data.version);
-
- $("div.body").prepend(warning);
- }
-
- };
-
- var getVersions = function (slug, version) {
- var versionsURL = ["//readthedocs.org/api/v1/version/", slug,
- "/?active=True&callback=?"].join("");
-
- return $.getJSON(versionsURL, gotData);
-
- function gotData (data) {
- var items = $('')
- , currentURL
- , versionItem
- , object
-
- for (var key in data.objects) {
- object = data.objects[key]
- currentURL = window.location.pathname.replace(version, object.slug)
- versionItem = $('')
- .attr('href', currentURL)
- .text(object.slug)
- .appendTo($('').appendTo(items))
- }
-
- // update widget and sidebar
- $('#version_menu, .version-listing, #sidebar_versions').html(items.html())
- }
- };
-
- $(function () {
- // Code executed on load
- var slug = window.doc_slug,
- version = window.doc_version;
-
- // Show action on hover
- $(".module-item-menu").hover(
- function () {
- $(".hidden-child", this).show();
- }, function () {
- $(".hidden-child", this).hide();
- }
- );
-
- // This is a deprecated API and file, so removing this to reduce errors
- // on our servers.
- // checkVersion(slug, version);
- getVersions(slug, version);
-
- /*
- * Grok the Docs event handling
- * This will allow you to better
- * understand whats happening in your docs,
- * once fully rolled out.
- */
-
-
- // $.ajax({
- // url: "https://api.grokthedocs.com/static/javascript/bundle-client.js",
- // crossDomain: true,
- // dataType: "script",
- // cache: true,
- // });
-
-
-
- });
-
-})();
-
diff --git a/readthedocs/api/base.py b/readthedocs/api/base.py
index 76f82f14f2d..ad270a6690d 100644
--- a/readthedocs/api/base.py
+++ b/readthedocs/api/base.py
@@ -19,7 +19,6 @@
from readthedocs.builds.models import Version
from readthedocs.core.utils import trigger_build
from readthedocs.projects.models import Project, ImportedFile
-from readthedocs.restapi.views.footer_views import get_version_compare_data
from .utils import SearchMixin, PostAuthentication
@@ -139,18 +138,6 @@ def get_object_list(self, request):
self._meta.queryset = Version.objects.api(user=request.user)
return super(VersionResource, self).get_object_list(request)
- def version_compare(self, request, project_slug, base=None, **__):
- project = get_object_or_404(Project, slug=project_slug)
- if base and base != LATEST:
- try:
- base_version = project.versions.get(slug=base)
- except (Version.DoesNotExist, TypeError):
- base_version = None
- else:
- base_version = None
- ret_val = get_version_compare_data(project, base_version)
- return self.create_response(request, ret_val)
-
def build_version(self, request, **kwargs):
project = get_object_or_404(Project, slug=kwargs['project_slug'])
version = kwargs.get('version_slug', LATEST)
@@ -164,15 +151,6 @@ def override_urls(self):
% self._meta.resource_name,
self.wrap_view('get_schema'),
name="api_get_schema"),
- url((r"^(?P%s)/(?P[a-z-_]+)/highest/"
- r"(?P.+)/$")
- % self._meta.resource_name,
- self.wrap_view('version_compare'),
- name="version_compare"),
- url(r"^(?P%s)/(?P[a-z-_]+)/highest/$"
- % self._meta.resource_name,
- self.wrap_view('version_compare'),
- name="version_compare"),
url(r"^(?P%s)/(?P[a-z-_]+[a-z0-9-_]+)/$" # noqa
% self._meta.resource_name,
self.wrap_view('dispatch_list'),
diff --git a/readthedocs/rtd_tests/tests/test_api.py b/readthedocs/rtd_tests/tests/test_api.py
index 332268ec158..e4fa549a691 100644
--- a/readthedocs/rtd_tests/tests/test_api.py
+++ b/readthedocs/rtd_tests/tests/test_api.py
@@ -207,33 +207,6 @@ def test_ensure_get_unauth(self):
resp = self.client.get("/api/v1/project/", data={"format": "json"})
self.assertEqual(resp.status_code, 200)
- def test_not_highest(self):
- resp = self.client.get(
- "http://testserver/api/v1/version/read-the-docs/highest/0.2.1/",
- data={"format": "json"}
- )
- self.assertEqual(resp.status_code, 200)
- obj = json.loads(resp.content)
- self.assertEqual(obj['is_highest'], False)
-
- def test_latest_version_highest(self):
- resp = self.client.get(
- "http://testserver/api/v1/version/read-the-docs/highest/latest/",
- data={"format": "json"}
- )
- self.assertEqual(resp.status_code, 200)
- obj = json.loads(resp.content)
- self.assertEqual(obj['is_highest'], True)
-
- def test_real_highest(self):
- resp = self.client.get(
- "http://testserver/api/v1/version/read-the-docs/highest/0.2.2/",
- data={"format": "json"}
- )
- self.assertEqual(resp.status_code, 200)
- obj = json.loads(resp.content)
- self.assertEqual(obj['is_highest'], True)
-
class APIImportTests(TestCase):