sugilite 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/.rakeTasks +7 -0
- data/.idea/discord.xml +6 -0
- data/.idea/sugilite.iml +1 -0
- data/README.md +3 -1
- data/lib/sugilite/version.rb +1 -1
- data/lib/sugiliteKraken.rb +43 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07a08f19bb56a16f45d3656c12820a1a52bbf9d57d76b0fc62f305c4b2bc2a6a
|
4
|
+
data.tar.gz: 925400738c35ad80b864a6ec0c4ebbc1d07764aba8ff7083f28baa0cb29471ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaaec7d590f10029eb1c73a11ccffb96b16fbbefba8e3be6bed69c45a4241951402ad61aa6d707cf6ca2d17c068b0f7ff7322e898edc63bb7538a38c0261ba61
|
7
|
+
data.tar.gz: b0a4a573ff42bd090f7ad5f722485e4d371196fbbca5e8b088d417c905cb16c3ed275a1d9da116d22c03787ff304133ce2206a1f94daebda6ae5a93edf4ee351
|
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build sugilite-0.1.3.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Compile all the extensions" fullCmd="compile" taksId="compile" /><RakeGroup description="" fullCmd="" taksId="compile"><RakeTask description="Compile sugilite" fullCmd="compile:sugilite" taksId="sugilite" /><RakeGroup description="" fullCmd="" taksId="sugilite"><RakeTask description="" fullCmd="compile:sugilite:x86_64-linux" taksId="x86_64-linux" /></RakeGroup><RakeTask description="" fullCmd="compile:x86_64-linux" taksId="x86_64-linux" /></RakeGroup><RakeTask description="Build and install sugilite-0.1.3.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install sugilite-0.1.3.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.3 and build and push sugilite-0.1.3.gem to https://rubygems.org" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run tests" fullCmd="test" taksId="test" /><RakeGroup description="" fullCmd="" taksId="copy"><RakeGroup description="" fullCmd="" taksId="sugilite"><RakeGroup description="" fullCmd="" taksId="x86_64-linux"><RakeTask description="" fullCmd="copy:sugilite:x86_64-linux:2.6.3" taksId="2.6.3" /></RakeGroup></RakeGroup></RakeGroup><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="lib" taksId="lib" /><RakeTask description="" fullCmd="lib/sugilite" taksId="lib/sugilite" /><RakeTask description="" fullCmd="lib/sugilite/sugilite.so" taksId="lib/sugilite/sugilite.so" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup><RakeTask description="" fullCmd="tmp" taksId="tmp" /><RakeTask description="" fullCmd="tmp/x86_64-linux" taksId="tmp/x86_64-linux" /><RakeTask description="" fullCmd="tmp/x86_64-linux/stage" taksId="tmp/x86_64-linux/stage" /><RakeTask description="" fullCmd="tmp/x86_64-linux/stage/lib" taksId="tmp/x86_64-linux/stage/lib" /><RakeTask description="" fullCmd="tmp/x86_64-linux/stage/lib/sugilite" taksId="tmp/x86_64-linux/stage/lib/sugilite" /><RakeTask description="" fullCmd="tmp/x86_64-linux/sugilite" taksId="tmp/x86_64-linux/sugilite" /><RakeTask description="" fullCmd="tmp/x86_64-linux/sugilite/2.6.3" taksId="tmp/x86_64-linux/sugilite/2.6.3" /><RakeTask description="" fullCmd="tmp/x86_64-linux/sugilite/2.6.3/Makefile" taksId="tmp/x86_64-linux/sugilite/2.6.3/Makefile" /><RakeTask description="" fullCmd="tmp/x86_64-linux/sugilite/2.6.3/sugilite.so" taksId="tmp/x86_64-linux/sugilite/2.6.3/sugilite.so" /></RakeGroup></Settings>
|
data/.idea/discord.xml
ADDED
data/.idea/sugilite.iml
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
<content url="file://$MODULE_DIR$" />
|
8
8
|
<orderEntry type="jdk" jdkName="RVM: ruby-2.6.3" jdkType="RUBY_SDK" />
|
9
9
|
<orderEntry type="sourceFolder" forTests="false" />
|
10
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.2, RVM: ruby-2.6.3) [gem]" level="application" />
|
10
11
|
<orderEntry type="library" scope="PROVIDED" name="domain_name (v0.5.20190701, RVM: ruby-2.6.3) [gem]" level="application" />
|
11
12
|
<orderEntry type="library" scope="PROVIDED" name="eventmachine (v1.2.7, RVM: ruby-2.6.3) [gem]" level="application" />
|
12
13
|
<orderEntry type="library" scope="PROVIDED" name="faye-websocket (v0.10.9, RVM: ruby-2.6.3) [gem]" level="application" />
|
data/README.md
CHANGED
data/lib/sugilite/version.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'oj'
|
5
|
+
require 'net/http'
|
6
|
+
require 'uri'
|
7
|
+
|
8
|
+
# Twitch Kraken API tools
|
9
|
+
module SugiliteKraken
|
10
|
+
# retrieve channel chatrooms from Twitch Kraken
|
11
|
+
class GetChatrooms
|
12
|
+
# direct access to the response from net::http
|
13
|
+
attr_accessor(:response)
|
14
|
+
|
15
|
+
# get things up and running
|
16
|
+
def initialize(channel_id, client_id, auth)
|
17
|
+
# channel id of Twitch Channel
|
18
|
+
@channel_id = channel_id
|
19
|
+
# client id of user trying to access Twitch api
|
20
|
+
@client_id = client_id
|
21
|
+
# OAuth of person trying to access Twitch API
|
22
|
+
@auth = "OAuth #{auth}"
|
23
|
+
|
24
|
+
uri = URI.parse("https://api.twitch.tv/kraken/chat/#{@channel_id}/rooms")
|
25
|
+
request = Net::HTTP::Get.new(uri)
|
26
|
+
request['Accept'] = 'application/vnd.twitchtv.v5+json'
|
27
|
+
request['Client-Id'] = @client_id
|
28
|
+
request['Authorization'] = @auth
|
29
|
+
|
30
|
+
req_options = {
|
31
|
+
use_ssl: uri.scheme == 'https'
|
32
|
+
}
|
33
|
+
@response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
|
34
|
+
http.request(request)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# get chatrooms that Kraken is aware of
|
39
|
+
def getrooms
|
40
|
+
Oj.load(@response.body, mode: :object)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sugilite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MediaMagnet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -139,6 +139,8 @@ extra_rdoc_files: []
|
|
139
139
|
files:
|
140
140
|
- ".gitignore"
|
141
141
|
- ".idea/.gitignore"
|
142
|
+
- ".idea/.rakeTasks"
|
143
|
+
- ".idea/discord.xml"
|
142
144
|
- ".idea/misc.xml"
|
143
145
|
- ".idea/modules.xml"
|
144
146
|
- ".idea/sugilite.iml"
|
@@ -160,6 +162,7 @@ files:
|
|
160
162
|
- lib/sugilite.rb
|
161
163
|
- lib/sugilite/version.rb
|
162
164
|
- lib/sugiliteIRC.rb
|
165
|
+
- lib/sugiliteKraken.rb
|
163
166
|
- sugilite.gemspec
|
164
167
|
homepage: https://gitlab.com/MediaMagnet/Sugilite
|
165
168
|
licenses:
|