Eventbrite event_search not reporting capacity - eventbrite

I'm using Eventbrite's event_search to display upcoming events, along with some idea of remaining tickets. The problem is, event_search is reporting capacity = 0 for all events.
When I use organizer_list_events I can see the correct capacities, but I'd rather not use that method as I don't want to display or have to filter past and 'draft' events.
Am I missing something? Is there another way to retrieve event capacity?

The V1 event_search method only retrieves publicly available date, of which capacity is not. Capacity is considered private data that is only accessible to the administrators of the event, which is why you can get that data with the organizer_list_events method.
Y0u could move up to the V3 method User Owned Events and pass in the 'status' parameter to 'live' in order to only get the upcoming events.

Related

Outlook calendar event id's are unique across tenant?

Am working with storing multiple tenants calendar events data on a single database. If calendar event-id are unique across tenant, I will use this as primary key to store unique events
Fetching data using Graph API events delta query
Thanks in advance..
My suggestion is that you'd better to use other key to be the primary key such as timestamp like 20210122125959333.
Upon your question, I googled for help, and based on this document, it seems that there will be 2 same event id. But based on this one, it seems that event ids are unique.
So I did some tests. I used creating event api to create calendar events, and I used the same parameters to test whether it will appear same id, and here is my conclusion.
First, if I used the sample parameter(my url is: https://graph.microsoft.com/v1.0/me/calendar/events) in this document, after executing the api for several times, it will always return similar reponse but the event ids are the same(you can see details in screenshoot), but when I querying events by api, I can only get one event.
Then I set "transactionId" as "" and change the subject of event in parameter json(because when I just change the value of subject, it will return an error describes that I can't use the same transactionId), after executing serveral times, I can get different event ids even using the same parameter.
So my suggestion is you shouldn't use event id as primary key unless your system doesn't care the operation metioned above which returning the same id and prepare to set up a good validation to avoid appearing same event id.

Does every published Rails Event Store event have a timestamp?

Does every Rails Event Store event that's been published automatically get assigned a timestamp? I'm trying to build functionality that relies upon a timestamp automatically being present for events deserialized from the event_store within a job, but I don't know that I can rely on that. I'm hoping that one does not need to manually add a timestamp to the event's metadata in order for a timestamp to be present, since it doesn't appear that that's been done anywhere in the code base I'm working on. I'm aware that the docs indicate that the return value of the RubyEventStore::Event#timestamp method can be nil, but I'm hoping that it won't be nil for published events.
Unless you provide your own timestamp (the :timestamp key in metadata) each stored event will have metadata enriched with current time - see https://github.com/RailsEventStore/rails_event_store/blob/master/ruby_event_store/lib/ruby_event_store/client.rb#L311
It can be nil. But only if your clock provided to RailsEventStore client will return nil.
In upcoming Rails Event Store 2.0 release we will also add the validity time (valid_at attribute in metadata) that will allow to implement BI Temporal event sourcing. Stay tuned.

How to get calendar ID for an event when making Get Event call?

On creating a new event in a user's calendar, I receive a push notification that contains the id of the newly created event. In order to get more details about this event, I make the Get Event call:
https://learn.microsoft.com/en-us/graph/api/event-get?view=graph-rest-1.0
This returns all the event details for that particular event, but it does not seem to be returning the id of the calendar in which the event was created. I need it to attach this event to existing calendar in my local cache.
I have looked at the API spec but do not see calendar id field anywhere.
I would like to get an idea on how to get calendar id after making a get event call.
There is a relationship of Event resource with Calendar resource and Microsoft Graph lets you query relationships of one resource with another via expand parameter.
In case of Event resource its properties along with associated Calendar properties within a single query could be requested like this:
GET https://graph.microsoft.com/v1.0/me/events/{event-id}/?$expand=calendar
The response will contain among another properties the Id of Calendar
References
Use query parameters to customize responses

Eventbrite API search event base on tag

I have refer this doc https://www.eventbrite.com/developer/v3/endpoints/events/#ebapi-get-events-search
but I can not identify how to get event list base on tag.
You can search events on this data point by using the events search endpoint along with the format and category parameters. To see more than the category/format ids, use expansions. See documentation here:
https://www.eventbrite.com/developer/v3/endpoints/events/#ebapi-get-events-search
The use of tags has been removed. What you see on the web UI that look like a tags, are representations of categories, subcategories, and formats. In your example, you see "Things to do in Colorado Springs, CO," "Race," and "Community." The "things to do" category is automatically assigned based on the location of the event. The other two categories are added manually by the event organizer. It is also worth noting that categories cannot be applied to private events as categories are intended for discovery.
The confusion here stems from language inconsistencies between the GUI and the API. Here are the translations between how these data points are represented on the web UI and the API:
GUI : Event Type, API : Format https://www.eventbriteapi.com/v3/formats?token=XXX
GUI : Event Topic, API : Category
GUI : Event Sub-topic, API : Sub-category
You will want to use the category and subcategory. However, through the API these are categorized by numerical codes. For Example, Music = 103 in the API.
You would call events for music like so...
GET /v3/events/search/categories=103&token=YOUR_TOKEN_HERE
Here is the documentation on receiving the categories/subcategories and their codes.
https://www.eventbrite.com/platform/api#/reference/categories/list/list-categories?console=1
https://www.eventbrite.com/platform/api#/reference/subcategories/list/list-subcategories?console=1
I hope this helps you!
Best!

JSF Conversations ?cid - a right mess when someone bookmarks the page?

Working in JBoss AS7, using Conversation Scope to manage the user's interactions within a browser tab.
I note that my pages get ?cid parameters appended. This is great - until the user bookmarks the page then tries to return to it! The Conversation Filter gives a "No such conversation" message.
Is there a better way of managing conversations? Perhaps an implementation or a switch to make it use hidden fields (with appropriate care in AJAX)? Alternatively I'll have to start trying to intercept the Conversation Exception or modify the filter!
Thanks
- Richard
Further:
I'm intercepting the BeforeRestoreView event for other purpose (login handling mainly). You'd think this would work:
/**
* #return true if there is no valid Conversation context.
*/
private boolean conversationNotActive()
{
Context conversationContext = m_beanManager.getContext(ConversationScoped.class);
return !conversationContext.isActive();
}
But I can't get the context to ask if if it's active! Will just throw a Try-Catch in for now.
We now take a two pronged approach.
A quite complex conversation manager detects a bad conversation Id and takes appropriate action. It responds currently to the After Restore View event. I'd like to move it earlier but am having problems deriving the view ID at this stage. I've written a JSF to CDI bridge to pass the events to CDI. SeamFaces would do the same, but proved too heavyweight for us.
For a normal GET the Conversation Manager redirects to self without the cid parameter in order to cause a new conversation to be started. For a postback it returns an HTTP 410 error. The detection of dead conversation is as above. We could use a more random conversation Id when we create conversations to try to prevent collision if an ID is reused.
The Conversation Manager will also start a conversation depending on metadata it holds about the pages. (All pages under /forms/ require a conversation in our application). It uses redirect when it does this to ensure that the CID parameter is everywhere it needs to be. This may become unnecessary if I can solve the problem of getting the form ID before RestoreView phase.
We use the browser history API to remove the cid from the user's browser URL window.

Resources