{"size": 573, "ext": "js", "max_stars_repo_path": "services/city-service.js", "max_stars_repo_name": "LatinWarrior/weatherApp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "services/city-service.js", "max_issues_repo_name": "LatinWarrior/weatherApp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "services/city-service.js", "max_forks_repo_name": "LatinWarrior/weatherApp", "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": 22.92, "max_line_length": 127, "alphanum_fraction": 0.5253054101}
weatherApp.service('cityService', function () {

    this.city = 'New York, NY';

});

weatherApp.service('weatherService', ['$resource', function ($resource) {

    this.GetWeather = function (city, days) {
        
        var weatherUrl = $resource('//api.openweathermap.org/data/2.5/forecast/daily?APPID=ba5424ca3f94432450390a74e1dfc5c1', {
            callback: 'JSON_CALLBACK'
        }, {
            get: {
                method: 'JSONP'
            }
        });

        return weatherUrl.get({
            q: city,
            cnt: days
        });
    };

}]);