Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESTful API #439

Open
wants to merge 3 commits into
base: jasper-dev
Choose a base branch
from
Open

RESTful API #439

wants to merge 3 commits into from

Conversation

Theb-1
Copy link

@Theb-1 Theb-1 commented Feb 1, 2016

Adds a basic RESTful http api to Jasper using the Flask library (you may need to install using 'sudo pip2 install Flask').

Config options:

restapi:
   Host: 0.0.0.0
   Port: 5000
   Password: 'password'
  • Host defaults to 127.0.0.1, which allows local connections only. Set to 0.0.0.0 to allow outside connections

Access through:

http://japser-ip:5000/jasper/[command]

ex: curl http://jasper-ip:5000/jasper/say -u :password -H 'Content-Type: application/json' -d '{"text":"Hello, this is Jasper"}'

Commands:

   say(text)
   transcribe()
   activate()
   handleinput(text)
   waitforkeyword(keyword) 
   playfile(filename)

@k0ssi
Copy link

k0ssi commented Feb 1, 2016

Great ! Seems like a good base for an android app.
I will create an small app in the next few days

@hemalchevli
Copy link

@Theb-1 its working for me, there is a typo in above example curl link "Japser" should be "Jasper"

@Theb-1
Copy link
Author

Theb-1 commented Feb 4, 2017

@hemalchevli Thanks, fixed the typo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants