psapi 0.0.1 → 0.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 +4 -4
- data/lib/psapi/channel.rb +2 -0
- data/lib/psapi/settings.rb +34 -1
- data/lib/psapi/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: 924972d9d9ee300ec064098f9b08f930b5850354
|
4
|
+
data.tar.gz: 9e8acfd31ba055da1868d2328f13a7147aa7313a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cedbf32b425e3b1322f7779ce48dce09ed655147a239fb4f54248832513892df477c484d00619db0c52a2eff0073385b6ee1c489e251892dc3f42f35b74be4f
|
7
|
+
data.tar.gz: a7b6f038dcc8485a5dcb6a511153df6cee643da28719363bc50fd8e149fd6c703479c98341223c13b6eb0ce9eb362bbab136c8f228a951adbede8d1d61a4d1fc
|
data/lib/psapi/channel.rb
CHANGED
@@ -5,10 +5,12 @@ module Psapi
|
|
5
5
|
Channel.new({ 'channelId' => id, 'status' => getChannelStatus(id) }.merge(getChannelInfo(id)))
|
6
6
|
end
|
7
7
|
|
8
|
+
attr_accessor :channel_id
|
8
9
|
attr_accessor :status, :info
|
9
10
|
attr_accessor :track
|
10
11
|
|
11
12
|
def initialize(hash = {})
|
13
|
+
super
|
12
14
|
@status = Status.new(hash['status'] || {})
|
13
15
|
@info = Info.new(hash['info'] || {})
|
14
16
|
@track = Track.new(hash['track'])
|
data/lib/psapi/settings.rb
CHANGED
@@ -1,5 +1,38 @@
|
|
1
1
|
module Psapi
|
2
|
-
class Settings
|
2
|
+
class Settings < API_Object
|
3
|
+
# チャンネルの自動切断
|
4
|
+
class ChannelCleaner < API_Object
|
5
|
+
def initialize(hash)
|
6
|
+
super
|
7
|
+
end
|
8
|
+
|
9
|
+
attr_accessor :inactive_limit, :mode
|
10
|
+
|
11
|
+
def mode_string
|
12
|
+
case mode
|
13
|
+
when 0
|
14
|
+
'(自動切断しない)'
|
15
|
+
when 1
|
16
|
+
'接続していない'
|
17
|
+
when 2
|
18
|
+
'視聴・リレーしていない'
|
19
|
+
when 3
|
20
|
+
'視聴していない'
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
attr_accessor :max_relays, :max_relays_per_channel, :max_directs, :max_directs_per_channel, :max_upstream_rate, :max_upstream_rate_per_channel
|
27
|
+
|
28
|
+
def initialize(hash)
|
29
|
+
super
|
30
|
+
end
|
31
|
+
|
32
|
+
def channel_cleaner
|
33
|
+
ChannelCleaner.new(@channel_cleaner)
|
34
|
+
end
|
35
|
+
|
3
36
|
end
|
4
37
|
|
5
38
|
end
|
data/lib/psapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: psapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoteichi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|