File tree 4 files changed +12
-30
lines changed
4 files changed +12
-30
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ use Mix.Config
30
30
# import_config "#{Mix.env}.exs"
31
31
32
32
config :extwitter , :oauth , [
33
- consumer_key: "" ,
34
- consumer_secret: "" ,
35
- access_token: "" ,
36
- access_token_secret: ""
33
+ consumer_key: "Fw1ddOMbixLPOMWFvP2NZjEX9 " ,
34
+ consumer_secret: "2FHB8gEApM9aPwhh0EduwEWz9Yinv5lEKmIDpOVlyJTTB9uK70 " ,
35
+ access_token: "17117998-ZDEK0zkSW8mcNJISPRRJwFnMvtkJwccm8Z6EH40ak " ,
36
+ access_token_secret: "yYB8Q8JcVfthIP5TjlL2pYJOQ7qk9UPsLpjp6IaSkpemt "
37
37
]
Original file line number Diff line number Diff line change @@ -8,8 +8,14 @@ defmodule Zapdos do
8
8
def get_tweets ( query ) do
9
9
ExTwitter . stream_filter ( track: query )
10
10
|> Stream . map ( fn ( tweet ) -> tweet . text end )
11
- |> Stream . map ( fn ( text ) -> ColorParsing . get_color ( text ) |> ColorParsing . hex_to_number |> IO . puts end )
11
+ |> Stream . map ( & ( update_color ( & 1 ) ) )
12
12
|> Enum . to_list
13
13
end
14
14
15
+ defp update_color ( text ) do
16
+ ColorParsing . get_color ( text )
17
+ |> ColorParsing . parse_rgb_hex
18
+ |> Lightning.Control . change_color ( 150 )
19
+ end
20
+
15
21
end
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ defmodule Zapdos.Mixfile do
35
35
defp deps do
36
36
[
37
37
{ :extwitter , "~> 0.8" } ,
38
+ { :lightning , in_umbrella: true }
38
39
]
39
40
end
40
41
end
You can’t perform that action at this time.
0 commit comments