Comments (2)
Servus, habs selber gefunden.
Ich verwende jq in einem Skript.
Das letzte Spiel einer Manschaft:
apiurl="https://api.openligadb.de/getmatchesbyteamid/40/1/0"
apiresponse=$(curl -f $apiurl)
# Mit diesem jq sort_by Befehl wird der JSON Output nach matchDateTime absteigend (reverse) sortiert.
# Dadurch steht das letzte Spiel im Array [0]. Wenn man nich sortiert, dann ist nach MatchID aufsteigend sortiert
# Dann kann es vorkommen, dass bei meheren Spielen pro Woche nicht das letzte ermittelt wird
apiresponse=$(jq 'sort_by(.matchDateTime) | reverse' <<< $apiresponse )
Das nächste Spiel einer Mannschaft:
apiurl="https://api.openligadb.de/getmatchesbyteamid/40/0/1"
apiresponse=$(curl -f $apiurl)
# Mit diesem jq sort_by Befehl wird der JSON Output nach matchDateTime aufsteigend sortiert.
# Dadurch steht das nächste anstehende Spiel im Array [0]. Wenn man nich sortiert, dann ist nach MatchID aufsteigend sortiert
# Dann kann es vorkommen, dass bei meheren Spielen pro Woche nicht das nächste ermittelt wird, sondern das übernächste
apiresponse=$(jq 'sort_by(.matchDateTime)' <<< $apiresponse )
from openligadb-samples.
closed
from openligadb-samples.
Related Issues (20)
- 2. Fußball-Bundesliga 2021/2022 - Liga-Shortcut nicht korrekt?
- Probleme mit Borussia Dortmund Daten HOT 2
- SSL-Zertifikat abgelaufen
- Logo Union Berlin HOT 1
- Spiele für einen Ort abfragen (unabhängig von der Liga) HOT 1
- Teamvergleich enthält Spiele aus doppelte Ligen
- Logo Türkgücü München
- Tabellen Erweiterung
- Tabellen fehlen bzw. alles auf 0
- Import historischer Ligen
- Spielplan eines Teams HOT 2
- API response code is 202 - should be 200
- Internes Caching fehlerhaft?
- Bundesliga Logos von imgur existieren nicht
- Feature request: Webhooks HOT 12
- Failed to read OpenligaDB Bl1 programmatically HOT 10
- Soap service changed? HOT 3
- Teamvergleich-Problem (Männer/Frauen) HOT 5
- Tabellen von Turnieren
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openligadb-samples.