ACE-VSIT / aztro

The Astrology API. Get daily horoscope!

Home Page:https://aztro.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to aztro's documentation!

aztro api logo

What is aztro?

aztro REST API allows developers to access and integrate the functionality of aztro with other applications. The API retrieves daily horoscopes for yesterday, today, and tomorrow.

Feel free to contribute on Github.

Why aztro?

aztro is for a developer who wants an API that provides horoscope info for sun signs such as Lucky Number, Lucky Color, Mood, Color, Compatibility with other sun signs, description of a sign for that day etc.

URL

POST: https://aztro.herokuapp.com

Note: I highly recommend you to host the API for your usage on your own server, and use this Heroku hosted API for test purpose only.

Parameters

sign :

Name of the sign.

List of all signs - aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius and pisces.

day :
Day can be today,tomorrow or yesterday

Usage

POST: https://aztro.herokuapp.com?sign= <sign> &day= <day>

Example

The following example is for sun sign aries -

cURL

curl -X POST \
'https://aztro.herokuapp.com/?sign=aries&day=today'

Python

import requests

params = (
('sign', 'aries'),
('day', 'today'),
)

requests.post('https://aztro.herokuapp.com/', params=params)

Node.js

var request = require('request');

var options = {
url: 'https://aztro.herokuapp.com/?sign=aries&day=today',
method: 'POST'
};

function callback(error, response, body) {
if (!error && response.statusCode == 200) {
    console.log(body);
}
}

request(options, callback);

PHP

<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array();
$response = Requests::post('https://aztro.herokuapp.com/?sign=aries&day=today', $headers);

Ajax

$.ajax({
     type:'POST',
     url:'https://aztro.herokuapp.com?sign=aries&day=today',
     success:function(data){
     console.log(data);
     }
});

Response

{"current_date": "June 23, 2017", "compatibility": " Cancer", "lucky_time": " 7am",
 "lucky_number": " 64", "color": " Spring Green", "date_range": "Mar 21 - Apr 20",
 "mood": " Relaxed", "description": "It's finally time for you to think about just
  one thing: what makes you happy. Fortunately, that happens to be a person who feels
  the same way. Give yourself the evening off. Refuse to be put in charge of anything."}

License

Copyright 2017 Sameer Kumar

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contact

Questions? Suggestions? Feel free to contact me at sameer18051998@gmail.com

Credits

"aztro" was created by Sameer Kumar. Other Contributors -

  • Harshit Sahni (for the idea)
  • Aditya Dhawan (for Ajax example)

Source of horoscope updates - http://astrology.kudosmedia.net/

and if I have neglected to mention someone, please let me know.

Please feel free to use and adapt this small API.

https://readthedocs.org/projects/aztro/badge/?version=latest

About

The Astrology API. Get daily horoscope!

https://aztro.herokuapp.com

License:Apache License 2.0


Languages

Language:Python 100.0%