Difference between revisions of "Workdocumentation 2021-03-22/lukas guenther task"

From Openresearch
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
  
 
{{ #ask:[[IsA::Event]] {{#ifeq: {{#urlget:ord|0}} | 0 | | [[Ordinal::{{#urlget:urlparam|1}}]] }}
 
{{ #ask:[[IsA::Event]] {{#ifeq: {{#urlget:ord|0}} | 0 | | [[Ordinal::{{#urlget:urlparam|1}}]] }}
Line 7: Line 6:
 
  | ?Start_date = start_date
 
  | ?Start_date = start_date
 
  | ?Ordinal
 
  | ?Ordinal
  |format=datatables
+
  |format={{#urlget:format|datatables}}
  |limit=2000
+
  |limit={{#urlget:limit|2000}}
 +
 
 
}}
 
}}
 +
 +
=== Parameters ===
 +
 +
You're able to filter the Results with the following parameters
 +
 +
{| class="wikitable"
 +
|-
 +
! Parameter !! Example !! Description
 +
|-
 +
| ord || 1 || Selects only Events with the specified Ordinal
 +
|-
 +
| format || json || Changes the return format of the Result-Set
 +
|-
 +
| limit || 50 || Lets you limit the size of the Result-Set
 +
|}
 +
 +
===== Example =====
 +
 +
<code>https://www.openresearch.org/wiki/Workdocumentation_2021-03-22/lukas_guenther_task'''?limit=50&ord=1&format=json'''</code>
 +
 +
 +
== Problem: Limit ==
 +
 +
I was not able to dynamically check the maximum configuration parameter for the maximum limit. So I manually typed in the Limit of 10000 and retrieved 2000 results. So I'm only guessing the 2000 maximum limit defined in the configuration parameters of OpenResearch right now.
 +
 +
== Ideas for extending the urlget-Extension ==
 +
 +
* When checking <code>$params</code>, it just makes sure there are two brackets. There could be Edge-Cases like <code>url.de/index?params]0[=value</code>. So strpos of the right bracket should be higher than the left bracket.

Latest revision as of 10:06, 8 April 2021

Loading...

Parameters

You're able to filter the Results with the following parameters

Parameter Example Description
ord 1 Selects only Events with the specified Ordinal
format json Changes the return format of the Result-Set
limit 50 Lets you limit the size of the Result-Set
Example

https://www.openresearch.org/wiki/Workdocumentation_2021-03-22/lukas_guenther_task?limit=50&ord=1&format=json


Problem: Limit

I was not able to dynamically check the maximum configuration parameter for the maximum limit. So I manually typed in the Limit of 10000 and retrieved 2000 results. So I'm only guessing the 2000 maximum limit defined in the configuration parameters of OpenResearch right now.

Ideas for extending the urlget-Extension

  • When checking $params, it just makes sure there are two brackets. There could be Edge-Cases like url.de/index?params]0[=value. So strpos of the right bracket should be higher than the left bracket.