geoserver.nottinghamcity.gov.uk/parking/defstatus.json

Challenge:
Show data from https://geoserver.nottinghamcity.gov.uk/parking/defstatus.json
Solution: PRO Plugin
Create a new JCI-Template with the above URL and this twig-code:
{% for c in carParks.carPark %}
{{c.definition.parkingRecord.parkingRecord.parkingNumberOfSpaces}} parkingNumberOfSpaces at 
{{ attribute(c.definition.parkingRecord.parkingRecord.parkingDescription.values.value, '#text') }} (id: {{ attribute(c, '@id') }})


parkingSiteStatus: {{c.status.parkingRecord.parkingRecordStatus.parkingSiteStatus }}
parkingSiteOpeningStatus: {{c.status.parkingRecord.parkingRecordStatus.parkingSiteOpeningStatus}}
measurementOrCalculationTime: {{c.status.parkingRecord.parkingRecordStatus.parkingOccupancy.vehicleCountAndRate.vehicleRate.measurementOrCalculationTime | date("d.m.Y, H:i") }}
fillRate: {{c.status.parkingRecord.parkingRecordStatus.parkingOccupancy.vehicleCountAndRate.vehicleRate.fillRate.vehicleFlowRate}}
exitRate: {{c.status.parkingRecord.parkingRecordStatus.parkingOccupancy.vehicleCountAndRate.vehicleRate.exitRate.vehicleFlowRate}}
{% endfor %}
Then use the Shortcode
[jsoncontentimporterpro id=NO_OF_JCI_TEMPLATE]

In Action (with locally stored, not changing JSON):
 
657 parkingNumberOfSpaces at Park and Ride (OMU-GPRS) (id: 12233069)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:46
fillRate: 0
exitRate: 0
600 parkingNumberOfSpaces at Wilkinson Street Park and Ride (id: 12233071)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:46
fillRate: 0
exitRate: 0
119 parkingNumberOfSpaces at Moor Bridge Car Park (id: 12233072)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:46
fillRate: 0
exitRate: 0
439 parkingNumberOfSpaces at Park and Ride (UTC) (id: 12233073)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:46
fillRate: 0
exitRate: 0
497 parkingNumberOfSpaces at Nottingham Train Station (id: 12233074)
parkingSiteStatus: unknown
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 21.12.2017, 02:58
fillRate: 0
exitRate: 0
629 parkingNumberOfSpaces at Wollaton Street (id: 12233076)
parkingSiteStatus: unknown
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 29.09.2017, 10:05
fillRate: 0
exitRate: 0
439 parkingNumberOfSpaces at Talbot Street (S & B Interface) (id: 12233083)
parkingSiteStatus: unknown
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 29.09.2017, 10:05
fillRate: 0
exitRate: 0
1363 parkingNumberOfSpaces at Victoria Centre South Car Park. (id: 12233084)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:46
fillRate: 0
exitRate: 0
1011 parkingNumberOfSpaces at Victoria Centre North Car Park (id: 12233085)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:46
fillRate: 0
exitRate: 0
455 parkingNumberOfSpaces at Trinity Square Car Park (id: 12233086)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0
297 parkingNumberOfSpaces at Lace Market - new UTMC CP replacing Fletcher Gate (id: 12233087)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:41
fillRate: 0
exitRate: 0
972 parkingNumberOfSpaces at Forest Park and Ride (id: 12345638)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 3
953 parkingNumberOfSpaces at Queens Drive Park and Ride (id: 12345672)
parkingSiteStatus: other
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0
427 parkingNumberOfSpaces at Mount Street NCP (id: 12420463)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0
475 parkingNumberOfSpaces at St James' NCP (id: 12420507)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 1
289 parkingNumberOfSpaces at Stoney Street NCP (id: 12420543)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0
512 parkingNumberOfSpaces at Newark St. Marks Place NCP (id: 12420548)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0
250 parkingNumberOfSpaces at Huntingdon Street NCP (id: 12420581)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0
77 parkingNumberOfSpaces at Mount St Lower NCP (Hide) (id: 12420587)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0
700 parkingNumberOfSpaces at Motorpoint Arena (id: 12972363)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0
412 parkingNumberOfSpaces at Arndale Broadmarsh NCP (id: 13876508)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0
218 parkingNumberOfSpaces at undefined (id: 13951940)
parkingSiteStatus: spacesAvailable
parkingSiteOpeningStatus: open
measurementOrCalculationTime: 07.08.2020, 21:45
fillRate: 0
exitRate: 0

API: daten.buergernetz.bz.it with free and PRO Plugin

Challenge: Display data from the API http://daten.buergernetz.bz.it/services/weather/bulletin?format=json&lang=de
Free JCI-Plugin:
[jsoncontentimporter url=http://daten.buergernetz.bz.it/services/weather/bulletin?format=json&lang=de] <br>
{date}<br>
{subloop:today:-1}<br>
{today.title}<br>
{subloop-array:today.stationData:-1}<br>
{subloop:today.stationData.symbol:-1} <br>
{today.stationData.symbol.description}: {today.stationData.min}-{today.stationData.max}<br>
{/subloop:today.stationData.symbol} <br>
{/subloop-array:today.stationData} <br>
{/subloop:today} <br>
[/jsoncontentimporter]

PRO JCI-Plugin:
twig-code:
{{today.date | date('d.m.Y, H:i:')}}: {{today.conditions}},
{{today.temperatures}}
{% for s in today.stationData %} Station {{loop.index}}, code: {{s.symbol.code}}: {{s.min}}-{{s.max}}
{% endfor %}
Pick the 3rd station in the list: code: {{today.stationData.3.symbol.code}} -
{{today.stationData.3.min}}-{{today.stationData.3.max}}

PRO JCI Plugin in action:
31.07.2020, 00:00:: Das Wetter in Südtirol wird weiterhin von subtropischen Luftmassen bestimmt.
Die Höchstwerte steigen auf 29° bis 35°.
Station 1, code: b: 15-31
Station 2, code: c: 18-34
Station 3, code: b: 19-35
Station 4, code: c: 15-30
Station 5, code: c: 17-33
Station 6, code: b: 15-32

Pick the 3rd station in the list: code: c: 15-30

PRO: Facetted Search in Action

Price-Sort:

    

Price:

Location:

Arguineguin
Caleta De Fuste
Corralejo
Costa Adeje
Costa Calma
Costa De Antigua
Costa Teguise
Golf Del Sur
La Caleta
La Oliva
Los Cristianos
Los Gigantes
Maspalomas
Playa Blanca
Playa De Las Americas
Playa De Los Pocillos
Playa Del Cura
Playa Del Ingles
Playa Jandia Morro Jable
Playa Paraiso
Playa Taurito
Puerto De La Cruz
Puerto De Santiago
Puerto Del Carmen
Puerto Rico
San Miguel De Abona
select settings on the left side

API: api.coinpaprika.com with free and PRO JCI-Plugin

Challenge:
Show data from https://api.coinpaprika.com/v1/exchanges/paribu?quotes=TRY
Solution with the free JCI-Plugin:
[jsoncontentimporter url=https://api.coinpaprika.com/v1/exchanges/paribu?quotes=TRY]
{subloop:quotes:-1}
{subloop:quotes.TRY:-1}
reported_volume_24h = {quotes.TRY.reported_volume_24h}
{/subloop:quotes.TRY}
{/subloop:quotes}
[/jsoncontentimporter]

In Action:
reported_volume_24h = 68503846.3082
Solution with the PRO JCI-Plugin:
Create a template with URL https://api.coinpaprika.com/v1/exchanges/paribu?quotes=TRY and this twig-code:
{% set lire = quotes.TRY.reported_volume_24h|split('.') %}
reported_volume_24h = {{lire.0 | formatnumber(0, '', ',') }}.{{lire.1}}

Store this JCI-Template and use it in a shortcode in this way:
[jsoncontentimporterpro id=_NO_OF_TEMPLATE convertjsonnumbers2strings=yes]

In Action:
reported_volume_24h = 68,503,846.30823986

Numbers and Strings in free and PRO plugin

Numbers and Strings:
See this JSON:
{"num": 3.5050, "str": "3.4040" }

There is a little difference: “num” is without quotation marks, “str” is with. The JSON Content Importer Plugin and the PHP behind that handles the “num” as numeric data and removes the 0 at the end.
Free jsoncontentimporter:
[jsoncontentimporter url=http://api.json-content-importer.com/extra/json/number.json]num: {num}, str:  {str}[/jsoncontentimporter]

gives us this:
num: 3.505, str: 3.4040
To “save” the 0 you need the PRO plugin – unfortunately: There “convertjsonnumbers2strings=yes” converts the JSON to do this.
[jsoncontentimporterpro url=http://api.json-content-importer.com/extra/json/number.json convertjsonnumbers2strings=yes  parser=twig]
{{num}} {{str}}[/jsoncontentimporterpro]

gives us this:
num: 3.5050, str: 3.4040

PRO-Plugin: API Zippopotamus

The API http://zippopotam.us/ gives Citynames and Coorindates to a Zipcode. The JCI-PRO-Plugin can use that for a “Zipcode to City-Search”:


Examples: Houston, US, TX | Munich, DE, Germany
This done this way:

1 .JCI-Template:

[jsoncontentimporterpro id=ID_OF_TEMPLATE httpstatuscodemustbe200=no]

2. twig-template:

  • url:
    http://api.zippopotam.us/{% if urlparam.co %}{{urlparam.co}}{% else %}US{% endif %}/{% if urlparam.zip %}{{urlparam.zip}}{% else %}80636{% endif %}
  • urlparam4twig: zip#co
  • twig-code (“/zippopotamus/” is the URL to the WordPress-Page with the Shortcode):
    {% if urlparam.co %}{% set coun = urlparam.co %}{% else %}{% set coun = "US" %}{% endif %}
    

    {% if places %} Found:
      {% for p in places %}
    1. {{ attribute(p, 'place name') }} ({{ attribute(p, 'state abbreviation') }})
    2. {% endfor %}
    {% else %} no City to this Zipcode {{urlparam.zip}} found {% endif %}
    Examples: Houston, US, TX | Munich, DE, Germany

PRO JCI Plugin and the API of openweathermap.org

The API of openweathermap.org gives Feeds like https://samples.openweathermap.org/ and inside that JSON like https://samples.openweathermap.org/data/2.5/weather?q=London&appid=…

This can be used by the PRO JSON Content Importer Plugin for searching the weather:

For that xyou need a Shortcode and a JCI-Template.


1. The Shortcode:

[jsoncontentimporterpro id=ID_OF_TEMPLATE httpstatuscodemustbe200=no]

is all you need as Shortcode on a WordPress-Page, – Post or CPT.
“httpstatuscodemustbe200=no” is required, as the API answers with an http-Error when a place can’t be found.

2. The JCI-Template:

There fill these fields: URL:
http://api.openweathermap.org/data/2.5/weather?q={%if urlparam.cit %}{{urlparam.cit}}{% else %}München{% endif %}&lang=de&units=metric&APPID=YOUR_API_KEY
urlparam4twig:
cit
twig:
{% set sea = "" %}
{% if urlparam.cit == "" %}
{% set sea = "London" %}
{% else %}
{% set sea = urlparam.cit %}
{% endif %}


{% if cod!="200" %} Place not found {% else %}

{{name}}

{{weather.0.description}}
Windspeed: {{wind.speed}} m/s, Winddirection: {{wind.deg}}
Temperature: {{main.temp}} ℃, feeels like: {{main.feels_like}} ℃
Pressure: {{main.pressure}} hPa, Humidity: {{main.humidity}}% {% endif %}