<commit_before>//
//  WeatherUndergroundRouter.swift
//  ystrdy
//
//  Created by <NAME> on 2/6/17.
//  Copyright © 2017 theowl. All rights reserved.
//

import Foundation
import UIKit
import Alamofire


enum WeatherUndergroundRouter: URLRequestConvertible {
    
    //MARK: Case
    case getCurrentWeatherForLocation(CGPoint), getYesterdaysWeatherForLocation(CGPoint)
    
    
    //MARK: Property
    private static let baseURLString = "http://api.wunderground.com/api/9caa09c5d1399971/"
    
    var method: HTTPMethod {
        return .get
    }
    
    var path: String {
        switch self {
        case .getCurrentWeatherForLocation(_):
            return "conditions"
        case .getYesterdaysWeatherForLocation(_):
            return "yesterday"<commit_msg>added some comments for the geolocation endpoint<commit_after>//
//  WeatherUndergroundRouter.swift
//  ystrdy
//
//  Created by <NAME> on 2/6/17.
//  Copyright © 2017 theowl. All rights reserved.
//

import Foundation
import UIKit
import Alamofire


//looks like we'll have to add a call to this endpoint: http://api.wunderground.com/api/9caa09c5d1399971/geolookup/q/37.776289,-122.395234.json

//there's a "city" key which tells you if its a us city or not

//here are the docs: https://www.wunderground.com/weather/api/d/docs?d=data/geolookup


enum WeatherUndergroundRouter: URLRequestConvertible {
    
    //MARK: Case
    case getCurrentWeatherForLocation(CGPoint), getYesterdaysWeatherForLocation(CGPoint)
    
    
    //MARK: Property
    private static let baseURLString = "http://api.wunderground.com/api/9caa09c5d1399971/"
    
    var method: HTTPMethod {
        return .get
    }
    
    var path: String {
        switch self {
        case .getCurrentWeatherForLocation(_):
            return "conditions"
        case .getYesterdaysWeatherForLocation(_):
            return "yesterday"
{'fraction_non_alphanumeric': 0.09424920127795527, 'fraction_numerical': 0.03514376996805112, 'mean_word_length': 2.758, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3129321', 'n_tokens_mistral': 634, 'n_tokens_neox': 584, 'n_words': 144}