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

Message payload should return object on simple messages #51

Open
javihern98 opened this issue Nov 29, 2023 · 3 comments
Open

Message payload should return object on simple messages #51

javihern98 opened this issue Nov 29, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@javihern98
Copy link
Collaborator

Change message payload to retrieve the sole object if only one of one kind is found:

  • If a DataSet is present and it is only one, return the Dataset object
  • If any ItemScheme or Definition is present, return the sole object
  • If more than one is present, but of the same kind, return a list
  • If more than one is present from different kinds, return same type as content
@javihern98 javihern98 added the enhancement New feature or request label Dec 1, 2023
@javihern98 javihern98 added this to the Version 2.7 milestone Feb 10, 2024
@guillegrc
Copy link
Collaborator

Instead of modifying the read_sdmx function, I have added the methods get_organisationschemes, get_codlists, get_concepts, get_dataflows and get_datastructures to the class message. I have modified the payload to return the sole object if it is only one Dataset too , I have modified a bit the returns in read_sdmx and added the read_xml to return the type of data. It is already committed all of it.

@guillegrc
Copy link
Collaborator

Add function get with an specific key for DataStructures, Dataflows, OrganisationSchemes, Codelists and Concepts.

@javihern98
Copy link
Collaborator Author

Add function with get_dataset with key, if there is only one, check dataset.unique_id = key, if it is not equal raise ValueError exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants