Skip to content
This repository has been archived by the owner on Jan 3, 2021. It is now read-only.

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
ellisvalentiner committed Mar 18, 2018
1 parent fd1142e commit 2cf6f81
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ notifications:
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia --track-allocation=user -e 'Pkg.clone(pwd()); Pkg.build("DarkSky"); Pkg.test("DarkSky"; coverage=true)'
- julia -e 'cd(Pkg.dir("DarkSky")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
- julia -e 'cd(Pkg.dir("DarkSky")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder()); Coveralls.submit(process_folder());'
after_success:
- julia -e 'Pkg.add("Documenter")'
- julia -e 'cd(Pkg.dir("DarkSky")); include(joinpath("docs", "make.jl"))'
10 changes: 7 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
using Documenter, DarkSky
using Documenter
using DarkSky

makedocs()
makedocs(
modules = [DarkSky],
doctest = false
)

deploydocs(
deps = Deps.pip("mkdocs"),
deps = Deps.pip("pygments", "mkdocs", "mkdocs-material", "python-markdown-math"),
repo = "github.com/ellisvalentiner/DarkSky.jl.git",
julia = "0.6"
)
5 changes: 5 additions & 0 deletions src/DarkSky.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ function _get_json(url::String, verbose::Bool)
end
end

"""
forecast(latitude::Float64, longitude::Float64; verbose::Bool=true)
Make a "Forecast Request", returns the current weather forecast for the next week.
"""
forecast(latitude::Float64, longitude::Float64; verbose::Bool=true) = _get_json("https://api.darksky.net/forecast/$(ENV["DARKSKY_API_KEY"])/$latitude,$longitude", verbose)
forecast(latitude::Float64, longitude::Float64, time::DateTime; verbose::Bool=true) = _get_json("https://api.darksky.net/forecast/$(ENV["DARKSKY_API_KEY"])/$latitude,$longitude,$time", verbose)
export forecast
Expand Down

0 comments on commit 2cf6f81

Please sign in to comment.