sugilite 0.1.3 → 0.1.4

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: b95b60e4a23157a4e22a48533537b3695c09c1c2bd89ed3cb6a91e2fdd0c7030
4
- data.tar.gz: 902dfd7f40cce5f9a096e2c8184ab5cb421fcd26a54465ddc110c2e3a2dc2e79
3
+ metadata.gz: 07a08f19bb56a16f45d3656c12820a1a52bbf9d57d76b0fc62f305c4b2bc2a6a
4
+ data.tar.gz: 925400738c35ad80b864a6ec0c4ebbc1d07764aba8ff7083f28baa0cb29471ac
5
5
  SHA512:
6
- metadata.gz: e0fde97d414fc6e8f1b7667a4ff812a91f80e910bcbc736543bc52d11b566f0a395a7776a7f0a1e1eb08d4ec62149a1fd2cdc5accfbbfdb716f4629dfcf17e96
7
- data.tar.gz: 6eb1a59c30bf9ba6b32b78df787453310ca53cb92e34c4cf8509b5f7a79551353ee5c28ea8e1f255da07ebde8f53f0b83448c90c7aad1281fd632519f9c24721
6
+ metadata.gz: aaaec7d590f10029eb1c73a11ccffb96b16fbbefba8e3be6bed69c45a4241951402ad61aa6d707cf6ca2d17c068b0f7ff7322e898edc63bb7538a38c0261ba61
7
+ data.tar.gz: b0a4a573ff42bd090f7ad5f722485e4d371196fbbca5e8b088d417c905cb16c3ed275a1d9da116d22c03787ff304133ce2206a1f94daebda6ae5a93edf4ee351
@@ -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>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="DiscordProjectSettings">
4
+ <option name="show" value="true" />
5
+ </component>
6
+ </project>
@@ -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
@@ -1,6 +1,8 @@
1
1
  # Sugilite
2
2
 
3
- Sugilite, A Gem to pull data from Twitch via the IRC chat and TMI
3
+ Sugilite, A Gem to pull data from Twitch via the IRC chat and TMI.
4
+
5
+ Working on features for Kraken and Helix APIs
4
6
 
5
7
  ## Installation
6
8
 
@@ -1,4 +1,4 @@
1
1
  module Sugilite
2
2
  # Current version 0.1.3
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
@@ -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.3
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-08-29 00:00:00.000000000 Z
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: