-
Notifications
You must be signed in to change notification settings - Fork 13
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
Consolidate List of API Functions #32
Comments
👍 |
I have created a branch called addqueries to address this issue. |
Per a discussion with @horsburgh we have decided that the create functions should receive an object, or all required objects, to be added to the database. createVariables(), will receive a Variables object. but createActions() will take both an Actions and an ActionBy object, because you won't be creating and ActionBy without an Action. |
getRelatedModels() Pass a ModelID - get a list of model objects related to the model having ModelID Question that needs to be answered:
|
@valentinedwv and @sreeder - shouldn't the "GetRelatedX" functions return both parents and children (e.g., anything with a relationship to the object with ID or Code that was passed in)? We could move this to a separate issue to fix after merging and releasing the current dev branch that includes all of this work. |
After looking at the existing code, we have decided on a major consolidation of the functions in the API to avoid complexity and repetition. For a description of the planned signatures (inputs and outputs) for each of the functions, click here.
Consolidated List of ODM2 API Low-level Get Functions
Consolidated List of ODM2 API Low-level Create Functions
For Reference - Functions that are being removed
getVariableById - Covered by getVariables (passing in a VariableID)
getVariableByCode - covered by getVariables (passing in a VariableCode)
getResultById - covered by getResults (passing in a ResultID)
getMethodById - covered by getMethods (passing in a MethodID)
getMethodByCode - coverd by getMethods (passing in a MethodCode)
getProcessingLevelById - covered by getProcessingLevels (passing in a ProcessingLevelID)
getProcessingLevelByCode - covered by getProcessingLevels (passing in a ProcessingLevelCode)
getSamplingFeatureById - Covered by getSamplingFeatures (passing in a SamplingFeatureID)
getSamplingFeatureByCode - Covered by getSamplingFeatures (Passing in a SamplingFeatureCode)
getSamplingFeaturesByType - Covered by getSamplingFeatures (Passing in a SamplingFeatureType)
getSamplingFeatureByGeometry - Covered by getSamplingFeatures (passing in a GeometryType)
getGeometryTest - I don't know what this is and don't think we need it
getUnitById - Covered by getUnits (passing in a UnitsID)
getUnitByName - Covered by getUnits (passing in a UnitsName)
getOrganizationById - Covered by getOrganizations (passing in an OrganizationID)
getOrganizationByCode - Covered by getOrganizations (passing in an OrganizationCode)
getPersonById - Covered by getPeople (passing in a PersonID)
getPersonByName - Covered by getPeople (passing in a name)
getAffiliationByPersonAndOrg - why do we need this? Covered by getAffiliations?
getAffiliationsByPerson - Covered by getAffiliations (passing in a PersonID)
getResultByActionID - Covered by getResults (passing in an ActionID)
getResultByID - Covered by getResults
getResultAndGeomByID - Covered by getResults (passing in a ResultID)
getResultAndGeomByActionID - coverec by getResults (passing in an ActionID)
getResultValidDateTime - covered by getting the result and querying the metadata
getDatasetByCode - Covered by getDatasets (passing in a DatasetCode)
getAllDataQuality - what is this for?
getAllEquipment - covered by getEquipment
getCitations - why do we need this independently?
getTimeSeriesResults - covered by getResults
getTimeSeriesResultByResultId - Covered by getResults (passing in a ResultID)
getTimeSeriesResultbyCode - Results don't have a code, so not sure what this would do anyway
getTimeSeriesResultValues - covered by getResultValues
getTimeSeriesResultValuesByResultId - covered by getResultValues (passing in a ResultID)
getTimeSeriesResultValuesByCode - results don't have a code so this wouldnt work anyway
getTimeSeriesResultValuesByTime - covered by getResultValues (passing in a ResultID and a time period)
getAllSites - Covered by getSamplingFeatures (passing a type of "Site")
getSiteBySFId - covered by getSamplingFeatures (passing in a SamplingFeatureID)
getSiteBySFCode - covered by getSamplingFeatures (passing in a SamplingFeatureCode)
getSpatialReferenceByCode - don't think we need this
getAllDeploymentAction - covered by getActions (passing in an ActionType)
getDeploymentActionById - covered by getActions (passing in an ActionID)
getDeploymentActionByCode - Actions do not have code, so this one wouldn't work anyway
getAllModels - covered by getModels
getModelByCode - covered by getModels (passing in a ModelCode)
getAllSimulations - covered by getSimulations
getSimulationByName - covered by getSimulations (passing in a Simulation Name)
getSimulationByActionID - covered by getSimulations (passing in an ActionID)
getRelatedModelsByID - covered by getRelatedModels (Passing in a ModelID)
getRelatedModelsByCode - covered by getRelatedModels (passing in a ModelCode)
getResultsBySimulationID - covered by GetResults (passing in an ActionID)
createTimeSeriesResult - covered by createResult
createTimeSeriesResultValues - covered by createResultValues
createSite - covered by createSamplingFeature
createDeploymentAction - covered by createAction
The text was updated successfully, but these errors were encountered: