Federico Raggi | 7 Nov 21:06 2006
Picon

Retrieving multiple categories using /events/search

Hi!

      I'm working on Party Crasher, a sample application that allows users to select one or more of their Messenger and Hotmail contacts and displays nearby events on a Virtual Earth map. I want to display multiple events categories based on which ones the user selects.  The /events/search API call has a ‘category’ parameter, but it doesn’t seem to support requests with multiple categories. I tried using the ‘keywords’ parameter and it didn’t work either.

 

    Is it possible to retrieve multiple categories (or keywords) without having to make separate /event/search API calls, one for each category, keyword?

Chris Radcliff | 7 Nov 22:07 2006

Re: Retrieving multiple categories using /events/search

Hi Federico,

Sounds like a fun application!  Will it be available to the public,  
or is it just an internal demo?

Regarding categories, it's not currently possible to specify more  
than one category per search.  However, you can specify multiple  
keywords in the same search and use the || ('or') operator between them:

music || arts || comedy
http://api.evdb.com/rest/events/search? 
app_key=test_key&keywords==music+%7C%7C+arts+%7C%7C 
+comedy&location=San+Diego

This works with tags as well:

tag:music || tag:arts || tag:comedy
http://api.evdb.com/rest/events/search? 
app_key=test_key&keywords=tag:music+%7C%7C+tag:arts+%7C%7C 
+tag:comedy&location=San+Diego

Note that leaving the || operator out does an 'and' search, but that  
can be explicitly specified using the && operator:

(tag:music && tag:concert) || tag:comedy

I hope this helps.  Good luck with your application, and let me know  
if you have any questions.

Cheers,
---
Chris Radcliff
Eventful, Inc.
chris@...
Life is short... make it Eventful!

On Nov 7, 2006, at 12:06 PM, Federico Raggi wrote:
> Hi!
>
>       I'm working on Party Crasher, a sample application that  
> allows users to select one or more of their Messenger and Hotmail  
> contacts and displays nearby events on a Virtual Earth map. I want  
> to display multiple events categories based on which ones the user  
> selects.  The /events/search API call has a ‘category’ parameter,  
> but it doesn’t seem to support requests with multiple categories. I  
> tried using the ‘keywords’ parameter and it didn’t work either.
>
>
>
>     Is it possible to retrieve multiple categories (or keywords)  
> without having to make separate /event/search API calls, one for  
> each category, keyword?
>
>

Federico Raggi | 7 Nov 22:15 2006
Picon

RE: Retrieving multiple categories using /events/search

Chris:
        Thanks for your answer. You can see a preview of the party crasher sample at: http://dev.live.com/mashups/partycrasher/.

        Your comments and suggestions are welcomed!

Federico Raggi
Program Manager  - Windows Live Developer Platform
Microsoft Corp, Redmond
USA

-----Original Message-----
From: Chris Radcliff [mailto:chris@...]
Sent: Tuesday, November 07, 2006 1:07 PM
To: Federico Raggi
Cc: api-developers@...
Subject: Re: [api-developers] Retrieving multiple categories using /events/search

Hi Federico,

Sounds like a fun application!  Will it be available to the public, or is it just an internal demo?

Regarding categories, it's not currently possible to specify more than one category per search.  However,
you can specify multiple keywords in the same search and use the || ('or') operator between them:

music || arts || comedy
http://api.evdb.com/rest/events/search?
app_key=test_key&keywords==music+%7C%7C+arts+%7C%7C
+comedy&location=San+Diego

This works with tags as well:

tag:music || tag:arts || tag:comedy
http://api.evdb.com/rest/events/search?
app_key=test_key&keywords=tag:music+%7C%7C+tag:arts+%7C%7C
+tag:comedy&location=San+Diego

Note that leaving the || operator out does an 'and' search, but that can be explicitly specified using the && operator:

(tag:music && tag:concert) || tag:comedy

I hope this helps.  Good luck with your application, and let me know if you have any questions.

Cheers,
---
Chris Radcliff
Eventful, Inc.
chris@...
Life is short... make it Eventful!

