On Mon, Apr 29, 2013 at 9:12 AM, Julen Ruiz Aizpuru <jul...@gmail.com> wrote:
> Hi,

Hi.

> I see some devs are working on providing a RESTful API for Pootle, and
> have some questions regarding it. I know it's still in its early
> development stages, so forgive me if I ask something that's going to
> be/is already addressed.
>
> - Unless core parts of Pootle use the public API under the hood (the
> translation editor, for instance), can the API infrastructure be made
> optional?

I think we can easily add an USE_API option in settings with default
to False and check in in pootle/urls.py before assigning the API urls,
and move the Tastypie requirement to optional.


> - For now I see it returns all the fields and data contained within a
> Django model. Any way to restrict that to the fields that are only
> relevant for an API usage?
> Returning the `report_target` field for a translation project seems
> useless to me, for example.

Sure. You can use
http://django-tastypie.readthedocs.org/en/latest/resources.html#excludes
or http://django-tastypie.readthedocs.org/en/latest/resources.html#fields
if you prefer.


> Is there anything else we should know about the scope of the API?

You can see the current state of the scope in
http://docs.translatehouse.org/projects/pootle/en/latest/specs/api.html
which reflects the last state.


> Thanks in advance,
> Julen.

Thank to you, more eyes on this would help make it better.

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to