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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f31ebe04216ce43776c735413195958b5f7aa64
4
- data.tar.gz: 198d79f9db82912ba852cc09f23e61539891d063
3
+ metadata.gz: 924972d9d9ee300ec064098f9b08f930b5850354
4
+ data.tar.gz: 9e8acfd31ba055da1868d2328f13a7147aa7313a
5
5
  SHA512:
6
- metadata.gz: 3ab8edf34fc27b4112f484e0e964b24b4af62afadfa72e793a11256303bc8354f0cd94699a625e94e56fdc61584839ba7ade3a942b77d95af98209d52740e7fe
7
- data.tar.gz: d1dad0f33d726d1689d9a65383b806c66b113f82af10701333319e52d8952af1184ce5b129736c4196c61fc0f19f74f10004b938c3db2e256a53b634e2d00a53
6
+ metadata.gz: 1cedbf32b425e3b1322f7779ce48dce09ed655147a239fb4f54248832513892df477c484d00619db0c52a2eff0073385b6ee1c489e251892dc3f42f35b74be4f
7
+ data.tar.gz: a7b6f038dcc8485a5dcb6a511153df6cee643da28719363bc50fd8e149fd6c703479c98341223c13b6eb0ce9eb362bbab136c8f228a951adbede8d1d61a4d1fc
@@ -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'])
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Psapi
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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 00:00:00.000000000 Z
11
+ date: 2015-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler