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)

talk with me: http://eventful.com/nate

Eventful, Inc.
http://eventful.com
"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
href="http://eventful.com/events/'+data.events.event[i].id+'">Event
Details</a>'+'</p>';
        }
        elData.innerHTML = text;
      }
      else
      {
        ...
      }
    });
  }
  </script>
</head>
<body>

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

--- Jed Sundwall <[EMAIL PROTECTED]> wrote:

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.

You can see it at http://jedsundwall.com/apical.html

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:
http://eventful.com/calendars/
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
To: [EMAIL PROTECTED], MEENA SELVAM
<[EMAIL PROTECTED]>
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.
http://farechase.yahoo.com/promo-generic-14795097








______________________________________________________________________ ______________ Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545433


Reply via email to