{"size": 649, "ext": "js", "max_stars_repo_path": "code/submitSpot.js", "max_stars_repo_name": "j-pickett/Bixby_Hackathon", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "code/submitSpot.js", "max_issues_repo_name": "j-pickett/Bixby_Hackathon", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "code/submitSpot.js", "max_forks_repo_name": "j-pickett/Bixby_Hackathon", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.96, "max_line_length": 67, "alphanum_fraction": 0.6718027735}
function submitSpot (spotName, categories, description, location) {
  var url = "http://30a70366.ngrok.io/spots"
  var http = require('http')
  var console = require('console')
  var config = require('config')
  var test = http.getUrl(url, {format: 'text'})
  var ret = JSON.parse(test)
  var time = new Date
  
  var spot = {
    id: time.getTime(),
    spotName: spotName,
    distance: 0,
    categories: categories,
    description: description,
    latitude: location.point.latitude,
    longitude: location.point.longitude,
    Location: location
  };
  
  http.postUrl(url, spot, {format: 'json'})
  return spot
}

module.exports = submitSpot