Giter Club home page Giter Club logo

cz3003ssadback_cngk's Introduction

cz3003ssadBack

Data from Front End

https://gist.github.com/joetancy/ef35fbe72512509e5708e91e0936f620

All API calls will be in the Django development server 127.0.0.1:8000/{API-HERE}

cid = Crisis ID

submitCrisis

  • Takes in JSON format, returns JSON received

approveCrisis/cid

  • Takes in crisis ID, change attribute 'approved' to True.
  • Returns approved crisis

closeCrisis/cid

  • Takes in crisis ID(int), change attribute 'closed' to True.
  • Returns closed crisis

getApprovedCrisis

  • Returns all crisis where attribute 'approved' = True in JSON format

getPublicApprovedCrisis

  • Returns all crisis where attribute 'approved' = True in JSON format only when in crisis mode

getUnapprovedCrisis

  • Returns all crisis where attribute 'approved' = False in JSON format

sendDispatch/cid/

  • Takes in crisis ID(int) and JSON file, creates new row in Dispatch and send out SMS to dispatch.contact with the corresponding crisis details.
  • Returns Dispatch data

toggleCrisisModeOn

  • Creates a new row in CrisisMode with attribute 'inCrisis' = True with current datetime.
  • Returns newly created CrisisMode

toggleCrisisModeOff

  • Creates a new row in CrisisMode with attribute 'inCrisis' = False with current datetime.
  • Returns newly created CrisisMode

getCrisisMode

  • Gets latest crisis mode.
  • Returns latest CrisisMode

sendToTwitter/cid

  • Sends a tweet to twitter with details of the corresponding crisis where crisis_id = cid
  • Returns corresponding crisis

sendToFacebook/cid

  • Post to Facebook with details of the corresponding crisis where crisis_id = cid
  • Returns corresponding crisis

cz3003ssadback_cngk's People

Contributors

joetancy avatar qwerasdzx2 avatar snowblue avatar timothylee93 avatar trellixvulnteam avatar

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.