This is a query string to fetch all popular events within a radius of a specified location.
https://www.eventbriteapi.com/v3/events/search/?popular=off&location.address="+area+"&location.within="+radius+"&token=E5DRAICK4272QQQIBDR5
But when I query Eventbrite api I only get venue_id , How to fetch lat and long for an event from eventbrite api ?
Please try venue param in your fetching URL to eventBrite API, like this:
$search_url?token=$token&q=&date_created.keyword=today&page=$repeat&sort_by=$date&expand=venue
It solved my issue and brought lat long along with proper location of event.
&expand=venue is still working perfectly!!! The official documentation says the venue is deprecated, but anyway you can use it.
Related
I have this document in my collection inside a db in MongoDB
{
name: "steve",
id: 11,
address: "24 rue Victor Hugo"
geolocation:
{latitude:"16.66667",longitude:"101.18333"}
}
I want to get the city name from the geolocation data, I am working in Vs with node, express and mongoose. I tried to find a way to do without manipulating my db, because I already have my collection set before starting.
You can make requests with your geolocation parameters for address information.
https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&key=YOUR_API_KEY
What you are trying to do is called reverse geocoding. It is available through the Google Maps Geocoding API. You have to sign up for a Google Developers account. Afterwards, you create a project from the Google Developers console. You can then request an API key. You can then use this API key in your request to the Google Maps API as follows:
https://maps.googleapis.com/maps/api/geocode/json?latlng=16.66667,101.18333&key=YOUR_API_KEY
Take a look at Google's Goecoding API documentation here. You can also test that URL in a browser to see the returned JSON-result, or using curl from the command-line.
I have modified the script found here Retrieve Google Calendar events using API v3 in javascript to display a page of upcoming events over the next 30 days which summarizes each event.
I would like to create a link provided with each event summary on the above page to another page that would show more details for a specific single event.
I cannot seem to write the code that will successfully take the eventId and query the Google Calendar API to retrieve the resources for that single event.
I apologize in advance as I am trying to learn Javascript as I go so I suspect this is something rather simple that I'm stuck on.
I am of the belief that in the makeApiCall() function I would desire to change the lines that start with:
var request = gapi.client.calendar.events.list({
to:
gapi.client.load('calendar', 'v3', function () {
var request = gapi.client.calendar.events.get({
'calendarId' : userEmail,
'eventId': eventIDstr});
I can get a valid answer when using Google's APIs Explorer pages so I know I have the correct Calendar and Event IDs. Just cannot seem to apply that to the correct javascript to get the results I am looking for.
I have searched high and low for samples of javascript that will retrieve a single Event's data from Google Calendar using v3 of their API and have come up with nothing useful. Any help would be greatly appreciated.
Thanks in advance.
Yes, you're on the right path. Use Events:get. Events provides different flavors of event resources.
HTTP request
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
If successful, method returns an event resource in the response body.
import com.google.api.services.calendar.Calendar;
import com.google.api.services.calendar.model.Event;
// ...
// Initialize Calendar service with valid OAuth credentials
Calendar service = new Calendar.Builder(httpTransport, jsonFactory, credentials)
.setApplicationName("applicationName").build();
// Retrieve an event
Event event = service.events().get('primary', "eventId").execute();
System.out.println(event.getSummary());
You can use singleEvents=true parameter in the list request to avoid the second call. This will ask the server to do the recurring event expansion for you right away.
I need to populate some data based on the zipcode of the user visiting the site.
Could somebody tell me how to retrieve the zipcode of the location of that user?
I am using AngularJS on my app.
OK. It is a bit involved, but here is how I would do it, if I were you.
First, you would use the geolocation API as follows:
window.navigator.geolocation.getCurrentPosition(function(pos){
console.log(pos);
});
Inside your callback, you will get a position object. It looks like this:
{
"timestamp":1408324851386,
"coords"{
"speed":null,
"heading":null,
"altitudeAccuracy":null,
"accuracy":30,
"altitude":null,
"longitude":-111.8942634,
"latitude":40.7288257
}
}
Then, you can take the latitude and longitude and call your server to translate it into a ZIP code. Getting the lat/long is the hard part. Doing the math to turn that into a zip is easy.
An alternative to calling your own server to translate the lat/long into a zip, you could call Google Maps' reverse lookup API. You give it a lat long, and it gives you an address, complete with a ZIP. See HERE for how to do that.
DISCLAIMER: This won't work in IE8, as the geolocation API wasn't introduced until IE9. It will work in all other browsers (besides Opera Mini, #NBD).
HERE IS A FULL WORKING EXAMPLE
I just tried this out, and it found my house, no problem.
window.navigator.geolocation.getCurrentPosition(function(pos){
console.log(pos);
$http.get('http://maps.googleapis.com/maps/api/geocode/json?latlng='+pos.coords.latitude+','+pos.coords.longitude+'&sensor=true').then(function(res){
console.log(res.data);
});
})
There doesn't seem to be any built-in method for determining this, you'll have to use a map service or zipcode database.
I need to display the weather information based on my location. Is there any API to do the same?
there is a good post how to use the geolocation from the clientcontext here http://blogs.adobe.com/livecycle/2011/10/bringing-geo-location-to-web-experience-management.html
that might give you a good start
I need an api for nokia maps place search with query and place term.
The API should be in http(url) format.
like this:
http://api.nokia.com/query=hotels/location=lat,long
It looks like you may be after the RESTful Places API. The latest documentation can be found here: http://developer.here.net/places
If you are after hotels, you could base your query on the example here:
http://developer.here.net/apiexplorer/examples/api-for-rest/places-search/places-search-by-category.html
The following URL will return a set of hotels in central Berlin (around 52.51N,13.4E)
http://demo.places.nlp.nokia.com/places/v1/discover/explore?cat=hotel&at=52.51,13.4&app_id=_peU-uCkp-j8ovkzFGNU&app_code=gBoUkAMoxoqIWfxWA5DuMQ&accept=application/json
See this link http://demo.places.nlp.nokia.com/places/v1/discover/explore?at=19.1273%2C72.8515&tf=plain&size=10&app_id=7vivA7jIFlZh9WX_B0cd&app_code=6ptUAobtF0RFJ9CkfX7geg&Geolocation=geo%3A19.0254%2C72.8401%3Bcgen%3Dmap . You can customize your search on left panel