zype 0.5.0 → 0.6.0

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: a1be9423e4d243aa33d4517c5ec224cbc1f6a2825e871543702c82063977733b
4
- data.tar.gz: 935a274012b4f2b973a155a1970d4fa1f1155bffcf495de873fd8f81f5000540
3
+ metadata.gz: b2df35c63862b6279b75af1200befc0f356b7845de8edc15f93231a690d7cf29
4
+ data.tar.gz: f20b634c31d01fd1086955cbe16df0e56b80811a35afb56244e921e95103b381
5
5
  SHA512:
6
- metadata.gz: 25156f8c688c584968045f386ab53421e1fedc2848fdff08511b69ee95d4159bb41e6f338a744196f77292b7d16e6e2e19f20c3643ac6f17c659b5ff777f9ebe
7
- data.tar.gz: 22334225aa1b5e0e6ef7419e7b80ab33851e022a710a60c53eacc6b99cbbaa18e905b9eb509dde4cb83be65b73bc8c0c360a37e91a800b95e31bc50c518845c8
6
+ metadata.gz: a252f56f298e93d5fad37283ba032f86143ee7aa6d5413f20933a51d7b135eb9b282fa98bf93365a82873386b21398045f66b74dca22b76a5d8f91eb7d11fc76
7
+ data.tar.gz: 238177938f1e94770fdbe99c192a6b40ca0a00b717515074d003eff2d1bd1704e0007081d14d4620567095051ca278d4bc41361b15d1fd0e247e88357fc21d6e
data/lib/zype/client.rb CHANGED
@@ -3,6 +3,7 @@ module Zype
3
3
  attr_reader :headers
4
4
  include HTTParty
5
5
  class NoApiKey < StandardError; end
6
+ class NoAppKey < StandardError; end
6
7
  class NotFound < StandardError; end
7
8
  class ServerError < StandardError; end
8
9
  class Unauthorized < StandardError; end
@@ -0,0 +1,23 @@
1
+ module Zype
2
+ # This class does not support all, create, update or delete methods
3
+ # since the API does not support them
4
+ #
5
+ # @since 0.6.0
6
+ class Apps < Zype::BaseModel
7
+
8
+ %i[all create update delete].each do |mtd|
9
+ send(:define_method, mtd) do
10
+ raise NoMethodError
11
+ end
12
+ end
13
+
14
+ # Returns app that matches that app_key used in the authorization
15
+ #
16
+ # @return [Hash] the app returned from the API
17
+ def find
18
+ raise Zype::Client::NoAppKey if Zype.configuration.app_key.to_s.empty?
19
+
20
+ client.execute(method: :get, path: '/app')
21
+ end
22
+ end
23
+ end
@@ -1,4 +1,5 @@
1
1
  module Zype
2
+ # @since 0.4.0
2
3
  class Categories < Zype::BaseModel
3
4
  end
4
5
  end
@@ -1,4 +1,5 @@
1
1
  module Zype
2
+ # @since 0.1.0
2
3
  class Encoders < Zype::BaseModel
3
4
  # Returns encoder matching the encoder_name
4
5
  #
@@ -1,4 +1,5 @@
1
1
  module Zype
2
+ # @since 0.1.0
2
3
  class LiveEvents < Zype::BaseModel
3
4
  # Starts broadcasting a live event
4
5
  #
@@ -1,4 +1,5 @@
1
1
  module Zype
2
+ # @since 0.4.0
2
3
  class Playlists < Zype::BaseModel
3
4
  # Returns videos for a playlist
4
5
  #
@@ -1,4 +1,5 @@
1
1
  module Zype
2
+ # @since 0.4.0
2
3
  class Videos < Zype::BaseModel
3
4
  # Adds zobjects to video
4
5
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zype
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zype
@@ -62,6 +62,7 @@ files:
62
62
  - lib/zype/base_model.rb
63
63
  - lib/zype/client.rb
64
64
  - lib/zype/configuration.rb
65
+ - lib/zype/models/apps.rb
65
66
  - lib/zype/models/categories.rb
66
67
  - lib/zype/models/encoders.rb
67
68
  - lib/zype/models/live_events.rb