Still playing around with it but yeah, I have a question:
Is this call constructed correctly?
http://api.amp.active.com/search?k=running&l=newton,ma,usa&r=2&v=rss&s=date_descm=startDate:daterange:today..tommorrow+m=channel=Running&api_key={api-key}
I want to show the up-and-coming running events with in 2 miles of Newton,
Ma in reverse chron.
I noticed a few syntactical errors, and I've added a few more parameters to the query. Here's the refined query:
http://api.amp.active.com/search?k=&l=newton,ma,usa&r=2&v=rss&s=date_desc&m=meta:startDate:daterange:today..+meta:channel=Running+meta:splitMediaType=Event&num=50&api_key={api-key}
And here's a summary of what I changed:
* combined all "meta" filters into one "m=" clause: "&m=meta:startDate:daterange:today..+meta:channel=Running" ...
* removed the keyword ("k") value leaving it blank. Having "k=running" will most likely limit your results to running events, however. But the next optimization will definitely limit results to running events:
* Added a "splitMediaType" filter to the meta filter clause to limit results to running events. The total meta filter clause, then, is "m=meta:startDate:daterange:today..+meta:channel=Running+meta:splitMediaType=Event"
* modified the daterange meta filter value to "today.." to bring back all future events. Your original filter only retrieved events with a start date of today or tomorrow.
* added "num=50" to return the first 50 matches. If you want the next 50, add "page=2" to your query, and so on.
Let me know how you go.
dgarcia
–
15 years ago
Thank you for your prompt response and corrections. I see that the result for your corrected call has a much filtered list which is good. I did notice that the following event did not show though; http://www.active.com/soccer-league/waban-ma/spring-10-kindergarten-soccer-2010 and I imagine that is due to the fact that its a soccer event. Right?
In this call http://api.amp.active.com/search?k=running&l=newton,ma,usa&r=2&v=rss&s=date_desc&m=startDate:daterange:today..tommorrow+m=channel=Running&api_key={api_key} (I know its wrong and broken) I see both events, running and soccer.
So I have two questions:
1. How do I change your corrected query to show soccer events rather than running events?
2. How do I change your corrected query to show all Active.com (sporting) events?
Thank you much for your help,
- Daniel
active Admin
–
15 years ago
Hey Daniel,
Use this query to return all soccer tournaments within 2 miles of Newton, MA (note the user of the keyword "soccer",the splitMediaType "Tournament", and the removal of the channel metafilter):
http://api.amp.active.com/search?k=soccer&l=newton,ma,usa&r=2&v=rss&s=date_desc&m=meta:startDate:daterange:today..+meta:splitMediaType=Tournament&api_key={api_key}
And here's a query that returns all events and tournaments within 2 miles of Newton, MA (and if you increase the radius you'll get a lot more results, of course):
http://api.amp.active.com/search?k=&l=newton,ma,usa&r=2&v=rss&s=date_desc&m=meta:startDate:daterange:today..+meta:splitMediaType=Tournament+OR+meta:splitMediaType=Event&api_key={api_key}
From Daniel at Boston.com:
Still playing around with it but yeah, I have a question:
Is this call constructed correctly?
http://api.amp.active.com/search?k=running&l=newton,ma,usa&r=2&v=rss&s=date_descm=startDate:daterange:today..tommorrow+m=channel=Running&api_key={api-key}
I want to show the up-and-coming running events with in 2 miles of Newton,
Ma in reverse chron.
Message edited by active Admin 3 years ago
Tags
active Admin – 15 years ago
I noticed a few syntactical errors, and I've added a few more parameters to the query. Here's the refined query:
http://api.amp.active.com/search?k=&l=newton,ma,usa&r=2&v=rss&s=date_desc&m=meta:startDate:daterange:today..+meta:channel=Running+meta:splitMediaType=Event&num=50&api_key={api-key}
And here's a summary of what I changed:
* combined all "meta" filters into one "m=" clause: "&m=meta:startDate:daterange:today..+meta:channel=Running" ...
* removed the keyword ("k") value leaving it blank. Having "k=running" will most likely limit your results to running events, however. But the next optimization will definitely limit results to running events:
* Added a "splitMediaType" filter to the meta filter clause to limit results to running events. The total meta filter clause, then, is "m=meta:startDate:daterange:today..+meta:channel=Running+meta:splitMediaType=Event"
* modified the daterange meta filter value to "today.." to bring back all future events. Your original filter only retrieved events with a start date of today or tomorrow.
* added "num=50" to return the first 50 matches. If you want the next 50, add "page=2" to your query, and so on.
Let me know how you go.
dgarcia – 15 years ago
Thank you for your prompt response and corrections. I see that the result for your corrected call has a much filtered list which is good. I did notice that the following event did not show though; http://www.active.com/soccer-league/waban-ma/spring-10-kindergarten-soccer-2010 and I imagine that is due to the fact that its a soccer event. Right?
In this call http://api.amp.active.com/search?k=running&l=newton,ma,usa&r=2&v=rss&s=date_desc&m=startDate:daterange:today..tommorrow+m=channel=Running&api_key={api_key} (I know its wrong and broken) I see both events, running and soccer.
So I have two questions:
1. How do I change your corrected query to show soccer events rather than running events?
2. How do I change your corrected query to show all Active.com (sporting) events?
Thank you much for your help,
- Daniel
active Admin – 15 years ago
Hey Daniel,
Use this query to return all soccer tournaments within 2 miles of Newton, MA (note the user of the keyword "soccer",the splitMediaType "Tournament", and the removal of the channel metafilter):
http://api.amp.active.com/search?k=soccer&l=newton,ma,usa&r=2&v=rss&s=date_desc&m=meta:startDate:daterange:today..+meta:splitMediaType=Tournament&api_key={api_key}
And here's a query that returns all events and tournaments within 2 miles of Newton, MA (and if you increase the radius you'll get a lot more results, of course):
http://api.amp.active.com/search?k=&l=newton,ma,usa&r=2&v=rss&s=date_desc&m=meta:startDate:daterange:today..+meta:splitMediaType=Tournament+OR+meta:splitMediaType=Event&api_key={api_key}