diff --git a/README.md b/README.md index 4fc61de..86e41e8 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,12 @@ token = *Note:* Auth.elm is in `.gitignore` to avoid accidentally checking in an API secret. -## Start with Stage 1 +## Start with Part 1 Run this at the terminal: ```bash -cd stages/1 +cd part1 ``` -Now head over to the [README for stage 1](https://github.com/rtfeldman/elm-workshop/tree/master/stages/1)! +Now head over to the [README for Part 1](https://github.com/rtfeldman/elm-workshop/tree/master/part1)! diff --git a/elm-package.json b/elm-package.json deleted file mode 100644 index 54765dc..0000000 --- a/elm-package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "version": "1.0.0", - "summary": "helpful summary of your project, less than 80 characters", - "repository": "https://github.com/user/project.git", - "license": "BSD3", - "source-directories": [ - "." - ], - "exposed-modules": [], - "dependencies": { - "elm-lang/core": "3.0.0 <= v < 4.0.0" - }, - "elm-version": "0.16.0 <= v < 0.17.0" -} \ No newline at end of file diff --git a/part1/Main.elm b/part1/Main.elm index 56a2cad..c3d8605 100644 --- a/part1/Main.elm +++ b/part1/Main.elm @@ -2,6 +2,7 @@ module Main (..) where import Html exposing (..) import Html.Attributes exposing (..) +import Auth model = diff --git a/part1/elm-package.json b/part1/elm-package.json index 2b33bdf..068fa12 100644 --- a/part1/elm-package.json +++ b/part1/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part10/ElmHub.elm b/part10/ElmHub.elm index 0403b75..38aead5 100644 --- a/part10/ElmHub.elm +++ b/part10/ElmHub.elm @@ -4,6 +4,7 @@ import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) import Http +import Auth import Task exposing (Task) import Effects exposing (Effects) import Json.Decode exposing (Decoder, (:=)) @@ -18,9 +19,11 @@ searchFeed query = let -- See https://developer.github.com/v3/search/#example for how to customize! url = - "https://api.github.com/search/repositories?q=" + "https://api.github.com/search/repositories?access_token=" + ++ Auth.token + ++ "&q=" ++ query - ++ "+language:elm" + ++ "+language:elm&sort=stars&order=desc" task = Http.get responseDecoder url diff --git a/part10/elm-package.json b/part10/elm-package.json index 5728b71..ba40466 100644 --- a/part10/elm-package.json +++ b/part10/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part11/ElmHub.elm b/part11/ElmHub.elm index 24667ee..8476dbf 100644 --- a/part11/ElmHub.elm +++ b/part11/ElmHub.elm @@ -5,6 +5,7 @@ import Html.Attributes exposing (..) import Html.Events exposing (..) import Html.Lazy exposing (..) import Http +import Auth import Task exposing (Task) import Effects exposing (Effects) import Json.Decode exposing (Decoder, (:=)) @@ -19,9 +20,11 @@ searchFeed query = let -- See https://developer.github.com/v3/search/#example for how to customize! url = - "https://api.github.com/search/repositories?q=" + "https://api.github.com/search/repositories?access_token=" + ++ Auth.token + ++ "&q=" ++ query - ++ "+language:elm" + ++ "+language:elm&sort=stars&order=desc" task = Http.get responseDecoder url diff --git a/part11/elm-package.json b/part11/elm-package.json index ea197b6..7f72d5a 100644 --- a/part11/elm-package.json +++ b/part11/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part12/Component/ElmHub.elm b/part12/Component/ElmHub.elm index e825e6d..8bf3f90 100644 --- a/part12/Component/ElmHub.elm +++ b/part12/Component/ElmHub.elm @@ -5,6 +5,7 @@ import Html.Attributes exposing (..) import Html.Events exposing (..) import Html.Lazy exposing (..) import Http +import Auth import Task exposing (Task) import Effects exposing (Effects) import Json.Decode exposing (Decoder, (:=)) @@ -18,7 +19,9 @@ searchFeed query = let -- See https://developer.github.com/v3/search/#example for how to customize! url = - "https://api.github.com/search/repositories?q=" + "https://api.github.com/search/repositories?access_token=" + ++ Auth.token + ++ "&q=" ++ query ++ "+language:elm&sort=stars&order=desc" diff --git a/part12/elm-package.json b/part12/elm-package.json index 5728b71..ba40466 100644 --- a/part12/elm-package.json +++ b/part12/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part2/Main.elm b/part2/Main.elm index 3fda197..9ee8302 100644 --- a/part2/Main.elm +++ b/part2/Main.elm @@ -2,6 +2,7 @@ module Main (..) where import Html exposing (..) import Html.Attributes exposing (..) +import Auth type alias Model = diff --git a/part2/elm-package.json b/part2/elm-package.json index 2b33bdf..068fa12 100644 --- a/part2/elm-package.json +++ b/part2/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part3/Main.elm b/part3/Main.elm index 72bbbd1..f69791a 100644 --- a/part3/Main.elm +++ b/part3/Main.elm @@ -3,6 +3,7 @@ module Main (..) where import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) +import Auth import StartApp.Simple as StartApp import Signal exposing (Address) diff --git a/part3/elm-package.json b/part3/elm-package.json index 588e1cf..a500a2f 100644 --- a/part3/elm-package.json +++ b/part3/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part4/Main.elm b/part4/Main.elm index b33483d..f44d303 100644 --- a/part4/Main.elm +++ b/part4/Main.elm @@ -3,6 +3,7 @@ module Main (..) where import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) +import Auth import StartApp.Simple as StartApp import Json.Encode import Signal exposing (Address) diff --git a/part4/elm-package.json b/part4/elm-package.json index 1447aac..f153ff0 100644 --- a/part4/elm-package.json +++ b/part4/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part5/Main.elm b/part5/Main.elm index 596540f..d7de77e 100644 --- a/part5/Main.elm +++ b/part5/Main.elm @@ -3,6 +3,7 @@ module Main (..) where import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) +import Auth import StartApp import Http import Task exposing (Task) @@ -37,7 +38,9 @@ searchFeed query = let -- See https://developer.github.com/v3/search/#example for how to customize! url = - "https://api.github.com/search/repositories?q=" + "https://api.github.com/search/repositories?access_token=" + ++ Auth.token + ++ "&q=" ++ query ++ "+language:elm&sort=stars&order=desc" in diff --git a/part5/elm-package.json b/part5/elm-package.json index 5728b71..ba40466 100644 --- a/part5/elm-package.json +++ b/part5/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part7/ElmHub.elm b/part7/ElmHub.elm index ad2ff08..2151a61 100644 --- a/part7/ElmHub.elm +++ b/part7/ElmHub.elm @@ -4,6 +4,7 @@ import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) import Http +import Auth import Task exposing (Task) import Effects exposing (Effects) import Json.Decode exposing (Decoder, (:=)) @@ -16,7 +17,9 @@ searchFeed address query = let -- See https://developer.github.com/v3/search/#example for how to customize! url = - "https://api.github.com/search/repositories?q=" + "https://api.github.com/search/repositories?access_token=" + ++ Auth.token + ++ "&q=" ++ query ++ "+language:elm&sort=stars&order=desc" diff --git a/part7/elm-package.json b/part7/elm-package.json index 5728b71..ba40466 100644 --- a/part7/elm-package.json +++ b/part7/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part8/ElmHub.elm b/part8/ElmHub.elm index 845740a..958366a 100644 --- a/part8/ElmHub.elm +++ b/part8/ElmHub.elm @@ -4,6 +4,7 @@ import Html exposing (..) import Html.Attributes exposing (..) import Html.Events exposing (..) import Http +import Auth import Task exposing (Task) import Effects exposing (Effects) import Json.Decode exposing (Decoder, (:=)) @@ -17,9 +18,11 @@ searchFeed query = let -- See https://developer.github.com/v3/search/#example for how to customize! url = - "https://api.github.com/search/repositories?q=" + "https://api.github.com/search/repositories?access_token=" + ++ Auth.token + ++ "&q=" ++ query - ++ "+language:elm" + ++ "+language:elm&sort=stars&order=desc" task = Http.get responseDecoder url diff --git a/part8/elm-package.json b/part8/elm-package.json index 5728b71..ba40466 100644 --- a/part8/elm-package.json +++ b/part8/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": { diff --git a/part9/ElmHub.elm b/part9/ElmHub.elm index cc08d0b..6300c50 100644 --- a/part9/ElmHub.elm +++ b/part9/ElmHub.elm @@ -5,6 +5,7 @@ import Html.Attributes exposing (..) import Html.Events exposing (..) import Html.Lazy exposing (..) import Http +import Auth import Task exposing (Task) import Effects exposing (Effects) import Json.Decode exposing (Decoder, (:=)) @@ -19,9 +20,11 @@ searchFeed query = let -- See https://developer.github.com/v3/search/#example for how to customize! url = - "https://api.github.com/search/repositories?q=" + "https://api.github.com/search/repositories?access_token=" + ++ Auth.token + ++ "&q=" ++ query - ++ "+language:elm" + ++ "+language:elm&sort=stars&order=desc" task = Http.get responseDecoder url diff --git a/part9/elm-package.json b/part9/elm-package.json index 5728b71..ba40466 100644 --- a/part9/elm-package.json +++ b/part9/elm-package.json @@ -4,7 +4,7 @@ "repository": "https://github.com/rtfeldman/elm-workshop.git", "license": "BSD-3-Clause", "source-directories": [ - "." + ".", ".." ], "exposed-modules": [], "dependencies": {