zype 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab3c94af764d2e6fb176468ba82d20ef9aea562b891680c9b396b1d19c534a42
4
- data.tar.gz: bcbd485d8cbda10523f6f6ee1d86154ef39a818276c8e5354819c0dfc50e9d3a
3
+ metadata.gz: 95995e7141312c55086a5877d529c7256d810afc1fa9243d2cfbd878f3abee48
4
+ data.tar.gz: a0ccc891332c5d5e4e7cd5841eceef356164f0e4b7034f411666a8f87f167659
5
5
  SHA512:
6
- metadata.gz: c61cea2c251745b4b66dd5ff2def3caf1157f40fd97897c3b0012469458979dd1c31d5b1633e107ecf9abc4c057b2d65a9e9ec26e8319ae949d75144b9c7f2cb
7
- data.tar.gz: f9c145409a5e6f2cb38f51e57717076a91cc9db19cea3557492dcad551d4b884ad1163dd1f216228c6031af884e0fc0e6962a5d399e79bdca61dd3330e4ae91d
6
+ metadata.gz: 44106d36a3cb56b4ae07203a5ba66e0e72c920c4916dcd1d428cf025660fc4b89642f631dfb69230cd5b6cb48d4f5aafbcc2a4a9f5b168e8f3bf0939486ca7a9
7
+ data.tar.gz: cf8598bdf9a15dc3472ff43774730f2eb8761e93454842aeaaac9ef51988e53c85abbc4885939fef2aa41f2528c87a713331f4c57c5ca2c342a8d4246ca4ab91
@@ -0,0 +1,27 @@
1
+ module Zype
2
+ # This class does not support all, create, update or delete methods.
3
+ # Read more at https://docs.zype.com/v1.0/reference#getgeoip-1
4
+ #
5
+ # @since 0.10.0
6
+ class GeoIp < Zype::BaseModel
7
+ %i[all create update delete].each do |mtd|
8
+ send(:define_method, mtd) do
9
+ raise NoMethodError
10
+ end
11
+ end
12
+
13
+ # Retrieve the GeoIP object for a specific IP Address
14
+ #
15
+ # @param ip_address [String] value for the IP Adress you want to look up
16
+ # @return [Hash]
17
+ def find(ip_address:)
18
+ client.execute(method: :get, path: "/#{path}", params: { ip_address: ip_address })
19
+ end
20
+
21
+ private
22
+
23
+ def path
24
+ @path = 'geoip'
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,32 @@
1
+ module Zype
2
+ # This class does not support all, create, update or delete methods.
3
+ # Read more at https://docs.zype.com/v1.0/reference#players
4
+ #
5
+ # @since 0.10.0
6
+ class Players < Zype::BaseModel
7
+ %i[all create update delete].each do |mtd|
8
+ send(:define_method, mtd) do
9
+ raise NoMethodError
10
+ end
11
+ end
12
+
13
+ # Retrieve formatted player responses
14
+ #
15
+ # @param id [String] ID of the video
16
+ # @param format [String] format to return the response in. Valid options are html, js, json
17
+ # @return [Hash|String]
18
+ def find(id:, format:)
19
+ client.execute(method: :get, path: "/#{path}/#{id}.#{format}")
20
+ end
21
+
22
+ private
23
+
24
+ def path
25
+ @path = 'embed'
26
+ end
27
+
28
+ def client_class
29
+ Zype::PlayerClient
30
+ end
31
+ end
32
+ end
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.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zype
@@ -69,9 +69,11 @@ files:
69
69
  - lib/zype/models/device_categories.rb
70
70
  - lib/zype/models/devices.rb
71
71
  - lib/zype/models/encoders.rb
72
+ - lib/zype/models/geo_ip.rb
72
73
  - lib/zype/models/live_events.rb
73
74
  - lib/zype/models/live_manifests.rb
74
75
  - lib/zype/models/manifests.rb
76
+ - lib/zype/models/players.rb
75
77
  - lib/zype/models/playlists.rb
76
78
  - lib/zype/models/program_guides.rb
77
79
  - lib/zype/models/subtitle_playlists.rb