Create an external calendar
curl --request POST \
--url https://b.anny.co/api/v1/external-calendars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"types": "<string>",
"attributes": {
"name": "<string>",
"source": "<string>",
"availability_type": "available",
"url": "<string>",
"is_invalid_url": true,
"event_count": 123,
"anonymize_entries": true
},
"relationships": {
"resource": {
"data": {
"type": "<string>",
"id": "<string>"
}
}
},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/external-calendars"
payload = { "data": {
"types": "<string>",
"attributes": {
"name": "<string>",
"source": "<string>",
"availability_type": "available",
"url": "<string>",
"is_invalid_url": True,
"event_count": 123,
"anonymize_entries": True
},
"relationships": { "resource": { "data": {
"type": "<string>",
"id": "<string>"
} } },
"meta": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
types: '<string>',
attributes: {
name: '<string>',
source: '<string>',
availability_type: 'available',
url: '<string>',
is_invalid_url: true,
event_count: 123,
anonymize_entries: true
},
relationships: {resource: {data: {type: '<string>', id: '<string>'}}},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/external-calendars', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b.anny.co/api/v1/external-calendars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'types' => '<string>',
'attributes' => [
'name' => '<string>',
'source' => '<string>',
'availability_type' => 'available',
'url' => '<string>',
'is_invalid_url' => true,
'event_count' => 123,
'anonymize_entries' => true
],
'relationships' => [
'resource' => [
'data' => [
'type' => '<string>',
'id' => '<string>'
]
]
],
'meta' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/external-calendars"
payload := strings.NewReader("{\n \"data\": {\n \"types\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"availability_type\": \"available\",\n \"url\": \"<string>\",\n \"is_invalid_url\": true,\n \"event_count\": 123,\n \"anonymize_entries\": true\n },\n \"relationships\": {\n \"resource\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n }\n },\n \"meta\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b.anny.co/api/v1/external-calendars")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"types\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"availability_type\": \"available\",\n \"url\": \"<string>\",\n \"is_invalid_url\": true,\n \"event_count\": 123,\n \"anonymize_entries\": true\n },\n \"relationships\": {\n \"resource\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n }\n },\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/external-calendars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"types\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"availability_type\": \"available\",\n \"url\": \"<string>\",\n \"is_invalid_url\": true,\n \"event_count\": 123,\n \"anonymize_entries\": true\n },\n \"relationships\": {\n \"resource\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n }\n },\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{}{
"data": {
"id": "<string>",
"type": "externalcalendars",
"attributes": {
"name": "<string>",
"source": "<string>",
"availability_type": "<string>",
"url": "<string>",
"is_invalid_url": true,
"event_count": 123,
"anonymize_entries": true,
"import_transparent": true,
"timezone": "<string>",
"updated_at": "<string>",
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"resource": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"external_resource": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}Resource Management
Create an external calendar
POST
/
api
/
v1
/
external-calendars
Create an external calendar
curl --request POST \
--url https://b.anny.co/api/v1/external-calendars \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"types": "<string>",
"attributes": {
"name": "<string>",
"source": "<string>",
"availability_type": "available",
"url": "<string>",
"is_invalid_url": true,
"event_count": 123,
"anonymize_entries": true
},
"relationships": {
"resource": {
"data": {
"type": "<string>",
"id": "<string>"
}
}
},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/external-calendars"
payload = { "data": {
"types": "<string>",
"attributes": {
"name": "<string>",
"source": "<string>",
"availability_type": "available",
"url": "<string>",
"is_invalid_url": True,
"event_count": 123,
"anonymize_entries": True
},
"relationships": { "resource": { "data": {
"type": "<string>",
"id": "<string>"
} } },
"meta": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
types: '<string>',
attributes: {
name: '<string>',
source: '<string>',
availability_type: 'available',
url: '<string>',
is_invalid_url: true,
event_count: 123,
anonymize_entries: true
},
relationships: {resource: {data: {type: '<string>', id: '<string>'}}},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/external-calendars', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b.anny.co/api/v1/external-calendars",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'types' => '<string>',
'attributes' => [
'name' => '<string>',
'source' => '<string>',
'availability_type' => 'available',
'url' => '<string>',
'is_invalid_url' => true,
'event_count' => 123,
'anonymize_entries' => true
],
'relationships' => [
'resource' => [
'data' => [
'type' => '<string>',
'id' => '<string>'
]
]
],
'meta' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/external-calendars"
payload := strings.NewReader("{\n \"data\": {\n \"types\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"availability_type\": \"available\",\n \"url\": \"<string>\",\n \"is_invalid_url\": true,\n \"event_count\": 123,\n \"anonymize_entries\": true\n },\n \"relationships\": {\n \"resource\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n }\n },\n \"meta\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b.anny.co/api/v1/external-calendars")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"types\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"availability_type\": \"available\",\n \"url\": \"<string>\",\n \"is_invalid_url\": true,\n \"event_count\": 123,\n \"anonymize_entries\": true\n },\n \"relationships\": {\n \"resource\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n }\n },\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/external-calendars")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"types\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"availability_type\": \"available\",\n \"url\": \"<string>\",\n \"is_invalid_url\": true,\n \"event_count\": 123,\n \"anonymize_entries\": true\n },\n \"relationships\": {\n \"resource\": {\n \"data\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\"\n }\n }\n },\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{}{
"data": {
"id": "<string>",
"type": "externalcalendars",
"attributes": {
"name": "<string>",
"source": "<string>",
"availability_type": "<string>",
"url": "<string>",
"is_invalid_url": true,
"event_count": 123,
"anonymize_entries": true,
"import_transparent": true,
"timezone": "<string>",
"updated_at": "<string>",
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"resource": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"external_resource": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}⌘I