Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add total count (number of objects) that the api holds of the requested type to meta, add resource types, separate id from attributes #41

Open
ccjoel opened this issue Nov 12, 2016 · 1 comment
Assignees

Comments

@ccjoel
Copy link
Contributor

ccjoel commented Nov 12, 2016

Add count to metadata returned on json.
maybe add id, type to data obj, then add attributes which will hold most of the attributes we put under the objects in data today.

Also, consider adding a "type" field for each resource type returned, and separate id from rest of attributes.

Example:

GET /inspections

{
   meta: {
       parameters: { ... },
       count: 49643             // total inspection resources available
   } ,
   data: [
      {
         type: inspection,
         id: 4535656,
         attributes: {
             business_name: "Mc Happiness",
             license_numer: ...,
             inspection_class: ...,
             ...
         }
      }
   ]
}
@ccjoel ccjoel assigned ccjoel and unassigned leordev Feb 20, 2017
@ccjoel ccjoel changed the title For new 18F API, Add count of number of objects retrieved from server to meta Add total count /number of objects that the api holds of that type to meta Feb 21, 2017
@ccjoel ccjoel changed the title Add total count /number of objects that the api holds of that type to meta Add total count (number of objects) that the api holds of the requested type to meta Feb 21, 2017
@ccjoel ccjoel removed their assignment Feb 21, 2017
@ccjoel ccjoel changed the title Add total count (number of objects) that the api holds of the requested type to meta Add total count (number of objects) that the api holds of the requested type to meta, add resource types, separate id from attributes Mar 5, 2017
@ccjoel
Copy link
Contributor Author

ccjoel commented Mar 5, 2017

@marcoslhc what do you think of this?

@marcoslhc marcoslhc self-assigned this Mar 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants