Git Product home page Git Product logo

realqa-web's Introduction

RealQA Web Interface

The RealQA web application is an implementation of the Android app RealQA.

Installation:

  1. Download python
  2. Download virtualenv
  3. Create a directory where you will store your virtual environment files. I called mine Virtualenvs
  4. cd Virtualenvs
  5. virtualenv env
  6. source ./env/bin/activate
  7. pip install django
  8. which django-admin.py
  9. pip install requests
  10. cd to a folder where you hold your code base
  11. git clone https://github.com/clir/realqa-web.git
  12. cd realqa-web/src/main/java/edu/emory/clir/realqa/web/realqawebapp
  13. python manage.py runserver --> this is for development, will point to localhost:8000/realqa

API documentation to RealQA server

------------- API calls used in “My questions” tab ----------------

Description: Get asked questions (by user) HTTP Method: GET Resource: /asked_questions/ Data: {} Result: Question list Detail: This list is paginated by 10 per page

Description: Get subscribed questions (by user) HTTP Method: GET Resource: /subscribed_questions/ Data: {} Result: Question list Detail: This list is paginated by 10 per page

Description: Get answered questions (by user) HTTP Method: GET Resource: /answered_questions/ Data: {} Result: Question list Detail: This list is paginated by 10 per page


------- API calls used in “Recommended questions” tab -----

Description: Get recommended question by freshness (for user) HTTP Method: GET Resource: /recommended_questions_by_freshness/ Data: {} Result: List of recommended questions Detail: This list is paginated by 10 per page

Description: Get recommended question by relevance (for user) HTTP Method: GET Resource: /recommended_questions_by_relevance/ Data: {} Result: List of recommended questions Detail: This list is paginated by 10 per page Description: Get recommended question by answer count (for user )HTTP Method: GET Resource: /recommended_questions_by_answer_count/ Data: {} Result: List of recommended questions Detail: This list is paginated by 10 per page

Description: Get recommended question by location (for user) HTTP Method: GET Resource: /recommended_questions_by_location/ Data: {} Result: List of recommended questions Detail: This list is paginated by 10 per page

Description: Get recommended question by popularity (for user) HTTP Method: GET Resource: Data: {} Result: List of recommended questions Detail: This list is paginated by 10 per page


------------- API calls used in “Ask question” tab ----------------

Description: Retrieve locations HTTP Method: GET Resource: /locations/ Data: {} Result: List of locations Detail:

Description: Recommended tags for specific question body HTTP Method: POST Resource: /recommended_tags/ Data: {question_body: “body of the question”} Result: List of recommended tags Detail: This list is not paginated

Description: Send question HTTP Method: POST Resource: /questions/ Data: {body: “body of the question”, tagnames: “”, time_spent_editing: “”, latitude: “”, longitude: “”, location_name: “<location_name>” Result: {} Detail: location_name is one of the names that have been retrieved during GET /locations/. If user has not chosen any of them, “asker’s location” is sent as the location_name


---------- API calls used Question List (any of them) -----------

Description: Retrieve question detail HTTP Method: GET Resource: /questions// Data: {} Result: Question detail Detail:

Description: Retrieve question answers HTTP Method: GET Resource: /questions//answers/ Data: {} Result: List of answers for question id with Detail:

Description: Retrieve questions by tag (after clicking on tag body) HTTP Method: GET Resource: /questions/?tag_name=/ Data: {} Result: List of recommended questions Detail: This list is paginated by 10 per page


----------------- API calls used Question Thread -----------------

Description: Vote on question HTTP Method: POST Resource: /nodes/<node_id>/vote?vote_type=<up|down> Data: {} Result: Contains value of current score Detail:

Description: Report action (question or answer) HTTP Method: POST Resource: /nodes/<node_id>/flag/ Data: {reason: “reason for flagging”} Result: {} Detail:

Description: Remove question/answer HTTP Method: DELETE Resource: /questions// Data: {} Result: {} Detail:

Description: Send answer HTTP Method: POST Resource: /questions//answers/ Data: {body: “body of the answer”, time_spent_editing: “number of seconds that user has spent while writing her answer”} Result: {} Detail:


------------------ API calls used to login/register ------------------

Description: Log in HTTP Method: POST Resource: /api-token-auth/ Data: {username: “username”, password: “password”} Result: token for the user Detail:

Description: Retrieve user’s data HTTP Method: GET Resource: /users/0/ Data: {} Result: detail of the user Detail:

Description: Register user HTTP Method: POST Resource: /users/ Data: {username: “username”, password: “password”, device_id: “device_id”} Result: result of the api call Detail:

Description: Retrieve popular tags HTTP Method: GET Resource: /tags/?min_used_count= Data: {} Result: List of popular tags Detail: is minimum tags count

Description: Update user tags HTTP Method: POST Resource: /update_profile/ Data: {tagnames: “”} Result: result of the api call Detail:

realqa-web's People

Contributors

spzheng avatar lyche9 avatar beefancohen avatar dannysegura92 avatar jdchoi77 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar Tomasz Jurczyk avatar  avatar  avatar  avatar

realqa-web's Issues

realqa web app: can't go past login page

Hello I followed the instructions. The app is running, but when I try to sign up I get 304 and connection gets reset by peer after some time. Would you know if I am missing a configuration step? Thank you

Updated the root package name.

@clir/realqa-web

I just updated the root package name from "edu.emory.clir" to "edu.emory.clir.realqa.web". Please create all your classes under this package. Thanks!

best,

Jinho

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.