Stream Announcement
Zwraca zapowiedź z nagłówkiem Content-Disposition: inline
GET /announcement/{announcement_id}/stream
URL Parameters
Nazwa | Rodzaj | Opcjonalne | Opis |
---|---|---|---|
announcement_id | <STRING> |
5ecf67c2f03d6453ad1ae38b | Identyfikator systemowy Announcement |
Response Code
Status | Opis |
---|---|
200 | Rekord został pobrany pomyślnie, zawiera dane zapowiedzi. |
404 | Nie znaleziono zasobu. |
Response Body
{
"data": <Announcement>
}
Nazwa | Rodzaj | Opcjonalne | Opis |
---|---|---|---|
data | <Announcement> |
NIE | Announcement |
Example
curl -X GET \
$CONPEEK_URL/announcement/5ecf67c2f03d6453ad1ae38b/stream \
-H 'Authorization: '$CONPEEK_KEY \
-H 'Content-Type: application/json'
import requests
import os
from urllib import parse
url = parse.urljoin(os.environ["CONPEEK_URL"], "/announcement/5ecf67c2f03d6453ad1ae38b/stream")
headers = {
'Content-Type': "application/json",
'Authorization': os.environ["CONPEEK_KEY"]
}
response = requests.request("GET", url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => getenv("CONPEEK_URL")."/announcement/5ecf67c2f03d6453ad1ae38b/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: ".getenv("CONPEEK_KEY"),
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}