gemma-sage / daily_psalms_api /openapi.yaml
neuralworm's picture
fix: Convert embedded repo to regular directory
e8510d3
Raw
History Blame
4.69 kB
openapi: 3.1.0
info:
title: Daily Psalms API
version: 1.0.0
description: API for retrieving ELS data from Psalms.
servers:
- url: http://localhost:5000 # Adjust if your API runs on a different port or host
paths:
/api/psalm:
get:
operationId: getPsalms
summary: Get ELS data from Psalms
description: >-
Retrieves Equidistant Letter Sequence (ELS) data from the Book of Psalms
based on the Gematria sum of a given text and/or date.
parameters:
- name: name
in: query
required: false
description: The name to calculate the passages for.
schema:
type: string
- name: date
in: query
required: false
description: >-
The date to calculate Gematria from (YYYY-MM-DD).
If not provided, the current date is used.
schema:
type: string
format: date
- name: tlang
in: query
required: false
description: >-
The target language for translation of the date (e.g., 'en', 'ar', 'iw').
Defaults to 'en'.
schema:
type: string
default: en
responses:
'200':
description: Successful response with ELS data.
content:
application/json:
schema:
type: object
properties:
gematria_sum:
type: integer
description: The calculated Gematria sum.
els_results:
type: array
items:
type: object
properties:
book:
type: string
description: The book number (e.g., "Torah 19." for Psalms).
title:
type: string
description: The title of the book (e.g., "Psalms").
result_text:
type: string
description: The ELS text found.
result_sum:
type: integer
description: The Gematria sum of the ELS text.
start_char_index:
type: integer
description: The starting character index of the ELS text in the source.
end_char_index:
type: integer
description: The ending character index of the ELS text in the source.
step:
type: integer
description: The step used for ELS.
round:
type: integer
description: The ELS round (1 or -1).
source_language:
type: string
description: The source language of the text (e.g., "iw" for Hebrew).
translated_text:
type: string
description: The translated ELS text (if applicable).
chapter:
type: integer
description: The chapter number where the ELS text was found.
verse:
type: integer
description: The verse number where the ELS text was found.
search_term:
type: string
description: The original search term (text and/or date words).
date_words:
type: string
description: The date converted to words.
language:
type: string
description: The language used for date translation.
error:
type: string
description: An error message, if any.
'400':
description: Bad request (e.g., invalid parameters).
content:
application/json:
schema:
type: object
properties:
error:
type: string
'500':
description: Internal server error.
content:
application/json:
schema:
type: object
properties:
error:
type: string
details:
type: string