Skip to content
Amara Accessibility Media

Amara Accessibility Media

Building access to global information through subtitles, captions, and localization

  • Mission
    • Inclusion and Belonging
    • Culture and Appreciation
    • Morning Talks in the Mirror
  • Tech
    • Solutions and Tools
    • Product Features
  • Captions & Subtitles
    • Accessibility and Captioning
    • Translation and Localization
  • Amara Products
    • Amara Subtitle Editor
    • Amara Plus
    • Amara Community
    • Amara Enterprise
    • Amara On Demand
  • Amplifying Voices
  • Communication Guide
    • Inclusive Language
    • Accessibility
    • Global Accessibility
    • How we communicate with our Amara humans
    • Writing Style and Tips
    • Grammar and Spelling
  • Toggle search form

New API Progress: Subtitles API

Posted on February 18, 2015February 18, 2015 By pcfben No Comments on New API Progress: Subtitles API

This week I worked on one of the more complex API endpoints: the subtitles resource.  The reason for the complexity is the atypical output format.  Normally API endpoints return an object that’s encoded into JSON (or XML, YAML, or something similar).  The subtitles resource follows this pattern, but it also allows users to get the subtitles as straight DFXP, SRT, Web VTT, or any other format that we support.

This leads to a lot of weird corner cases, like what if the user requests DFXP, but there’s an error with the request.  There’s no way to encode that error as DFXP, so what to do?  In the new code I just used JSON as a fallback.  I think the old code did the same, but I’m not really sure.

Anyways, that endpoint is complete and live on production right now.  I’ve said this pretty much every week, but again if you write API code I urge you to check it out — especially in a browser.  One of the big wins from the API change is browsable API endpoints, and I it’s especially nice to use with the subtitles resource.  Try sending actions along with the subtitles to simulate a user hitting the publish/save draft/approve/send back buttons in the editor.  You can get to the subtitles API endpoints by starting with any video (https://amara.org/api/videos/<video-id&gt;).  Then following the links to to get to the subtitles.

Oh yeah, the API documentation should be building again.  There was an error from a change I made last week, but now it’s up-to-date again.  You can check it out at http://amara.readthedocs.org/en/api-refactor/new-api.html

Read these articles next

Development Tags:API

Post navigation

Previous Post: Every Frame a Painting & Satoshi Kon – Subtitles in the Wild
Next Post: Amara Newsletter (Feb ’15): A Fashionably Late 2014 Recap

More articles to learn from

Upcoming Amara API Changes – Summer 2019 Amara Announcements
Amara release notes 2018-04-04 Development
Amara release notes 2018-04-03 Development
Amara release notes 2018-03-20 Development
Amara release notes 2018-03-14 Development
Amara release notes 2018-03-06 Development

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Give us a follow

  • Facebook
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube

Contact us at enterprise@amara.org

Powered by PressBook Grid Blogs theme