hurriyet_cli 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/hurriyet_cli/cli.rb +6 -6
- data/lib/hurriyet_cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f90df19b7d6a62e3455abbd25ffdc417023384d7
|
4
|
+
data.tar.gz: 838fdb8a1c01ff7ce2941cc143260274c490fd4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24211591f3a594050bea7acbfa00f5c852ec478f5fb9f1c1d42d79628f0cafcd1103896df878eec193219c80a0bb6ca8a86cc41a0b00db4e999b5c8fba86be8f
|
7
|
+
data.tar.gz: 31d1fa59e27f0f5101c2d7a1a87edf0cc7743254f62f8d7487e6f5b0c0b66c9d9ecb9b33ddea3ffc86a6e02b22197e230446660b6e44195bc2031abcb8164976
|
data/README.md
CHANGED
@@ -20,10 +20,10 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
Export your ```
|
23
|
+
Export your ```HURRIYET_API_KEY``` that you get from [https://developers.hurriyet.com.tr](https://developers.hurriyet.com.tr)
|
24
24
|
|
25
25
|
```bash
|
26
|
-
$ export
|
26
|
+
$ export HURRIYET_API_KEY=<YOUR_HURRIYET_API_KEY>
|
27
27
|
```
|
28
28
|
|
29
29
|
```bash
|
data/lib/hurriyet_cli/cli.rb
CHANGED
@@ -4,14 +4,14 @@ require "thor/runner"
|
|
4
4
|
|
5
5
|
module HurriyetCli
|
6
6
|
class HammerOfTheGods < Thor
|
7
|
-
unless ENV['
|
8
|
-
raise 'Please add your
|
7
|
+
unless ENV['HURRIYET_API_KEY']
|
8
|
+
raise 'Please add your HURRIYET_API_KEY'
|
9
9
|
end
|
10
10
|
|
11
11
|
desc "articles", "Fetch all articles"
|
12
12
|
method_option :top, desc: "Fetch N articles"
|
13
13
|
def articles
|
14
|
-
client = Hurriyet::Client.new(ENV['
|
14
|
+
client = Hurriyet::Client.new(ENV['HURRIYET_API_KEY'])
|
15
15
|
articles = HurriyetCli::Articles.new(client)
|
16
16
|
if options[:top]
|
17
17
|
puts "Fetching #{options[:top]} articles"
|
@@ -25,7 +25,7 @@ module HurriyetCli
|
|
25
25
|
desc "columns", "Fetch all columns"
|
26
26
|
method_option :top, alias: :t, desc: "Fetch N columns"
|
27
27
|
def columns
|
28
|
-
client = Hurriyet::Client.new(ENV['
|
28
|
+
client = Hurriyet::Client.new(ENV['HURRIYET_API_KEY'])
|
29
29
|
columns = HurriyetCli::Columns.new(client)
|
30
30
|
if options[:top]
|
31
31
|
puts "Fetching #{options[:top]} columns"
|
@@ -39,7 +39,7 @@ module HurriyetCli
|
|
39
39
|
desc "pages", "Fetch all pages"
|
40
40
|
method_option :top, alias: :t, desc: "Fetch N pages"
|
41
41
|
def pages
|
42
|
-
client = Hurriyet::Client.new(ENV['
|
42
|
+
client = Hurriyet::Client.new(ENV['HURRIYET_API_KEY'])
|
43
43
|
pages = HurriyetCli::Pages.new(client)
|
44
44
|
if options[:top]
|
45
45
|
puts "Fetching #{options[:top]} pages"
|
@@ -53,7 +53,7 @@ module HurriyetCli
|
|
53
53
|
desc "writers", "Fetch all writers"
|
54
54
|
method_option :top, alias: :t, desc: "Fetch N writers"
|
55
55
|
def writers
|
56
|
-
client = Hurriyet::Client.new(ENV['
|
56
|
+
client = Hurriyet::Client.new(ENV['HURRIYET_API_KEY'])
|
57
57
|
writers = HurriyetCli::Writers.new(client)
|
58
58
|
if options[:top]
|
59
59
|
puts "Fetching #{options[:top]} writers"
|
data/lib/hurriyet_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hurriyet_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ender Ahmet Yurt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|