Event Appearances
CRUD endpoints for a user's event appearances
Get All Event Appearances
GET
/v2/organization/:corporation/expert/:username/eventappearance
Headers
Content-Type
application/json
Authorization
Bearer <token>
Url
corporation
number
Corporation ID
username
string
Unique username
Response
{
data: [
{
id: 1,
title: 'Event Title',
event_name: 'Event Name',
location: 'Event Location',
date: 0
},
],
success: true
}
Code
const accessToken = `<ACCESS CODE>`
fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/eventappearance', {
method: 'GET',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Bearer ${accessToken}`
}
})
.then(response => response.json())
.then(json => {
const { success, data } = json
if (success) {
const events = data;
console.log('all events', events)
}
})
.catch(error => console.error(error));
Get Individual Event Appearances
GET
/v2/organization/:corporation/expert/:username/eventappearance/:id
Headers
Content-Type
application/json
Authorization
Bearer <token>
Url
corporation
number
Corporation ID
username
string
Unique username
id
number
Event Appearance ID
Response
{
data: [
{
id: 1,
title: 'Event Title',
event_name: 'Event Name',
location: 'Event Location',
date: 0
},
],
success: true
}
Code
const accessToken = `<ACCESS CODE>`
fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/eventappearance/:id', {
method: 'GET',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Bearer ${accessToken}`
}
})
.then(response => response.json())
.then(json => {
const { success, data, error } = json
if (success) {
console.log('event', data)
}
})
.catch(error => console.error(error));
Create Event Appearances
POST
/v2/organization/:corporation/expert/:username/eventappearance
Headers
Content-Type
application/json
Authorization
Bearer <token>
Url
corporation
number
Corporation ID
username
string
Unique username
Body
title*
string
Event Title
event_name*
string
Event Name
location
string
Event Location
date
unix timestamp
Event Date
Response
{
data: {
id: 1
},
success: true
}
Code
const data = new URLSearchParams();
const accessToken = `<ACCESS CODE>`
data.append('title', 'My Event Title');
data.append('event_name', 'My Event Name...');
data.append('location', 'My Event Location');
data.append('date', 1341892800);
fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/eventappearance', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Bearer ${accessToken}`
},
body: data
})
.then(response => response.json())
.then(json => {
const { success, data, error } = json
if (success) {
const { id } = data
console.log('New event id', id)
}
})
.catch(error => console.error(error));
Update Event Appearances
PUT
/v2/organization/:corporation/expert/:username/eventappearance/:id
Headers
Content-Type
application/json
Authorization
Bearer <token>
Url
corporation
number
Corporation ID
username
string
Unique username
id
number
Event ID
Body
title*
string
Event Title
event_name*
string
Event Name
location
string
Event Location
date
unix timestamp
Event Date
Response
{
data: {
id: 1,
updated: true
},
success: true
}
Code
const data = new URLSearchParams();
const accessToken = `<ACCESS CODE>`
data.append('title', 'My Event Title');
data.append('event_name', 'My Event Name...');
data.append('location', 'My Event Location');
data.append('date', 1341892800);
fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/eventappearance/:id', {
method: 'PUT',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Bearer ${accessToken}`
},
body: data
})
.then(response => response.json())
.then(json => {
const { success, data, error } = json
if (success) {
const { id } = data
console.log('Updated event id', id)
}
})
.catch(error => console.error(error));
Delete Event Appearances
DELETE
/v2/organization/:corporation/expert/:username/eventappearance/:id
Headers
Content-Type
application/json
Authorization
Bearer <token>
Url
corporation
number
Corporation ID
username
string
Unique username
id
number
Event ID
Response
{
data: {
deleted: true,
id: 1
},
success: true
}
Code
const accessToken = `<ACCESS TOKEN>`
fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/eventappearance/:id', {
method: 'DELETE',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Bearer ${accessToken}`
}
})
.then(response => response.json())
.then(json => {
const { success, data, error } = json
if (success) {
const { id } = data
console.log('Deleted event id', id)
}
})
.catch(error => console.error(error));
Last updated
Was this helpful?