followers_number 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a91655cedea38e7fbb2c0a3e2c82b4b38156cf7a12c105dded623602e2c1066
|
4
|
+
data.tar.gz: ce848866f2547f355e3ff4816fb4256d329510c013f1194b50bed196bc77854f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89151c60a7cf5b6b4ea22078622d91814ce9e225f4d0a1e06b364eb12e4a7575beb53acba2015d8d92c88c77f8cade7b8874143e08824a741269c4468e9d8119
|
7
|
+
data.tar.gz: 80510d79d2ac4db3a065671ab5fc0cd4d883af39a767af7f787b9d9954bcd1881544e7996636e0af790a368c5379b8c773c0ba8cd5c05d420f253a4a8bab63db
|
@@ -2,7 +2,8 @@ module FollowersNumber
|
|
2
2
|
class Parser
|
3
3
|
MAPPING = {
|
4
4
|
'twitter.com' => FollowersNumber::Parsers::Twitter,
|
5
|
-
'instagram.com' => FollowersNumber::Parsers::Instagram
|
5
|
+
'instagram.com' => FollowersNumber::Parsers::Instagram,
|
6
|
+
'youtube.com' => FollowersNumber::Parsers::Youtube
|
6
7
|
}
|
7
8
|
|
8
9
|
def self.call(profile_url, response)
|
@@ -2,7 +2,7 @@ module FollowersNumber
|
|
2
2
|
class Validator
|
3
3
|
class InvalidProfileURL < StandardError; end
|
4
4
|
|
5
|
-
NETWORKS = %w[twitter.com instagram.com]
|
5
|
+
NETWORKS = %w[twitter.com instagram.com youtube.com]
|
6
6
|
|
7
7
|
def self.validate!(profile_url)
|
8
8
|
unless NETWORKS.include?(URI.parse(profile_url.to_s.downcase).host)
|
data/lib/followers_number.rb
CHANGED
@@ -4,6 +4,7 @@ require 'json'
|
|
4
4
|
|
5
5
|
require_relative 'followers_number/parsers/twitter'
|
6
6
|
require_relative 'followers_number/parsers/instagram'
|
7
|
+
require_relative 'followers_number/parsers/youtube'
|
7
8
|
|
8
9
|
require_relative 'followers_number/request'
|
9
10
|
require_relative 'followers_number/validator'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: followers_number
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paweł Dąbrowski
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- lib/followers_number/parser.rb
|
69
69
|
- lib/followers_number/parsers/instagram.rb
|
70
70
|
- lib/followers_number/parsers/twitter.rb
|
71
|
+
- lib/followers_number/parsers/youtube.rb
|
71
72
|
- lib/followers_number/request.rb
|
72
73
|
- lib/followers_number/validator.rb
|
73
74
|
- lib/followers_number/version.rb
|