Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 1.74 KB

README.md

File metadata and controls

53 lines (31 loc) · 1.74 KB

books Function

The books function provides an API for working with books on BloomLibrary.org.

URL format

The URL used to access this function always contains books. It may be followed by a book ID: books/id. The book ID may have an action: books/id:action.

http://api.bloomlibrary.org/v1/books/id:action

Actions

Long-running actions

See ../status/README.md for details on how to call long-running actions and how they are implemented.

upload-start (POST)

Gets everything ready for a client to begin uploading book files.

See the API documentation for details.

upload-finish (POST)

Finalizes the update after the client uploads the book files.

See the API documentation for details.

Failures

Any failures result in

  • 400 if there is an error related to the inputs provided.
  • 500 if there is another error.

Environment Variables

See ../README.md for some common environment variables needed for several functions.

  • BloomUploadPermissionManagerS3Key{suffix} - the AWS Access Key ID for the user which has permission to manage the S3 bucket for the given suffix.

  • BloomUploadPermissionManagerS3SecretKey{suffix} - the AWS Secret Access Key for the user.

    • suffix
      • Prod - bloom_upload_permission_manager
      • Dev - bloom_upload_permission_manager_dev
      • UnitTest - bloom_upload_permission_manager_unittest
  • bloomParseServerDevApiSuperUserPassword - the password for the "api-super-user" parse user in the development db.

  • bloomParseServerProdApiSuperUserPassword - the password for the "api-super-user" parse user in the production db.

  • bloomContentfulReadOnlyToken - the read-only token for the Contentful API - also used by the contentfulToCrowdin function.