42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
Nenninger N-Tools.de
|
|
Version 1.5
|
|
|
|
hermine@THW PHPConnector
|
|
inspiriert von https://gitlab.com/aeberhardt/stashcat-api-client
|
|
|
|
curl und php >= 7.4
|
|
|
|
Funktionen:
|
|
|
|
get_last_error();
|
|
|
|
|
|
login(soll der Login gespeichert werden);
|
|
|
|
get_companies_list(); -> List De Firmen (wird beim Login erstellt)
|
|
|
|
send_message_to_conversation(id,Nachricht,optional URLs als array, optional Standort als Array);
|
|
send_message_to_channel(id,Nachricht,optional URLs als array, optional Standort als Array);
|
|
|
|
send_message_with_file_to_channel(id,Nachricht,Dateiinhalt (max 5MB),Dateiname in Hermine,Type Bsp:'image/jpeg',Breite Standard 0,Höhe Standard 0);
|
|
|
|
Beispiele:
|
|
|
|
$hermine = new hermineConnect('mailadresse','Accountpassword','Verschlüsselungskennwort');
|
|
if($hermine->login(true) !== false){
|
|
$array = $hermine->get_companies_list();
|
|
print_r($array);
|
|
$array = $hermine->get_conversations_list();
|
|
print_r($array);
|
|
$array = $hermine->get_channels_list();
|
|
print_r($array);
|
|
|
|
$file = file_get_contents('./ich.jpg');
|
|
$hermine->send_message_with_file_to_channel(165562,'jpg per php',$file,'test.jpg','image/jpeg',1080,2068);
|
|
|
|
|
|
|
|
}else{
|
|
//login fehlgeschlagen
|
|
print_r($hermine->get_last_error);
|
|
} |