A Feuersoftware public API implementation
Project description
feuersoftware
feuersoftware is a library that allow you to interact with the Feuersoftware Connect Public API.
Example
Note: Every resource returns the python requests response object.
Setup the API
from feuersoftware import PublicAPI
TOKEN = '2xgRoQfoMGb4IveCDJIZqOO1l8hZZ5jT5mAw7SSk1otrFSq50IA2HIYB3luEpv7Vw8BWwG'\
'Y2zV96VUkOF3FCZs2OP03qaTWF3CDrUHOKndvLIFTTgx0FCMBTFBRF1DfG4g3rs8BSMHB4'\
'6qph1AlxOZ6parmJlp90V3GQB4EoI6DFdKE4SZeBuu46mXoaDlSmpTTS3FCpeG7oEUJVgy'\
'pLZkZSFPRng5HdKhp6HG2XmNIMAtKTG3DAUWuKRi3cZ4JstLj05y4r7jt81g4DYXz9gVYc'\
'UWk2pOkIZ9RPmu0s4LlaXHEK3TJlxLIUt5eHIzPUVKXyhdJDckviPsTYNfRxkpcNGd0vAb'\
'zfzwMadgb4xaOi1v6ZpsRfXyOPgpudcnO6rwwi9TlAWNZ2075CO7HVFEP31yGhXmYsdFwj'\
'ne3UIraWovMWHqeyv2yQLigKLePDAgXYUFqQpZ9P5ScznSMUg0ZnxS0Miy0qKe9zDYtqTk'\
'qQVwrUGfGVFp4Ti83NJLCCGUOCmF0ovOB28mYyQIqGAi2MDaNIuAvz6HT1tGAo5nYdzOeu'
api = PublicAPI(TOKEN)
Receive data about running operations
api.get_operation()
Start new operation
api.post_operation(
start="2019-06-06T08:00:00",
end="2019-06-06T18:00:00",
keyword="Brand 2",
status="new",
alarmenabled=True,
address="Musterweg 4, 12345 Entenhausen",
position={"latitude":"47.592127",·"longitude":"8.296870"},
facts="Küchenbrand",
ric="10B",
number=54321,
properties=[{"key":"Fettbrand":"value":"Nein"},{"key":"Noch Personen im Gebäude","value":"Ja"}],
updateStrategy="none"
)
Set user status for a running operation
api.post_user_status(
operationid=1,
name="Hans Maier",
status="coming"
)
Set vehicle status
api.post_vehicle_status(
radioid=12345678,
status=2,
position={"latitude":"47.592127",·"longitude":"8.296870"}
)
Get alarmgroup
api.get_alarm_group()
Put a user into an alarmgroup
api.put_alarm_group(
id=0,
name="Alarmgruppe 1",
users=[
{"id":1, "firstname": "Hans", "lastname": "Maier", "email": "hans.maier@ffw.de"},
{"id":2, "firstname": "Peter", "lastname": "Baumann", "email": "peter.baumann@ffw.de"}
])
Get geocoordinates for an address
api.get_geocoding("Musterstrasse 1, 12345 Musterstadt")
Check password
api.post_passwordcheck("MySecurePassword123!")
Get news
api.get_news()
Post news
api.post_news(
title="News title",
content="An alle, bitte bechten dass ...",
start="2019-06-06T18:00:00",
end="2019-06-06T18:00:00",
news_type="siteNews",
groups=[
"Gruppenführer",
"Gerätewarte"
],
mailinglists=[
"Mailingliste FFW"
]
)
Delete news
api.delete_news(1)
Update a news entry
api.put_news(
id=1,
title="News title",
content="An alle, bitte bechten dass ...",
start="2019-06-06T18:00:00",
end="2019-06-06T18:00:00",
groups=[
"Gruppenführer",
"Gerätewarte"
],
mailinglists=[
"Mailingliste FFW"
]
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
feuersoftware-0.1.3.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file feuersoftware-0.1.3.tar.gz
.
File metadata
- Download URL: feuersoftware-0.1.3.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a219f2a2889525a758817eedcce85f6f954a82667601eb92b30d94649965d71 |
|
MD5 | 5c12e998e765dd19dfe02e85d603a0bb |
|
BLAKE2b-256 | 6e4b7531a478fb160c438fcf1d15d765422089b5f01c69c87b5451fec195b947 |
File details
Details for the file feuersoftware-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: feuersoftware-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edf664b802f9eb7f81c88c70a8bcd8eb668b8ae46ca2f13639c66dad644b3747 |
|
MD5 | 44fedd0208ba4e1ddacef5b226a13dd6 |
|
BLAKE2b-256 | f82dc5fb1c9ed6f59b4ca411e6934df5f2810bcaa3d234d3bcd7fa37eb4f7116 |