calpoly-csai / api

Official API for the NIMBUS Voice Assistant accessible via HTTP REST protocol.
https://nimbus.api.calpolycsai.com/
GNU General Public License v3.0
9 stars 4 forks source link

Created GET route for unvalidated QA pairs #178

Closed kgoo124 closed 4 years ago

kgoo124 commented 4 years ago

What's New?

Able to get unvalidated QA pairs from the db which will be used in Nimbus Validator Created a route and SQL Alchemy function to parse and format the data returned by the query

Here is the current response of the API call:

GET /data/get_phrase/1 Screen Shot 2020-07-02 at 4 24 43 PM GET /data/get_phrase/4 Screen Shot 2020-07-02 at 4 24 56 PM

Fixes #177

Type of change (pick-one)

How Has This Been Tested?

Checklist (check-all-before-merge)

formatting help: - [x] means "checked' and - [ ] means "unchecked"

kgoo124 commented 4 years ago

To access this list of queries in the Nimbus Validator, we have to call response.data.data since the response returns an object looking like this

{
   data: {
      data: [] // list of phrases
   }
}

Is there any way to just return the list of phrases and avoid the data.data call?

kgoo124 commented 4 years ago

Also, once merged can we get the actual server address to use in Nimbus Validator?

sonarcloud[bot] commented 4 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication