machinabio / limbforge-service

Single-purpose microservice to generate STLs from parametric CAD designs.
Apache License 2.0
3 stars 1 forks source link

UI Components endpoint #15

Open kaitlynhova opened 7 years ago

kaitlynhova commented 7 years ago

follow up to https://github.com/machinabio/limbforge-service/issues/11

  1. Create the Components endpoint in shift
  2. Implement the changes in Limbforge's front end app.
luzlab commented 7 years ago

GET /ui/components?amputationLevel=<AL_SLUG> Returns:

{
  devices: [
    {
      slug: 'xrp-arm'
      name: 'XRP arm',
      icon:  'https://www.AWSurlhere',
      creator: 'Limbforge',
      componentType: 'passive',
      weight: '250 g -350 g',
      description: 'The XRP Arm is a lightweight, highly cosmetic passive device with several terminal device options.',
      tags: [ 'social occasions, supporting objects' ],
      printTime: '14 hrs - 20 hrs'
    }
  ], ...
}
kaitlynhova commented 7 years ago

Here is the response I'd like:

for Transradial devices request:

{
  devices: [
    {
      name: 'XRA arm',
      icon:  'http://s3.amazonaws.com/limbforgeimages/components/icons/000/000/003/original/ecf.jpg?1485496825',
      creator: 'Limbforge',
      component_type: 'active, VO, VC',
      weight: '280-380g',
      description: 'The XRA Arm is a lightweight, cosmetic transradial device that can be configured to be either VO or VC. uses:  passive cosmetic',
      uses: 'picking up small objects, supporting grasps',
      print_time: '16-22hrs'
    }
    {
      slug: 'xrp-arm'
      name: 'XRP arm',
      icon:  'http://s3.amazonaws.com/limbforgeimages/components/icons/000/000/003/original/ecf.jpg?1485496825',
      creator: 'Limbforge',
      componentType: 'passive',
      weight: '250 g -350 g',
      description: 'The XRP Arm is a lightweight, highly cosmetic passive device with several terminal device options.',
      tags: [ 'social occasions, supporting objects' ],
      printTime: '14 hrs - 20 hrs'
    }
  ]
}
luzlab commented 7 years ago

I think it's done. I'm deploying to production.

kaitlynhova commented 7 years ago

@luzlab I have componentType set on it but for some reason it's not passing through to my front end. Do you have any ideas?