Open MrRedBeard opened 4 years ago
Hey @MrRedBeard
Awesome. I'll update the documentation as soon as I get a chance. Thank you for that.
The rest looks right, though just be forewarned that all the attributes other than id
, gtin14
, brand_name
and name
are arbitrary, i.e. you can add any key/value pair you want.
I'm still thinking through the notion of Property Sets (#22). Adding type info to the valid data makes sense, in which case declaring double/int will work. Right now properties are just stored as strings, inside a JSON field.
Is this accurate? I kept looping through records to try understand the API behavior and data structure/types.
This information might be helpful for those consuming the API.
Header Pagination Info
Header -
links
- First Headerhttps://www.brocade.io/api/items?page=20&query=peanut+butter; rel="last", https://www.brocade.io/api/items?page=2&query=peanut+butter; rel="next"
Header -
links
- Following Headers include the previous andhttps://www.brocade.io/api/items?page=1&query=peanut+butter; rel="first", https://www.brocade.io/api/items?page=1&query=peanut+butter; rel="prev",
Header -
per-page
&total
per-page
- Results per page = 100total
- Total number records = 1912total
/per-page
= Total Pages 19.12 rounded up = 20. Total is also found in Header -links
last
Data Types
Example JS Class of Data Structure
Example c# Class of Data Structure