On Nov 7, 2006, at 12:06 PM, Federico Raggi wrote:
> Hi!
>
>       I'm working on Party Crasher, a sample application that allows
> users to select one or more of their Messenger and Hotmail contacts
> and displays nearby events on a Virtual Earth map. I want to display
> multiple events categories based on which ones the user selects.  The
> /events/search API call has a 'category' parameter, but it doesn't
> seem to support requests with multiple categories. I tried using the
> 'keywords' parameter and it didn't work either.
>
>
>
>     Is it possible to retrieve multiple categories (or keywords)
> without having to make separate /event/search API calls, one for each
> category, keyword?
>
>

Joe Leonard | 8 Nov 19:36 2006

General development issues and questions

I have a few questions we've gathered while integrating EVDB into our site:

1. When doing a /performers/get/ search, I've found that the 
'events_count' does not *always* match the number of events in the 
'events' array. So the 'event_count' may be 3, but the actual numbers of 
'events' in the array is 4! This seems to resolve itself after a few 
minutes, but its strange behaviour nonetheless, and am curious as to why 
the 'events' would be accurate but not the 'event_count'!

2. Also, in the above mentioned 'events' array, there is no info on the 
Venue name, nor address. It only has a 'location' string which seems to 
hold the city and state, like "Boston, MA". Are there any plans to 
include the venue name, and/or full address? This missing info sort of 
breaks the mold of other search results which can be sorted by: Date, 
Artist/Title, and Venue.

3. When adding new events, and/or editting old events, there seems to be 
some lag between when the event shows up in search results. And that lag 
seems to be different depending on how that event is retrieved, say, 
through /events/search/ or /performers/get/, etc... The events do show 
up eventually, but at different times depending on the search type 
performed.

4. We've also noticed sorting issues. Say you search on eventful's 
website for:
Location: Boston, MA
Keyword: Jazz
Sort by: Date
Category: Music
Distance: 25 miles
The results appear to not be in order by Date, it initially seems so but 
then there are some 2006 events mingled inbetween 2012 events. Is this 
an error? Is there some other criteria its using to sort them that I 
cant see? We get similar unexpected results when sorting by Venue too.

Thanks!
Joe Leonard
http://www.nextcat.com/

Chris Radcliff | 8 Nov 23:19 2006

Re: General development issues and questions

Hi Joe,

Nextcat looks like a pretty cool site; we're always glad to get  
performers more involved.  When are you planning to add Eventful  
integration?  Is there a preview of that anywhere?  I'd love to see  
it when it's available...

Thanks for the insightful questions.  Answers are inline below:

> 1. When doing a /performers/get/ search, I've found that the  
> 'events_count' does not *always* match the number of events in the  
> 'events' array.

Yes, that's a known issue.  Part of it has to do with the event  
counts being cached aggressively for performance reasons (see #3  
below), but there's also an honest bug to fix.  Consider that number  
suspect for now; I'll post to the list when the fix is available.   
FYI, you probably don't want to use the count of the 'events' array,  
either, because that only lists the first 20 events.

> 2. Also, in the above mentioned 'events' array, there is no info on  
> the Venue name, nor address. ... This missing info sort of breaks  
> the mold of other search results which can be sorted by: Date,  
> Artist/Title, and Venue.

You're right, it does.  The balance between insanely huge XML results  
and not enough information is a tricky one, and for /performers/get  
we chose to summarize the venue information in the location field  
instead.  If you need something more searchlike, I'd recommend using / 
events/search with a performer ID, like so:

http://eventful.com/events?q=spid%3AP0-001-000000067-4&l=
http://api.evdb.com/rest/events/search?app_key=test_key&keywords=spid% 
3AP0-001-000000067-4

That way you can sort it however you'd like, and combine it with  
other search terms as desired.  If you want just a count, specify the  
count_only flag and bypass the actual results.

> 3. When adding new events, and/or editting old events, there seems  
> to be some lag between when the event shows up in search results.

That's correct.  Data entered into the system isn't guaranteed to be  
reflected in search results immediately.  If you're willing to wait  
for a more authoritative answer, you can call /events/reindex after  
you're done adding the event:

http://api.evdb.com/rest/events/reindex? 
app_key=test_key&id=E0-001-001737134-9

