Giter Club home page Giter Club logo

forecastio's People

Contributors

abstract45 avatar angelostavrow avatar fulldecent avatar joeljfischer avatar sxg avatar vortec4800 avatar wrutkowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forecastio's Issues

Forecast.io is now DarkSky.net

Copied from an email to forecast.io registered accounts:

First, we’re consolidating our branding under the Dark Sky name, getting rid of Forecast.io entirely. We’ve found that people often don’t realize the two are related, and this causes a lot of confusion.

This means a few things for you as a developer:

"open" keyword generates compiler errors (Swift 3.0)

/// A class to interact with the Dark Sky API.
open class APIClient : NSObject {

APIClient.swift:12:1: Expressions are not allowed at the top level
APIClient.swift:12:5: Consecutive statements on a line must be separated by ';'
APIClient.swift:12:1: Ambiguous use of 'open'

I was able to compile replacing the instances of "open" with "public".

(Xcode 8 beta 5, iOS 10, Swift 3)

Module file was created by an older version of the compiler

Hello,

I'm getting following error as I installed ForecastIO pod:

/---/---/ForecastViewController.swift:10:8: Module file was created by an older version of the compiler; rebuild 'ForecastIO' and try again: /---/---/Library/Developer/Xcode/DerivedData/SwiftyWeather-fcvyupiaiunpivcfwaqvzlakstdf/Build/Products/Debug-iphonesimulator/ForecastIO.framework/Modules/ForecastIO.swiftmodule/x86_64.swiftmodule

Any clue?

Receiving 'nil' for apiRequestsCount and responseTime

Everything about the API and ForecastIO is working well, except having trouble with getting the metadata for the apiRequestsCount and responseTime. Not sure if the issue is in my code, in ForecastIO, or in the DarkSky API

My code:

self.client.getForecast(latitude: lat, longitude: lon, excludeFields: [.alerts, .daily, .flags, .minutely]) { result in
            switch result {
            case .success(let currentForecast, let requestMetadata):
                //  We got the current forecast!
                if let currentFeelsTemperature: Double = currentForecast.currently?.temperature {
                    print(currentFeelsTemperature)
                    DispatchQueue.main.async {
                        self.feelsLikeTmpLbl.text = String(Int(round(currentFeelsTemperature)))
                    }
                }
                if let summaryInfo: String = currentForecast.currently?.summary {
                    print(summaryInfo)
                    DispatchQueue.main.async {
                        self.summaryLbl.text = summaryInfo
                    }
                }
                print(requestMetadata)
            case .failure(let error):
                //  Uh-oh. We have an error!
                print(error)
            }
        }

Returns:

RequestMetadata(cacheControl: Optional("max-age=3600"), apiRequestsCount: nil, responseTime: nil)

Manually Installing without Pod

Are there instructions on how to install all of the dependencies without using Pods?

I am getting error:

Library not loaded: @rpath/ForecastIO.framework/ForecastIO

Thanks.

Crash in alert parsing when there is no "expires" defined

I'm getting a crash at line 35 in Alert.swift

The code assumes that the "expires" property is required, but the documentation says its an optional.

expires optional
The UNIX time at which the alert will expire. (Some alerts sources, unfortunately, do not define expiration time, and in these cases this parameter will not be defined.)

https://darksky.net/dev/docs/response

There is currently an alert with no "expire" property at Whistler, but because alerts are temporary in nature, the I'm sure the repro won't last:
https://api.darksky.net/forecast/[key]/50.1149639,-122.9486474

"alerts": [ { "title": "Snowfall Warning", "regions": [ "Sunshine Coast" ], "severity": "warning", "time": 1486412460, "description": "Bands of snow rotating around a low pressure system off the coast will continue to stream across southern Vancouver Island, the Sunshine Coast and the Lower Mainland today. Snowfall amounts across these regions will vary widely depending on the location and intensity of the individual bands. Local amounts of 5 cm or more are likely. Be prepared to adjust your driving with changing road conditions. Visibility may be suddenly reduced at times in heavy snow. Please continue to monitor alerts and forecasts issued by Environment Canada. To report severe weather, send an email to [email protected] or tweet reports to #BCStorm.", "uri": "https://weather.gc.ca/warnings/report_e.html?bc38" } ]

Don't manually set APIClient's default units to US

Manually setting the default units could cause a lot of confusion if (for some reason) Forecast.io ever decides to change the default. The getForecast method should just make the GET request without specifying the units URL parameter unless the user sets the units property on APIClient.

Look over TravisCI integration

The .travis.yml file is basically just a copy of the AlamoFire one right now. A lot of builds seem to be passing when they shouldn't. This needs to be fixed ASAP.

Forecast.swift: Unable to bridge NSNumber to Float.

When the public init(fromJSON json: NSDictionary) (line 68) is called and it attempts to bridge the type NSNumber to Float, it causes a fatal error. I am running it with Swift 4 with iOS 11.3 and Xcode beta 9.3. Has anybody heard of this issue?

Get extended hourly forecast

How could I get extended hourly forecast (by using extend=hourly option on get-request) for the next seven days using this library?
Basically, it's not only about extended hourly forecast. There is a lot of request options described in API docs (and "extend=hourly" just one of them), so could it be used with this library?

Newbie question

Hello.
Very nice library first of all!

Is there any way to learn the weather for a certain date? Because i have lat and lon but i just want to change the date and not to see what the weather is now!
Thanks a lot :D

Future 7 days weather forecast

How to get weather of 7 up-coming days using your Wrapper library?

As docs says
The Forecast API lets you query for most locations on the globe, and returns:

Current conditions
Minute-by-minute forecasts out to 1 hour (where available)
Hour-by-hour forecasts out to 48 hours
Day-by-day forecasts out to 7 days

Initialization Forecast.swift crash

We detected yesterday that the library was crashing few hours. After that, we didn't see the crash anymore.

Crashed: NSOperationQueue 0x1740346c0 :: NSOperation 0x174c5d340 (QOS: DEFAULT)
0 ForecastIO 0x1012e710c specialized Forecast.init(fromJSON : NSDictionary) -> Forecast (Forecast.swift:69)
1 ForecastIO 0x1012dd2d0 specialized DarkSkyClient.(getForecast(url : URL, completionHandler : (Result) -> ()) -> ()).(closure #1) (Forecast.swift)
2 ForecastIO 0x1012dd084 partial apply for DarkSkyClient.(getForecast(url : URL, completionHandler : (Result) -> ()) -> ()).(closure #1) (DarkSkyClient.swift)
3 CFNetwork 0x18a7c934c __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
4 CFNetwork 0x18a7e1048 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 148
5 Foundation 0x18ac8e854 NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 16
6 Foundation 0x18abd37b0 -[NSBlockOperation main] + 96
7 Foundation 0x18abc3b68 -[__NSOperationInternal _start:] + 612
8 Foundation 0x18ac90bf0 __NSOQSchedule_f + 228
9 libdispatch.dylib 0x1890769a0 _dispatch_client_callout + 16
10 libdispatch.dylib 0x189084ad4 _dispatch_queue_serial_drain + 928
11 libdispatch.dylib 0x18907a2cc _dispatch_queue_invoke + 884
12 libdispatch.dylib 0x189086a50 _dispatch_root_queue_drain + 540
13 libdispatch.dylib 0x1890867d0 _dispatch_worker_thread3 + 124
14 libsystem_pthread.dylib 0x18927f100 _pthread_wqthread + 1096
15 libsystem_pthread.dylib 0x18927ecac start_wqthread + 4

Any support for Decodable?

Is there a way to pass in our Decodable object so that when the JSON returns in the response, it can be decoded into our custom data model?

InvalidJSON Error

In using the sample project i'm receiving an interesting console message:
invalidJSON(10 bytes)

I verified my trial key works based on the sample link in the darksky console. Any thoughts as to what this is?

Exit Code 66

Receiving this error after running 'carthage update'
I've also seen other resolved issues in the carthage repo that require you to remove the CarthageKit folder from Library/Cache but I've already tried that.

Cartfile:
github "sxg/ForecastIO" "swift3"

A shell task (/usr/bin/xcrun xcodebuild -workspace /Users/tylermrolfe/Developer/Fake Name/Carthage/Checkouts/ForecastIO/ForecastIO.xcworkspace -scheme "Pods-ForecastIO OS X Tests-ForecastIO" -configuration Release CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean -showBuildSettings) failed with exit code 66:
xcodebuild: error: Scheme Pods-ForecastIO OS X Tests-ForecastIO is not currently configured for the clean action.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.