Permalink
Browse files

Add download data to Project API

  • Loading branch information...
1 parent d8296ff commit ad682dcd0d0ad6141352116e5e2d854249200e54 @ericholscher ericholscher committed Nov 7, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 readthedocs/api/base.py
@@ -52,6 +52,12 @@ def get_object_list(self, request):
def dehydrate(self, bundle):
bundle.data['subdomain'] = "http://%s/" % bundle.obj.subdomain
+ downloads = {}
+ downloads['htmlzip'] = bundle.obj.get_htmlzip_url()
+ downloads['epub'] = bundle.obj.get_epub_url()
+ downloads['pdf'] = bundle.obj.get_pdf_url()
+ downloads['manpage'] = bundle.obj.get_manpage_url()
+ bundle.data['downloads'] = downloads
return bundle
def post_list(self, request, **kwargs):

0 comments on commit ad682dc

Please sign in to comment.