Home Manual Reference Source
import EventsApi from 'newbank/src/server/events_api.js'
public class | source

EventsApi

Member Summary

Public Members
public

bingKey: *

public
public

createEventsJson(event: string): *: *

Cria um json com as informações dos eventos

public

findClosestEvents(data: object): *: *

Finds the closest events from the current location

public

getCityFromCoordinates(currentLocation: object): *: *

Bing method to get the city from the current location

public

getEventCoordinates(eventPlace: string): *: *

Get the coordinates from the event place

public

getEventsData(local: string): *: *

Faz o request e pega as informações dos eventos

public

getEventsDetails(eventJson: object): *: *

Makes a request to get the events details

Method Summary

Public Methods
public

calculateDistance(lat1: number, lon1: number, lat2: number, lon2: number): *

Calculates the distance between two events

public

toRadians(degrees: number): *

Convert degrees to radians

Public Members

public bingKey: * source

public bingmaps: * source

public createEventsJson(event: string): *: * source

Cria um json com as informações dos eventos

Return:

*

json com os eventos

public findClosestEvents(data: object): *: * source

Finds the closest events from the current location

Return:

*

List with 5 closest events

public getCityFromCoordinates(currentLocation: object): *: * source

Bing method to get the city from the current location

Return:

*

String with the city name and state abbreviation (or false if no location is provided)

public getEventCoordinates(eventPlace: string): *: * source

Get the coordinates from the event place

Return:

*

Coordinates of the event

public getEventsData(local: string): *: * source

Faz o request e pega as informações dos eventos

Return:

*

json com os eventos

public getEventsDetails(eventJson: object): *: * source

Makes a request to get the events details

Return:

*

event object with more details

Public Methods

public calculateDistance(lat1: number, lon1: number, lat2: number, lon2: number): * source

Calculates the distance between two events

Params:

NameTypeAttributeDescription
lat1 number

First event latitude

lon1 number

First event longitude

lat2 number

Second event latitude

lon2 number

Second event longitude

Return:

*

distance between events

public toRadians(degrees: number): * source

Convert degrees to radians

Params:

NameTypeAttributeDescription
degrees number

Return:

*

Number in radians