Open pmorrill opened 4 years ago
Sorry for the late replies. I've been very super busy with work and exams. I'll post a list of the fields I'm not using for each request. You can go ahead and change the field name. I had a concern before that the app might break for Hussain and Vadim but that's no longer a problem now that it only rebuilds when data version is changed. Still thanks for letting me know. It will save me some debugging!
The current api code sends you both 'speciesID' and 'speciesId' - so you can switch over to the preferred version (speciesId) and in a few days I will remove the deprecated field.
Here's the list of fields that I don't use vs the ones I do. I don't have commonNameFr in species? and description in speciesMaps? but after reviewing the fields I plan on incorporating those two. I only parsed in fields I thought it was very likely we would need or they belonged to a table with one row (Users and Versions), so it is possible we decide later we are missing some. We're also open to suggestions if there are any fields you think we are not including that are important to display to the user.
Not Imported: 'projects?': defaultChecklist, nameFr, description, descriptionFr 'projectRegions?': description, listKey 'species?': checklistOrder, abbrev, fileCount(is this new?), aviBaseId I'll integrate commonNameFr 'customLists?': N/A 'customListSpecies?': N/A 'speciesImages?': country, year, subject, description, provinceState, displayTypeEx (all empty strings?), displayType, month, location, day 'speciesMaps?': displayOrder I don't have "description" yet but I should save it 'speciesSounds?': country, year, subject, description, provinceState, displayTypeEx, displayType, month, location,day 'fileRegions?': N/A 'speciesRegions?': N/A 'authenticate?': N/A 'https://www.natureinstruct.org/api/info': N/A
Imported: 'projects?',["masterRegionId","id","name"] 'projectRegions?', ["id","parentRegionId","region","abbrev"] 'species?', ["id","commonName","scientificName","mapDescription","songDescription"] 'customLists?', ["id","name"] 'customListSpecies?', ["customListId","speciesId"] 'speciesImages?', ["id","speciesID","url","source","displayOrder"] 'speciesMaps?', ["id","speciesID","url","source"] 'speciesSounds?', ["id","speciesID","spectrogramUrl","url","source"] 'fileRegions?', ["regionId","fileId","displayOrder"] 'speciesRegions?', ["regionId","speciesId","nonBreederInRegion","rareInRegion"] 'authenticate?',["userid,"email","firstname","lastname","preferences.lang","preferences.naming","preferences.sorting"] 'https://www.natureinstruct.org/api/info',["serverTimeStamp","apiVersion","dataVersion"]
Also I've switched back to using speciedId, thanks!
Some comments:
I think it is a good idea to report to the user what checklist is being used for the project. Therefore you should probably store the projects.defaultChecklist field. Or, if we decide to use the 'preferred' checklist, that would override it.
You will need to store the species.checklistOrder field. This is the ordering used if the user's selection is to order by 'checklist order'. Most serious birders will need this ordering: only amateurs like me use alphabetic ordering.
The extra fields in the speciesImages and speciesSounds data are used in the web site to construct the tooltips and description under the image displayed. However, you can certainly decide how important this is for use in the app. For example, the date the image was taken is not too important, whereas with sounds it might be (breeding period vs non-breeding). The location of a recording or image might not be critical either. However, whether a sound is from an adult or not might be useful to display. Still, I would say keep it simple for now. I can always add fields back in later as you decide you want them.
On that note, have you bench-marked the 'initialization' time for the app using project 1? I find I can get the data pretty quickly using my test setup, but if I try to save it to the sqlite storage things slow down considerably. What times are you seeing?
Also, the displayOrder
field is important for recordings and maps, as well as images. We have tried to order all files from most relevant to least relevant, for a given species. If for example, you are only saving a sub-set of recordings for offline use, you would want to save those with the lowest displayOrder
values.
I propose dropping fields from several of the response packages, to reduce the data flow. Here is a preliminary list of fields I do not think that you need, arranged by query (please let me know of others you don't use):
project => description, nameFr, defaultChecklist
projectRegions => description, listKey
species => fileCount, avibaseId
The image / sound / map data also includes fields that you may not need, but I will let you tell me what you are ignoring from there.
One note: I also would like to rename the field 'speciesID' in the file response records, and convert it back to 'speciesId' as it was originally. That change was unintentional and the current name does not follow the naming convention used in other fields. @RobynVG , let me know if that is OK.