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

Parameter for excluding prefix #2

Open
barney-walker opened this issue Aug 4, 2019 · 1 comment
Open

Parameter for excluding prefix #2

barney-walker opened this issue Aug 4, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@barney-walker
Copy link

Is there a parameter I can send that will leave out the "coci => " prefix in the response fields? It makes it trickier to parse the results and I don't trust that my regular expressions won't be fragile to some case I haven't anticipated.

@essepuntato
Copy link
Member

Hi @barney-walker

First, thanks for writing me.

Actually, in the "index" API, the prefixes are crucial in order to understand where such a piece of information is actually coming from. For instance, it would be possible that a citation between two papers is actually included in two distinct indexes. In that case, you need to actually know from where they are coming from.

Currently, you can think of using a specific solution for at least ask the API to separate such prefixes, by means of the "json" parameter (it works only if JSON is the return format).

https://w3id.org/oc/index/api/v1/citations/10.1002/adfm.201505328?json=dict(%22%20=%3E%20%22,citing,source,value).dict(%22%20=%3E%20%22,cited,source,value)

As you can see, the result in the fields "citing" and "cited" will be structured so as to make everything easily accessible via JSON.

I'm planning to extend the tool behind the API so as to make also more custom parameters, that in principle would allow one removing something from all the fields, though. Thus, thanks for the input!

@essepuntato essepuntato added the enhancement New feature or request label Aug 9, 2019
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