wizbots / labtab

0 stars 0 forks source link

Bug found while uploading video #93

Open internetmosquito opened 6 years ago

internetmosquito commented 6 years ago

Situation is as follows

And then

https://www.screencast.com/t/sjAaENiI

kapoorutd commented 6 years ago

Hi @internetmosquito , The Category and Knowledge Nuggets criteria corresponding to Category and components criteria in wizbots api doc are not available like Theme option in Category and Brace Strength option in components are not available in wizbots api doc, similarly Planning option in components is not available in Knowledge Nuggets in android application. Please find below the url response which represents if we put criteria which are available in api doc the request goes successful otherwise we are getting 400 status code(Bad request). Successful case : Response{protocol=http/1.1, code=201, message=CREATED, url=http://test.wizbots.com/api/projects/?category=challenge&sku=34705&description=sdfsdf&title=sdfgsdfgd&notes=Fffff&components=Planning&creators=58ec37d00d12a96cec49dccc}

Unsuccessful cases : Base on Category Response{protocol=http/1.1, code=400, message=BAD REQUEST, url=http://test.wizbots.com/api/projects/?category=Theme&sku=34705&description=Fffffvvg&title=fhfhfjgjg&notes=Nfhfhfhfhf&components=Advanced%20Data%20Structures&creators=58ec37d00d12a96cec49dccc}

[size=140 text={"message": "Input payload validation failed", "errors": {"categ…]

Unsuccessful cases : Base on Components (knowledge Nuggets). Response{protocol=http/1.1, code=400, message=BAD REQUEST, url=http://test.wizbots.com/api/projects/?category=challenge&sku=34987&description=Jjjkjkkkk&title=huuuuuuu&notes=Hhjjnkmj&components=Brace%20Strength&creators=5a4d0a8b0d12a9270ac99acf&creators=56e750870d12a902e35c56b7}

[size=92 text={"message": "Input payload validation failed", "errors": {"compo…]

kapoorutd commented 6 years ago

Hi @internetmosquito,

Please find below API name, Request URL, request code and response body to get Knowledge Nuggets (Components) -

API name - getProjectMetaData();

Request Url : http://test.wizbots.com/api/programs/metadata

Response Code : 200

Response Body : [{"color1":"white","color2":"lightsteelblue","projects":["Tick Tock","Hypnotizer","Chariot","Obstacle Course","Build Strong","Castles and Catapults","The Wizbots Way","MadLib"],"name":"Lab Certified","nuggets":["Motor Control","NXT Button Control","Touch Sensor Control","Loop Command","Troubleshoot","Castor Wheel","Decrease Friction","Decorations","PVC Pipe","Zoob","String","Rubber Band","Brace Strength","Rigid Extended Beams","Plan On Paper"],"index":1,"wiz_chips":10},{"color1":"purple","color2":"lightsteelblue","projects":["Windscreen Wiper","Bumper Car","Hello World!","Sound and Music","Plastic Fabtastic","Tallest Robot","LED Wand","Dancing Puppets","Parallerl Programming","Diff Drive Control","Wizball"],"name":"Explorer","nuggets":["NXT Screen Display","Sound Files","Speaker Control","Wait Command","Parallel Programming","If-Else Statement","Decrease Motor Percentage","Clear Screen Display","Recording Sound","Balance","Measuring","LED Wand","Differential Drive Control","Remote Control"],"index":2,"wiz_chips":10},{"color1":"#324596","color2":"lightsteelblue","projects":["Troubleshooting","Wheel Free Racing","Distance Sensor","Table Top Survival","Sound Sensor","Barking Dog","Light Sensor","Sun Flower","Color Sensor","Red Light Green Light","Random Numbers","Floor Sweeper"],"name":"Apprentice","nuggets":["Reverse Engineering","NXT Info","Clean Memory","Writing Log File","Import Log File","Print Command","Calibration","Distance Sensor Control","Sound Sensor Control","Light Sensor Control","Color Sensor Control","Random Programming"],"index":3,"wiz_chips":15},{"color1":"#C84239","color2":"lightsteelblue","projects":["Line Following","Line Racing","Using The Force","Drag Racing","Hoist","Elevator","Screw Gear","Slow Poke"],"name":"Maker","nuggets":["Line Following","Velocity","Plot Graph","Rotational Velocity","Centrifuge","Torque","Weights","Levers","Drive Trains","Gears","Gear For Speed","Gear For Power","Hoist","Pulley","Screw Gear","Switch"],"index":4,"wiz_chips":15},{"color1":"#1B7BA4","color2":"lightsteelblue","projects":["Counting","Boolean Logic","Rotation Sensor","Etch-A-Sketch","Compass Sensor","North Pole Express","Slider Crank","Magnetic Sensor","Shell Game","Ackerman","Steering"],"name":"Imagineer","nuggets":["Counting","Integers","Variables","Arithmetic Relations","Doubles","Delta","Boolean Logic","Truth Table","AND Operator (\u0026\u0026)","OR Operator ( II )","XOR Operator ( ^ )","NOT Operator","Compass Sensor Control","Setting A Start Point","Slider Crank","Magnetic Sensor Control","Ackerman Steering","Rotation Sensor Control","Mechanical Limit","Gripper"],"index":5,"wiz_chips":15},{"color1":"green","color2":"lightsteelblue","projects":["Algorithms","Gyroscope","Data Structures","Accelerometer","Camera"],"name":"Wizard","nuggets":["Flow Control - 3","Boolean Operators","Accelerometer Sensor Control","Camera Sensor Control","File Input and Output","Math Functions","String manipulation"],"index":6,"wiz_chips":15},{"color1":"orange","color2":"lightsteelblue","projects":["Objects","Networking","Behaviors","PID Control","Segway"],"name":"Master","nuggets":["Advanced Data Structures","Basic Object Oriented Progamming","Behavior-based Control","PID Control"],"index":7,"wiz_chips":15}]

and Category option from String-array which is mentioned in string.xml file in res/value folder -

"

Select Category
    <item>challenge</item>
    <item>contraption</item>
    <item>game</item>
    <item>Theme</item>
    <item>Mad Lib</item>
    <item>Players Choice</item>
    <item>Mentors Choice</item>
    <item>Skill Drill</item>
</string-array>"