GithubHelp home page GithubHelp logo

daxeel / celebinfo-api Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 5.0 23 KB

Unofficial API of famousbirthdays.com

Home Page: https://market.mashape.com/daxeel/celebinfo

Python 48.36% CSS 14.89% HTML 36.75%

celebinfo-api's Introduction

<img src="http://i1.wp.com/blog.mashape.com/wp-content/uploads/2013/02/Screen_Shot_2013-02-12_at_6.53.42_PM.png"

CelebInfo-API

Unofficial API of famousbirthdays.com

About

CelebInfo is a simple API which will give you access to the information like birthdays etc. With this API you will get these data of celebrities.

  • Name
  • Age
  • Birthday
  • Birth Year
  • Birth Place
  • Birth Sign
  • Occupation
  • Photo

Documentation

API documentation here is for python language. To use this in python you need to install unirest module.

sudo pip install unirest

###Search By Birthday API Request syntax :

response = unirest.get("https://daxeel-celebinfo-v1.p.mashape.com/date/{DATE}/{MONTH_IN_WORDS}",
  headers={
    "X-Mashape-Key": "V96M0xptxxxxxx",
    "Accept": "text/plain"
  }
)

where,
DATE and MONTH_IN_WORDS is a day and API will give you the data of all celebrities having birthday on this specified date and month.
For example,

response = unirest.get("https://daxeel-celebinfo-v1.p.mashape.com/date/28/september",
  headers={
    "X-Mashape-Key": "V96M0xptxxxxxx",
    "Accept": "text/plain"
  }
)

Response will be like this,

{
	"data": [{
		"age": "18",
		"birth_place": "Harij, Gujarat, India",
		"birth_sign": "Pisces",
		"birth_year": "1996",
		"birthday": "September 28",
		"name": "Daxeel Soni",
		"occupation": "Developer of this API. More: www.daxeelsoni.in",
		"photo_url": "http://daxeelsoni.in/images/me.jpg"
	}, {
		"age": 28,
		"birth_place": "Houston",
		"birth_sign": "Libra",
		"birth_year": "1987",
		"birthday": "September 28",
		"name": "Hilary Duff",
		"occupation": "TV Actress",
		"photo_url": "http://www.famousbirthdays.com/thumbnails/duff-hilary-medium.jpg"
	}, {
		"age": 38,
		"birth_place": "Columbia",
		"birth_sign": "Libra",
		"birth_year": "1977",
		"birthday": "September 28",
		"name": "Young Jeezy",
		"occupation": "Rapper",
		"photo_url": "http://www.famousbirthdays.com/thumbnails/jeezy-young-medium.jpg"
	}, {
		"age": 48,
		"birth_place": "Roanoke",
		"birth_sign": "Libra",
		"birth_year": "1967",
		"birthday": "September 28",
		"name": "Challen Cates",
		"occupation": "TV Actress",
		"photo_url": "http://www.famousbirthdays.com/thumbnails/cates-challen-medium.jpg"
	}]
}



Custom Search

API Request syntax :
```py response = unirest.get("https://daxeel-celebinfo-v1.p.mashape.com/custom/{SEARCH_TYPE}", headers={ "X-Mashape-Key": "V96M0xptxxxxxx" } ) ```
where,
SEARCH_TYPE can be

yesterday Returns info of celebrities having birthdays yesterday
today Returns info of celebrities having birthdays today
tomorrow Returns info of celebrities having birthdays to tomorrow
tdat Returns info of celebrities having birthdays the after tomorrow

For example, ```py response = unirest.get("https://daxeel-celebinfo-v1.p.mashape.com/custom/today", headers={ "X-Mashape-Key": "V96M0xptxxxxxx" } ) ``` Response will be like this, ```json { "data": [{ "age": 20, "birth_place": "Houston", "birth_sign": "Aquarius", "birth_year": "1996", "birthday": "January 23", "name": "Chachi Gonzales", "occupation": "Dancer", "photo_url": "http://www.famousbirthdays.com/thumbnails/gonzales-chachi-medium.jpg" }, { "age": 32, "birth_place": "Netherlands", "birth_sign": "Aquarius", "birth_year": "1984", "birthday": "January 23", "name": "Arjen Robben", "occupation": "Soccer Player", "photo_url": "http://www.famousbirthdays.com/thumbnails/robben-arjen-medium.jpg" }, { "age": 31, "birth_place": "Pennsylvania", "birth_sign": "Aquarius", "birth_year": "1985", "birthday": "January 23", "name": "Draya Michele", "occupation": "Reality Star", "photo_url": "http://www.famousbirthdays.com/thumbnails/michele-draya-medium.jpg" }, { "age": 24, "birth_place": "New Jersey", "birth_sign": "Aquarius", "birth_year": "1992", "birthday": "January 23", "name": "Louis Giordano", "occupation": "Vine Star", "photo_url": "http://www.famousbirthdays.com/thumbnails/giordano-louis-medium.jpg" }] } ```

celebinfo-api's People

Contributors

daxeel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

celebinfo-api's Issues

how do I get around this?

CelebInfo-API % flask run --host=0.0.0.0 --port=3000

Traceback (most recent call last):
File "/Users/me/.pyenv/versions/3.10.2/bin/flask", line 8, in
sys.exit(main())
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/flask/cli.py", line 1064, in main
cli.main()
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/flask/cli.py", line 912, in run_command
raise e from None
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/flask/cli.py", line 898, in run_command
app = info.load_app()
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/flask/cli.py", line 309, in load_app
app = locate_app(import_name, name)
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/flask/cli.py", line 219, in locate_app
import(module_name)
File "/Users/me/src/famous_birthday/CelebInfo-API/celebinfo.py", line 11, in
app.config.from_pyfile('flaskapp.cfg')
File "/Users/me/.pyenv/versions/3.10.2/lib/python3.10/site-packages/flask/config.py", line 188, in from_pyfile
with open(filename, mode="rb") as config_file:
FileNotFoundError: [Errno 2] Unable to load configuration file (No such file or directory): '/Users/me/src/famous_birthday/CelebInfo-API/flaskapp.cfg'

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.