This is a test project API for collecting Twitter data.
Install dependencies
pip install -r requirements.txt
Execute Django's migration command:
python manage.py migrate
Note:
- Currently using SQLite3 database for test development purposes.
If you want to create your superuser account in admin:
python manage.py createsupueruser
Run local server
python manage.py runserver
Getting tweets by hashtag using curl:
curl -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://localhost:8000/hashtags/Python/?limit=1
Getting tweets by hashtag using Browseable API:
http://localhost:8000/hashtags/Python/?limit=1
Getting user tweets using curl:
curl -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://localhost:8000/users/twitter/?limit=1
Getting tweets by hashtag using Browseable API:
http://localhost:8000/users/twitter/?limit=1
Note:
- Appending trailing slash is necessary since it is enabled in the configuration.
For more information on using the endpoints and create sample test requests:
http://localhost:8000/docs/