Get notification by current user
curl --request GET \
--url https://localhost:8080/api/common/notificationimport requests
url = "https://localhost:8080/api/common/notification"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://localhost:8080/api/common/notification', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "https://localhost:8080/api/common/notification",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://localhost:8080/api/common/notification"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://localhost:8080/api/common/notification")
.asString();require 'uri'
require 'net/http'
url = URI("https://localhost:8080/api/common/notification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"content": [
{
"id": 123,
"recipient": {
"id": 123,
"password": "<string>",
"email": "<string>",
"fullName": "<string>",
"phoneNumber": "<string>",
"street": "<string>",
"city": "<string>",
"province": "<string>",
"postalCode": "<string>",
"active": true
},
"order": {
"id": 123,
"farmer": {
"id": 123,
"email": "<string>",
"fullName": "<string>",
"phoneNumber": "<string>",
"street": "<string>",
"city": "<string>",
"province": "<string>",
"postalCode": "<string>",
"active": true
},
"receptionist": {
"id": 123,
"email": "<string>",
"fullName": "<string>",
"phoneNumber": "<string>",
"street": "<string>",
"city": "<string>",
"province": "<string>",
"postalCode": "<string>",
"active": true
},
"date": "2023-12-25",
"session": {
"id": 123,
"startTime": {
"hour": 123,
"minute": 123,
"second": 123,
"nano": 123
},
"endTime": {
"hour": 123,
"minute": 123,
"second": 123,
"nano": 123
}
},
"location": "<string>",
"latitude": 123,
"longitude": 123,
"cropType": {
"id": 123,
"name": "<string>"
},
"area": 123,
"cost": 123,
"completionDate": "2023-12-25",
"confirmed": true,
"creationDate": "2023-12-25"
},
"subject": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"page": {
"size": 123,
"number": 123,
"totalElements": 123,
"totalPages": 123
}
}Notification
Get notification by current user
GET
/
api
/
common
/
notification
Get notification by current user
curl --request GET \
--url https://localhost:8080/api/common/notificationimport requests
url = "https://localhost:8080/api/common/notification"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://localhost:8080/api/common/notification', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "https://localhost:8080/api/common/notification",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://localhost:8080/api/common/notification"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://localhost:8080/api/common/notification")
.asString();require 'uri'
require 'net/http'
url = URI("https://localhost:8080/api/common/notification")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"content": [
{
"id": 123,
"recipient": {
"id": 123,
"password": "<string>",
"email": "<string>",
"fullName": "<string>",
"phoneNumber": "<string>",
"street": "<string>",
"city": "<string>",
"province": "<string>",
"postalCode": "<string>",
"active": true
},
"order": {
"id": 123,
"farmer": {
"id": 123,
"email": "<string>",
"fullName": "<string>",
"phoneNumber": "<string>",
"street": "<string>",
"city": "<string>",
"province": "<string>",
"postalCode": "<string>",
"active": true
},
"receptionist": {
"id": 123,
"email": "<string>",
"fullName": "<string>",
"phoneNumber": "<string>",
"street": "<string>",
"city": "<string>",
"province": "<string>",
"postalCode": "<string>",
"active": true
},
"date": "2023-12-25",
"session": {
"id": 123,
"startTime": {
"hour": 123,
"minute": 123,
"second": 123,
"nano": 123
},
"endTime": {
"hour": 123,
"minute": 123,
"second": 123,
"nano": 123
}
},
"location": "<string>",
"latitude": 123,
"longitude": 123,
"cropType": {
"id": 123,
"name": "<string>"
},
"area": 123,
"cost": 123,
"completionDate": "2023-12-25",
"confirmed": true,
"creationDate": "2023-12-25"
},
"subject": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"page": {
"size": 123,
"number": 123,
"totalElements": 123,
"totalPages": 123
}
}⌘I