EventApiClient
Contains all the endpoints needed to manage events.
Constructors
Constructor
new EventApiClient():
EventApiClient
Returns
EventApiClient
Methods
addMediaToEventPhotoGallery()
static
addMediaToEventPhotoGallery(id
,config?
):Promise
<SCMediaType
>
This endpoint adds the media in a gallery of a specific event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCMediaType
>
changeEventCover()
static
changeEventCover(id
,data
,config?
):Promise
<SCEventType
>
This endpoint changes the event avatar
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | FormData | |
config? | AxiosRequestConfig |
Returns
Promise
<SCEventType
>
createEvent()
static
createEvent(data
,config?
):Promise
<SCEventType
>
This endpoint creates an event.
Parameters
Parameter | Type | Description |
---|---|---|
data | EventCreateParams | FormData | |
config? | AxiosRequestConfig |
Returns
Promise
<SCEventType
>
deleteEvent()
static
deleteEvent(id
,config?
):Promise
<any
>
This endpoint deletes an event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
getEventFeed()
static
getEventFeed(id
,params?
,config?
):Promise
<any
>
This endpoint performs events search
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params? | EventFeedParams | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
getEventInvitedUsers()
static
getEventInvitedUsers(id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns a list of invited users.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
getEventMembers()
static
getEventMembers(id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns all subscribers of a specific event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
getEventPhotoGallery()
static
getEventPhotoGallery(id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCMediaType
>>
This endpoint returns the gallery of a specific event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCMediaType
>>
getEventRelated()
static
getEventRelated(id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCEventType
>>
This endpoint returns all events related of a specific event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params? | EventRelatedParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCEventType
>>
getEventsSuggestedUsers()
static
getEventsSuggestedUsers(search
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns a list of suggested users to invite to the events.
Parameters
Parameter | Type | Description |
---|---|---|
search | string | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
getEventSubscriptionStatus()
static
getEventSubscriptionStatus(id
,config?
):Promise
<any
>
This endpoint retrieves the event subscription status.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
getEventSuggestedUsers()
static
getEventSuggestedUsers(id
,search
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns a list of suggested users to invite to the event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
search | string | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
getEventWaitingApprovalSubscribers()
static
getEventWaitingApprovalSubscribers(id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns all waiting approval subscribers
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
getSpecificEventInfo()
static
getSpecificEventInfo(id
,config?
):Promise
<SCEventType
>
This endpoint retrieves a specific event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCEventType
>
getUserCreatedEvents()
static
getUserCreatedEvents(params?
,config?
):Promise
<SCPaginatedResponse
<SCEventType
>>
This endpoint returns all events cretaed by a specific event.
Parameters
Parameter | Type | Description |
---|---|---|
params? | EventRelatedParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCEventType
>>
getUserEvents()
static
getUserEvents(params?
,config?
):Promise
<SCPaginatedResponse
<SCEventType
>>
This endpoint retrieves all the events of the logged-in user.
Parameters
Parameter | Type | Description |
---|---|---|
params? | EventUserParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCEventType
>>
getUsersGoingToEvent()
static
getUsersGoingToEvent(id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns a list of users attending the event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
getUsersNotGoingToEvent()
static
getUsersNotGoingToEvent(id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns a list of users not attending the event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
getUserSubscribedEvents()
static
getUserSubscribedEvents(id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCEventType
>>
This endpoint retrieves a specific user events.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params? | BaseSearchParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCEventType
>>
goToEvent()
static
goToEvent(id
,config?
):Promise
<any
>
This endpoint allows to attend an event
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
hideEvent()
static
hideEvent(id
,config?
):Promise
<any
>
This endpoint hide a specific event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
inviteOrAcceptEventRequest()
static
inviteOrAcceptEventRequest(id
,data
,config?
):Promise
<any
>
This endpoint allows to invite or accept an event invite.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | { users : number []; } | |
data.users | number [] | - |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
notGoingToEvent()
static
notGoingToEvent(id
,config?
):Promise
<any
>
This endpoint allows to not attend an event
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
patchEvent()
static
patchEvent(id
,data
,config?
):Promise
<SCEventType
>
This endpoint patches an event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | SCEventType | |
config? | AxiosRequestConfig |
Returns
Promise
<SCEventType
>
removeGoingToEvent()
static
removeGoingToEvent(id
,config?
):Promise
<any
>
This endpoint allows to remove an event participation
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
removeInviteEvent()
static
removeInviteEvent(id
,data
,config?
):Promise
<any
>
This endpoint allows to remove invites.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | { users : number []; } | |
data.users | number [] | - |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
removeMediasFromEventPhotoGallery()
static
removeMediasFromEventPhotoGallery(id
,config?
):Promise
<void
>
This endpoint removes the medias in a gallery of a specific event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<void
>
removeNotGoingToEvent()
static
removeNotGoingToEvent(id
,config?
):Promise
<any
>
This endpoint allows to remove the event not attending
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
searchEvents()
static
searchEvents(params?
,config?
):Promise
<SCPaginatedResponse
<SCEventType
>>
This endpoint performs events search
Parameters
Parameter | Type | Description |
---|---|---|
params? | EventSearchParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCEventType
>>
showEvent()
static
showEvent(id
,config?
):Promise
<any
>
This endpoint show a specific event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
subscribeToEvent()
static
subscribeToEvent(id
,config?
):Promise
<any
>
This endpoint subscribes to an event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
unsubscribeFromEvent()
static
unsubscribeFromEvent(id
,config?
):Promise
<any
>
This endpoint unsubscribes from an event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
updateEvent()
static
updateEvent(id
,data
,config?
):Promise
<SCEventType
>
This endpoint updates an event.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | SCEventType | |
config? | AxiosRequestConfig |
Returns
Promise
<SCEventType
>