With /performers/get, there's an additional layer of cache on that  
list of events, so it may take longer for a new event to be reflected  
there.  Another reason to use /events/search as above.

> 4. We've also noticed sorting issues.  ...
> The results appear to not be in order by Date, it initially seems  
> so but then there are some 2006 events mingled inbetween 2012 events.

That's a data error, actually.  Thanks for bringing it to our  
attention.  The 2012 events have start dates in 2012 and end dates in  
2006, so what you're seeing is the event sorted by end date.  I'm  
going to add an additional check to make sure it's not possible to  
add events with bad start/end times like that, but please let us know  
if you find specific instances of that kind of thing again.

I hope that helps you out.  Let me know if you have more questions.

Thanks,
---
Chris Radcliff
Eventful, Inc.
chris@...
Life is short... make it Eventful!

Joe Leonard | 13 Nov 14:37 2006

Adding a Category to an Event

Hi,

Back again with another issue:

When a user creates an event, and adds a category to it we call this url:

http://api.evdb.com/rest/events/categories/add?AUTH&id=EVENT_ID&category_id=music
(AUTH and EVENT_ID are there just for the example...)

We get this in return:

<response status="ok">
<message>Category added successfully.</message>
</response>

Works great! But now, when a user chooses 'other' as a category and we 
attempt to add that category to the event, we call this url:

http://api.evdb.com/rest/events/categories/add?AUTH&id=EVENT_ID&category_id=other

<error string="General error">
<description>
Can't add category 'other' to event 'E0-001-001879292-9': No category 
was provided.
</description>
</error>

I've referenced Eventful's site for what they use for 'Other's 
category_id hand we seem to be matching theirs exactly.

Looking at /categories/list
http://api.evdb.com/rest/categories/list?AUTH
I can see that we are using the correct category_id
<category>
<id>other</id>
<name>Other</name>
</category>

Is there something I am missing? Is there a special way to add "other" 
as a category that differs from adding "music" or other categories?

Joe Leonard
Nextcat.com

Chris Radcliff | 15 Nov 00:47 2006

Re: Adding a Category to an Event

Hi Joe,

The "other" category is a little confusing, because it's not actually  
a category.  When using categories in /events/search, it's a  
container for everything that doesn't fit in a category.  When  
presenting a list of categories to a user adding an event, we use  
"other" to mean "no category specified."

Still, the error message is incorrect; it should have just quietly  
ignored the "other" request.  I'll fix that ASAP.

Thanks,
---
Chris Radcliff
Eventful, Inc.
chris@...
Life is short... make it Eventful!

On Nov 13, 2006, at 5:37 AM, Joe Leonard wrote:

> Hi,
>
> Back again with another issue:
>
> When a user creates an event, and adds a category to it we call  
> this url:
>
> http://api.evdb.com/rest/events/categories/add? 
> AUTH&id=EVENT_ID&category_id=music
> (AUTH and EVENT_ID are there just for the example...)
>
> We get this in return:
>
> <response status="ok">
> <message>Category added successfully.</message>
> </response>
>
> Works great! But now, when a user chooses 'other' as a category and  
> we attempt to add that category to the event, we call this url:
>
> http://api.evdb.com/rest/events/categories/add? 
> AUTH&id=EVENT_ID&category_id=other
>
> <error string="General error">
> <description>
> Can't add category 'other' to event 'E0-001-001879292-9': No  
> category was provided.
> </description>
> </error>
>
> I've referenced Eventful's site for what they use for 'Other's  
> category_id hand we seem to be matching theirs exactly.
>
> Looking at /categories/list
> http://api.evdb.com/rest/categories/list?AUTH
> I can see that we are using the correct category_id
> <category>
> <id>other</id>
> <name>Other</name>
> </category>
>
> Is there something I am missing? Is there a special way to add  
> "other" as a category that differs from adding "music" or other  
> categories?
>
> Joe Leonard
> Nextcat.com
>

John Wehr | 29 Nov 09:34 2006
Picon

Very short descriptions in event search JS API

When querying the event search Javascript API, the event descriptions  
come back too abbreviated. For example, five separate descriptions:

<div...
The...
Measure of...
Have you...
A...

If this on purpose? Is there a flag I can use to request the complete  
description? Can I file a bug?

John Wehr
e: johnwehr@...
p: 850-321-7070
aim: wehriam

Chris Radcliff | 29 Nov 20:01 2006

Re: Very short descriptions in event search JS API

Hi John,

The Javascript API doesn't modify the description length as far as I  
know.  I've checked both the JSON output and the test script included  
with the JS API, and in both cases I got full-length descriptions.

http://api.eventful.com/json/events/search? 
app_key=test_key&q=music&json_request_id=12
http://api.eventful.com/js/api  (I used the test script from here for  
the attached test.)

Could some process downstream be truncating the descriptions on your  
end?  If not, would you send me a code sample or test URL?

Let me know if you have any questions.  It's great to see you're  
using Eventful!

Cheers,
---
Chris Radcliff
Eventful, Inc.
chris@...
Life is short... make it Eventful!

test me

On Nov 29, 2006, at 12:34 AM, John Wehr wrote:

> When querying the event search Javascript API, the event  
> descriptions come back too abbreviated. For example, five separate  
> descriptions:
>
> <div...
> The...
> Measure of...
> Have you...
> A...
>
> If this on purpose? Is there a flag I can use to request the  
> complete description? Can I file a bug?
>
> John Wehr
> e: johnwehr@...
> p: 850-321-7070
> aim: wehriam
>
>
>

Chris Radcliff | 29 Nov 22:37 2006

Re: Very short descriptions in event search JS API

Hi John,

Good catch.  You're exactly right; descriptions from one of our data  
sources (sfstation.com) are being truncated incorrectly.  I've  
brought that to the attention of the data import folks; the events  
should be fixed shortly.

Thanks,
---
Chris Radcliff
Eventful, Inc.
chris@...
Life is short... make it Eventful!

On Nov 29, 2006, at 12:58 PM, John Wehr wrote:

> Check out the descriptions from this query:
>
> http://api.evdb.com/json/events/search? 
> app_key=43qFDQRN9PrPvDBF&page_size=10&within=50&location=San% 
> 20Francisco%2C%20CA%2C%20USA&json_request_id=1
>
> You'll see they've all been cropped to about ten characters, with a  
> "..." added to the end. It appears that's the full description:
>
> http://eventful.com/events/E0-001-001591959-8 <at> 2006112907
>
> Perhaps there's an importing error somewhere along the line?
>
> John Wehr
> e: johnwehr@...
> p: 850-321-7070
> aim: wehriam
>
>
>
> On Nov 29, 2006, at 2:01 PM, Chris Radcliff wrote:
>
>> Hi John,
>>
>> The Javascript API doesn't modify the description length as far as  
>> I know.  I've checked both the JSON output and the test script  
>> included with the JS API, and in both cases I got full-length  
>> descriptions.
>>
>> http://api.eventful.com/json/events/search? 
>> app_key=test_key&q=music&json_request_id=12
>> http://api.eventful.com/js/api  (I used the test script from here  
>> for the attached test.)
>>
>> Could some process downstream be truncating the descriptions on  
>> your end?  If not, would you send me a code sample or test URL?
>>
>> Let me know if you have any questions.  It's great to see you're  
>> using Eventful!
>>
>> Cheers,
>> ---
>> Chris Radcliff
>> Eventful, Inc.
>> chris@...
>> Life is short... make it Eventful!
>>
>> <js-test.html>
>>
>> On Nov 29, 2006, at 12:34 AM, John Wehr wrote:
>>
>>> When querying the event search Javascript API, the event  
>>> descriptions come back too abbreviated. For example, five  
>>> separate descriptions:
>>>
>>> <div...
>>> The...
>>> Measure of...
>>> Have you...
>>> A...
>>>
>>> If this on purpose? Is there a flag I can use to request the  
>>> complete description? Can I file a bug?
>>>
>>> John Wehr
>>> e: johnwehr@...
>>> p: 850-321-7070
>>> aim: wehriam
>>>
>>>
>>>
>>
>


Gmane