Danny | 10 Jun 00:12 2007

Re: question about retrieving demands

A search should do the trick..

Try something like this...

http://api.eventful.com/rest/demands/search? 
app_key=test_key&q=spid:P0-001-000003742-9

Let us know if you need anything.

Enjoy,
-Dan

On Jun 9, 2007, at 2:19 PM, Scott Andrew wrote:

> I'm writing an app that pulls the demands for a particular performer.
>
> Currently it looks like I need to supply the performer ID to / 
> perfomers/get, then iterate over the demand elements, passing each  
> one to /demands/get to find the details.
>
> This seems expensive. Is there a way to batch these requests to / 
> demands/get ? Or is there another way to get all the demands for a  
> performer directly with one call?
>
> I experimented with /demands/search, but it's inaccurate because it  
> doesn't accept performer IDs AFAICT. A search for, say, "Hawthorne  
> Heights" pulls up demands of other performers who've listed HH  
> somewhere in their profiles.
>
> thanks,
(Continue reading)

Brad Fults | 13 Jun 23:44 2007

Re: Setting a timeout using EVDB.API javascript library.

Hi Chris,

The EVDB.API JS library uses the append-script-to-header method to  
get around the same-domain restrictions on XMLHttpRequest and iframes.

Currently, one way to implement a request timeout would involve  
mirroring the API JS file [ http://api.eventful.com/js/api ] on your  
own server and modifying it.

After line 97:

     EVDB.API.elHead.appendChild(elScript);

Add:

     // set a timeout on the request (default: 10 seconds)
     window.setTimeout(function() {
       elScript.parentNode.removeChild(elScript);
       EVDB.API.requests[EVDB.API.idRequest] = null;
       EVDB.API.error("Request timed out.");
     }, 10000);

...and tweak as necessary. This is just off the cuff and hasn't been  
tested across browsers, so your mileage may vary. I'll look into  
implementing a more long-term solution in the next version of the  
EVDB.API JS library.

Thanks for your interest and good luck with your app!

--

-- 
(Continue reading)

Meena Selvam | 25 Jun 06:16 2007
Picon

Re: displaying multiple pages from events/search

Hi,

How can I get the display of multiple page output from
events/search? For example in this sample code, the
events are available in 'data' and displayed using a
DIV element. I used this program and got
data.page_count as 8, but the div displays only the
first page. Any suggestions to modify this program to
get multiple pages? 

EVDB.API.call("/calendars/events/list", oArgs,
function(data)
    {
      var text = '', date = '', elData =
document.getElementById("data");
      if (data.events && data.events.event &&
data.events.event.length)
      {
        for (var i=0, l=data.events.event.length; i <
l; i++)
        {
          date = ...
          text += '<p>'+date+'<br/>
<strong>'+data.events.event[i].title+'</strong> 
&bull; <a
href="http://eventful.com/events/'+data.events.event[i].id+'">Event
Details</a>'+'</p>';
        }
        elData.innerHTML = text;
      }
(Continue reading)

Nate Ritter | 25 Jun 17:20 2007

Re: displaying multiple pages from events/search

Meena,

The best thing you could do, if you wanted more than the default amount per page is to add to the oArgs variable something like "page_size  = 100", although that's not exactly "recommended" from those API guys, it's something that could be done.

Unfortunately, with the script you're using, it's not very convenient to do 8 calls and aggregate the results into one set.  So, the above is what I would recommend for now.

- anyone else on this API developers list, feel free to correct me if you have a better way.

-- 
Nate Ritter
Manager of Ambiguous Titles
and That Community Guy (Ambassador)


Eventful, Inc.
"Life is short... make it Eventful!"


On Jun 24, 2007, at 9:16 PM, Meena Selvam wrote:

Hi,

How can I get the display of multiple page output from
events/search? For example in this sample code, the
events are available in 'data' and displayed using a
DIV element. I used this program and got
data.page_count as 8, but the div displays only the
first page. Any suggestions to modify this program to
get multiple pages? 

EVDB.API.call("/calendars/events/list", oArgs,
function(data)
    {
      var text = '', date = '', elData =
document.getElementById("data");
      if (data.events && data.events.event &&
data.events.event.length)
      {
        for (var i=0, l=data.events.event.length; i <
l; i++)
        {
          date = ...
          text += '<p>'+date+'<br/>
<strong>'+data.events.event[i].title+'</strong> 
&bull; <a
Details</a>'+'</p>';
        }
        elData.innerHTML = text;
      }
      else
      {
        ...
      }
    });
  }
  </script>
</head>
<body>

  <div id="data"></div>
</body>
</html>


Hi Meena,

I'm a beginner too, but I'm lucky enough to work at
Eventful, so I  
got a lot of help making an API driven calendar.


It displays the 15 most upcoming events from a smart
calendar that  
shows all political events happening in Washington,
DC. You can see  
the original calendar here:
C0-001-000068866-7/

The code I used was based on the example code. I've
attached it here,  
so hopefully it can help point you in the right
direction. Let me  
know if you have any specific questions and I'll be
happy to help out.

Cheers,
Jed.


---------------------------------
  Test Calendar  
        window.onload = function() {    var oArgs = { 
    app_key: "test_key",      id:
"C0-001-000068866-7",   page_size:15    };   
EVDB.API.call("/calendars/events/list", oArgs,
function(data)    {      var text = '', date = '',
elData = document.getElementById("data");      if
(data.events & data.events.event &
data.events.event.length)      {        for (var i=0,
l=data.events.event.length; i '+date+'
 '+data.events.event[i].title+' at
'+data.events.event[i].venue_name+' &bull; Event
Details'+'
';        }        elData.innerHTML = text;      }    
 else      {        elData.innerHTML = "No upcoming
events found.";      }    });  }        
Political Events in Washington. Powered by     



From: MEENA SELVAM < >
Date: March 17, 2007 5:53:29 PM PDT
Subject: [api-developers] sample code for a basic
query

Hi,
I am a beginner, trying to use evdb api for a
school
project. I went through the example code given in
eventful API website to access evdb apis using
javascript. But it is not clear how to run the
code. I
tried uncommenting the first section of the code,
and
put it in a html file, but I dont see any results
in
the browser , not even the alert messages.

Can anyone explain how that sample example can be
utilized, or email me any other sample code, that
can
be used to do a basic EVDB query

Thanks in Advance,
Meena





______________________________________________________________________

______________
Now that's room service!  Choose from over 150,000
hotels
in 45,000 destinations on Yahoo! Travel to find
your fit.








____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 



Gmane