Cloud Storage for Horary Charts#

We have 5 endpoints to deal with cloud storage. All these endpoints are protected (see access levels).

  • /api/cloud/horary-charts/save/
  • /api/cloud/horary-charts/
  • /api/cloud/horary-charts/<id>/
  • /api/cloud/horary-charts/update/<id>/
  • /api/cloud/horary-charts/delete/<id>/

Save the Chart#

/api/cloud/horary-charts/save/

Use this endpoint to save the horary chart in the database. The user's email is extracted from the auth. header and associated with the saved chart. This endpoint additionally checks the data provided before saving the chart.

Request#

Method POST

Value Type Required Comment
year int yes In the range 1950..2100
month int yes 1..12
day int yes
hour int yes
minute int yes
second int no
tz float yes Timezone (UTC offset in hours), e.g., -3.5 means minus 3 hours and 30 minutes latitudes
ln_d int yes Longitude degrees 0..180
ln_m int yes Longitude minutes 0..59
dir_ln str yes east-west direction. Can be e or w
lt_d int yes Latitude degrees 0..90
lt_m int yes Latitude minutes 0..59
dir_lt str yes north-south direction. Can be n or s
fortune str no 0 to use reversed PoF, 1 to use a day-only formula. Default is 1
question str yes horary question string (max 70 symbols)
status str yes *See note 1 below
category str yes **See note 2 below
note str no A text field

* Note 1. The status field represents the status of the feedback on the accuracy of astrological prediction. It can take one of the following values:

  • no_feedback
  • proved
  • unproved

* Note 2. The category field represents the predefined category of the question asked. It can take one of the following values:

  • other
  • love
  • children
  • business
  • vocation
  • contracts
  • money
  • trials
  • safety
  • health
  • relocation
  • search
  • contest

List the Charts#

/api/cloud/horary-charts/

Use this endpoint to display all or search through the charts associated with the given user. A user's credentials are taken from the auth. header in the request.

Request#

Method GET

Value Type Required Comment
search str no If given, then the API endpoint will search that string in notes and question field of the DB among all charts saved by the user
page int no The output list is paginated with 10 results per page. With this parameter you can browse the pages

If search (search query) is not provided, this endpoint will return all the charts saved by the user.

If page value is not set, the default output starts with the 1st page.

Response#

{
    "count": 237, // total number of charts
    "came_true_objects": 18, // Number of charts with status 'proved'
    "unproved_objects": 44, // Number of charts with status 'unproved'
    "next": "http://localhost/api/cloud/horary-charts/?page=2",
    "previous": null, // links to prev|nex pages
    "results": [
        {
            "id": 16386,
            "date_added": "2023-09-27T17:02:29.744747Z",
            "user_email": "...@gmail.com",
            "category": "safety",
            "year": 2023,
            "month": 8,
            "day": 1,
            "hour": 12,
            "minute": 15,
            "second": 0,
            "tz": 3.0,
            "ln_d": 37,
            "ln_m": 37,
            "dir_ln": "e",
            "lt_d": 55,
            "lt_m": 45,
            "dir_lt": "n",
            "question": "Will I...",
            "is_pof_reversible": false,
            "notes": "",
            "status": "no_feedback"
        },
        // ..etc
    ]
}

Retrieve a Chart#

/api/cloud/horary-charts/<id>/

Use this endpoint to get details of the given chart.

Request#

Method GET

Value Type Required Comment
id int yes The id of the chart.

The chart with the given id should be created by the same user who makes a request.

Response#

{
    "id": 16386,
    "date_added": "2023-09-27T17:02:29.744747Z",
    "user_email": "...@gmail.com",
    "category": "safety",
    "year": 2023,
    "month": 8,
    "day": 1,
    "hour": 12,
    "minute": 15,
    "second": 0,
    "tz": 3.0,
    "ln_d": 37,
    "ln_m": 37,
    "dir_ln": "e",
    "lt_d": 55,
    "lt_m": 45,
    "dir_lt": "n",
    "question": "Will I...",
    "is_pof_reversible": false,
    "notes": "",
    "status": "no_feedback"
}

Update the Chart#

/api/cloud/horary-charts/update/<id>/

Use this endpoint to update existing chart.

Request#

Method PATCH

Value Type Required Comment
id int yes The id of the chart.
question str no A short question which is shown in the chart
notes str no A user notes to the chart
status str no See note 1 below
category str no See note 2 below

The chart with the given id should be created by the same user who makes a request for the modification being effective.

* Note 1. The status field represents the status of the feedback on the accuracy of astrological prediction. It can take one of the following values:

  • no_feedback
  • proved
  • unproved

* Note 2. The category field represents the predefined category of the question asked. It can take one of the following values:

  • other
  • love
  • children
  • business
  • vocation
  • contracts
  • money
  • trials
  • safety
  • health
  • relocation
  • search
  • contest

Response#

it returns updated data of the editable fields:

{
    "id": 16385,
    "question": "some question",
    "notes": "my updated notes",
    "status": "no_feedback",
    "category": "other",
    "is_pof_reversible": false
}

Delete the Chart#

/api/cloud/horary-charts/delete/<id>/

Use this endpoint to delete the chart.

Request#

Method DELETE

Value Type Required Comment
id int yes The id of the chart

Only the user who creates the chart can delete it.

Response#

Statis 204 - deleted.