Skip to content

Feature: Add the option for federated call to have specific params values#27

Merged
syphax-bouazzouni merged 1 commit intodevelopmentfrom
feature/add-option-to-have-federate-params-specific
Apr 2, 2025
Merged

Feature: Add the option for federated call to have specific params values#27
syphax-bouazzouni merged 1 commit intodevelopmentfrom
feature/add-option-to-have-federate-params-specific

Conversation

@syphax-bouazzouni
Copy link
Copy Markdown

This PR add the possibility in a federated call, the have the option to have specific request parameters for each federated portal, the is useful for endpoints like the /annotator that require to have the parameter ontologies containing only ontologies from that portal, otherwise it returns an error message, even if some of the acronyms do exist in that portal.
image

Usage

params = {
agroportal: {text: 'text1', ontologies: 'INRAETHES'},
eartportal: {text: 'text1', ontologies:  'ACTRIS'}
}
 LinkedData::Client::Models::Class.federated_get(params) {|api| "#{api}/annotator"}

this will call

https://data.agroportal.lirmm.fr/annotator?text=text1&ontologies=INRAETHES

and

https://data.agroportal.lirmm.fr/annotator?text=text1&ontologies=ACTRIS

@syphax-bouazzouni syphax-bouazzouni merged commit 2ade126 into development Apr 2, 2025
4 checks passed
syphax-bouazzouni added a commit that referenced this pull request May 11, 2025
* add the option for federated call to have specific params values (#27)

* create a logger helper for better debugging

* don't save error status for internal calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant