DreamTeam 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbc0891f61c02a489e8c142f428db4d1e8dcc527662921d8b2055def22198dfc
|
4
|
+
data.tar.gz: b7811901c4e374a5089e927fb29c55e53033fe344110718bfc16b71f02ba738b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96e5ae7a7f81a4e4ec2557edeaab937e95c90b07a175584bd0ad9c255ce361c2970a4e0433b753655f673b94ce64231ce025248dc098ec61769a84b612a43e7d
|
7
|
+
data.tar.gz: c522165470f8af76fa13ae79866fb2ead7e5ced3c6f6b6d7ce5f999e850fa337905dc1ee0af3ce3900f11e29a576b2fdbdd0c88220689db6f98de70e84abcf7d
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative 'parsing_films'
|
2
2
|
|
3
|
-
def create_table_with_film
|
4
|
-
fileHtml = File.new("
|
3
|
+
def create_table_with_film(path)
|
4
|
+
fileHtml = File.new(path + "/table_film.html", "w+")
|
5
5
|
|
6
6
|
fileHtml.puts "<style>
|
7
7
|
.table_dark {
|
@@ -76,4 +76,4 @@ end
|
|
76
76
|
|
77
77
|
fileHtml.puts "</table>"
|
78
78
|
fileHtml.close
|
79
|
-
end
|
79
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative 'parsing_games'
|
2
2
|
|
3
|
-
def create_table_with_user_game(user_id)
|
4
|
-
file_html = File.new("
|
3
|
+
def create_table_with_user_game(path, user_id)
|
4
|
+
file_html = File.new(path + "/table_game.html", "w+")
|
5
5
|
user_info = get_user_information(user_id)
|
6
6
|
file_html.puts "<style type='text/css'>
|
7
7
|
.table {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'open-uri'
|
2
2
|
require 'nokogiri'
|
3
|
-
require_relative 'api_key'
|
4
3
|
|
5
4
|
def get_user_information(steam_id)
|
6
5
|
url = Nokogiri::HTML5(URI.open('https://steamcommunity.com/profiles/' + steam_id + '/?xml=1')).to_s
|
@@ -13,7 +12,7 @@ def get_user_games(steam_id)
|
|
13
12
|
res = []
|
14
13
|
begin
|
15
14
|
url = Nokogiri::HTML5(URI.open('https://api.steampowered.com/IPlayerService/GetOwnedGames/v1/?steamid=' +
|
16
|
-
+ steam_id + '&key=' +
|
15
|
+
+ steam_id + '&key=' + 'FB8E10E3C18DFD06F605ACF4D049866A')).to_s
|
17
16
|
rescue
|
18
17
|
return res
|
19
18
|
end
|
data/lib/DreamTeam/html_main.rb
CHANGED
@@ -4,10 +4,10 @@ require 'DreamTeam/Films/html_table'
|
|
4
4
|
module DreamTeam
|
5
5
|
module Html_main
|
6
6
|
class Html_main_page
|
7
|
-
def create_main(steam_id)
|
8
|
-
create_table_with_user_game(steam_id)
|
9
|
-
create_table_with_film
|
10
|
-
file_html = File.new('
|
7
|
+
def create_main(path, steam_id)
|
8
|
+
create_table_with_user_game(path, steam_id)
|
9
|
+
create_table_with_film(path)
|
10
|
+
file_html = File.new(path + '/main_table.html', 'w+')
|
11
11
|
file_html.puts "<!DOCTYPE html>
|
12
12
|
<html>
|
13
13
|
<head>
|
data/lib/DreamTeam/version.rb
CHANGED