Public | Automated Build

Last pushed: 3 months ago
Short Description
stuffs
Full Description

jace

Install vagrant and Virtualbox on your machine. Then:

$ cd jace/deploy
$ vagrant up

Add your machine to /etc/hosts and name it dev.attentive.us:

$ fab dev deploy

To get a copy of the production database try the following commands:

$ fab api backup_db dev restore_db

This script also does a git pull on the current branch to garantee we get the latest code.

Testing API request on the shell

To test an API request on the shell you can do the following:

$ curl -X POST --header "Authorization: Token e068a58feee007d0d9d337a907dcfd87171ae56e" http://dev.attentive.us/v2/user/

Create a new API User

The following steps are needed for the correct creation of an API User:

  • Create a new user in the backend !()[https://api.attentive.us/jace/core/user]
  • add platform specific settings for this user (platform should be unique)

    {"platform": "scytale"}

  • MAKE SURE the settings fields wasn't saved as a string (if it is a string the quotes will be escaped {\"platform\": \"scytale\"}

  • mark the user as superuser (still in the admin page)
  • go to !()[https://api.attentive.us/jace/authtoken/token/], find the new user and copy the token

After you have the user created and the token ready send an email to the user with roughly the following text:

Hi {user},

Thanks for trying out Attentive!

Your token is ready for testing. All the documentation can be found at http://docs.attentive.apiary.io/.

The documentation allows you to send requests to either a dummy server or our production server.

We also have a sandbox environment you can use if you want to do testing before going for production.

Production endpoint: https://api.attentive.us/v2/ 
Sandbox endpoint: http://sandbox.attentive.us/v2/ 

If you have any questions or problems do not hesitate to contact us at api@attentive.us

Best regards,

PyCharm configuration

On your run configuration for Jace set the following environment variables as well as a path mapping:

DJANGO_SETTINGS_MODULE=jace.settings
DB_HOSTNAME=localhost
REDIS_HOSTNAME=localhost
HAYSTACK_HOSTNAME=localhost
RABBIT_HOSTNAME=localhost
DJANGO_SETTINGS_MODULE=jace.settings

Docker Pull Command
Owner
attentive
Source Repository

Comments (0)