zype 0.13.0 → 0.14.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 +4 -4
- data/lib/zype/models/base/categories.rb +50 -0
- data/lib/zype/models/base/playlists.rb +50 -0
- data/lib/zype/models/base/videos.rb +1 -1
- data/lib/zype/models/category_content_rules.rb +13 -0
- data/lib/zype/models/playlist_content_rules.rb +13 -0
- data/lib/zype/models/video_content_rules.rb +13 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6aa476ba1a7c66b8b862c0d8b0c4188b284f456867a8d27f1fd8dca67c9acf5
|
4
|
+
data.tar.gz: 4c62eaddf5f63790de3d4fddd58abc7fa5cadf948e913864131dbd7c4de58a44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84a8db7a16bcae3e26763bd099bd4c38fd9d94c8a86c4d6b0a9da3ba80fd080f3763c0518f15a2f277b8fcb0946b36b6eba9f5a3b013220ffec56fac88da60e9
|
7
|
+
data.tar.gz: 527240894196c6be30a830e876e6b9c73be1c495fd5c695e0923a6dafc2a28c65d0dec8ff424b50f8d93a59e4fa9d38480a51986c2ae6b846207c55edcf81848
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module Zype
|
2
|
+
module Base
|
3
|
+
# Any categories nested routes will inherit from this class
|
4
|
+
class Categories < Zype::BaseModel
|
5
|
+
# Returns all objects for given class
|
6
|
+
#
|
7
|
+
# @param category_id [String] the ID of the category
|
8
|
+
# @return [Array<Hash>] the objects returned from the API
|
9
|
+
def all(category_id:)
|
10
|
+
client.execute(method: :get, path: "/categories/#{category_id}/#{path}")
|
11
|
+
end
|
12
|
+
|
13
|
+
# Returns object matching ID
|
14
|
+
#
|
15
|
+
# @param category_id [String] the ID of the category
|
16
|
+
# @param id [String] the ID of the object
|
17
|
+
# @return [Hash] the object returned from the API
|
18
|
+
def find(category_id:, id:)
|
19
|
+
client.execute(method: :get, path: "/categories/#{category_id}/#{path}/#{id}")
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates a new object via the API.
|
23
|
+
#
|
24
|
+
# @param category_id [String] ID of the category to assign to the object
|
25
|
+
# @param params [Hash] the properties of the object
|
26
|
+
# @return [Hash] the newly created object
|
27
|
+
def create(category_id:, params:)
|
28
|
+
client.execute(method: :post, path: "/categories/#{category_id}/#{path}", params: params)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Updates an existing object via the API
|
32
|
+
#
|
33
|
+
# @param category_id [String] the ID of the category
|
34
|
+
# @param params [Hash] the properties to be updated
|
35
|
+
# @return [Hash] the updated object
|
36
|
+
def update(category_id:, id:, params:)
|
37
|
+
client.execute(method: :put, path: "/categories/#{category_id}/#{path}/#{id}", params: params)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Deletes an existing object via the API
|
41
|
+
#
|
42
|
+
# @param category_id [String] the ID of the category
|
43
|
+
# @param id [String] the ID of the object
|
44
|
+
# @return [Hash] the deleted object
|
45
|
+
def delete(category_id:, id:)
|
46
|
+
client.execute(method: :delete, path: "/categories/#{category_id}/#{path}/#{id}")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module Zype
|
2
|
+
module Base
|
3
|
+
# Any playlist nested routes will inherit from this class
|
4
|
+
class Playlists < Zype::BaseModel
|
5
|
+
# Returns all objects for given class
|
6
|
+
#
|
7
|
+
# @param playlist_id [String] the ID of the playlist
|
8
|
+
# @return [Array<Hash>] the objects returned from the API
|
9
|
+
def all(playlist_id:)
|
10
|
+
client.execute(method: :get, path: "/playlists/#{playlist_id}/#{path}")
|
11
|
+
end
|
12
|
+
|
13
|
+
# Returns object matching ID
|
14
|
+
#
|
15
|
+
# @param playlist_id [String] the ID of the playlist
|
16
|
+
# @param id [String] the ID of the object
|
17
|
+
# @return [Hash] the object returned from the API
|
18
|
+
def find(playlist_id:, id:)
|
19
|
+
client.execute(method: :get, path: "/playlists/#{playlist_id}/#{path}/#{id}")
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates a new object via the API.
|
23
|
+
#
|
24
|
+
# @param playlist_id [String] ID of the playlist to assign to the object
|
25
|
+
# @param params [Hash] the properties of the object
|
26
|
+
# @return [Hash] the newly created object
|
27
|
+
def create(playlist_id:, params:)
|
28
|
+
client.execute(method: :post, path: "/playlists/#{playlist_id}/#{path}", params: params)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Updates an existing object via the API
|
32
|
+
#
|
33
|
+
# @param playlist_id [String] the ID of the playlist
|
34
|
+
# @param params [Hash] the properties to be updated
|
35
|
+
# @return [Hash] the updated object
|
36
|
+
def update(playlist_id:, id:, params:)
|
37
|
+
client.execute(method: :put, path: "/playlists/#{playlist_id}/#{path}/#{id}", params: params)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Deletes an existing object via the API
|
41
|
+
#
|
42
|
+
# @param playlist_id [String] the ID of the playlist
|
43
|
+
# @param id [String] the ID of the object
|
44
|
+
# @return [Hash] the deleted object
|
45
|
+
def delete(playlist_id:, id:)
|
46
|
+
client.execute(method: :delete, path: "/playlists/#{playlist_id}/#{path}/#{id}")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -30,7 +30,7 @@ module Zype
|
|
30
30
|
|
31
31
|
# Updates an existing object via the API
|
32
32
|
#
|
33
|
-
# @param
|
33
|
+
# @param video_id [String] the ID of the video
|
34
34
|
# @param params [Hash] the properties to be updated
|
35
35
|
# @return [Hash] the updated object
|
36
36
|
def update(video_id:, id:, params:)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zype
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zype
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -65,8 +65,11 @@ files:
|
|
65
65
|
- lib/zype/client/player_client.rb
|
66
66
|
- lib/zype/configuration.rb
|
67
67
|
- lib/zype/models/apps.rb
|
68
|
+
- lib/zype/models/base/categories.rb
|
69
|
+
- lib/zype/models/base/playlists.rb
|
68
70
|
- lib/zype/models/base/videos.rb
|
69
71
|
- lib/zype/models/categories.rb
|
72
|
+
- lib/zype/models/category_content_rules.rb
|
70
73
|
- lib/zype/models/device_categories.rb
|
71
74
|
- lib/zype/models/devices.rb
|
72
75
|
- lib/zype/models/encoders.rb
|
@@ -75,12 +78,14 @@ files:
|
|
75
78
|
- lib/zype/models/live_manifests.rb
|
76
79
|
- lib/zype/models/manifests.rb
|
77
80
|
- lib/zype/models/players.rb
|
81
|
+
- lib/zype/models/playlist_content_rules.rb
|
78
82
|
- lib/zype/models/playlists.rb
|
79
83
|
- lib/zype/models/program_guides.rb
|
80
84
|
- lib/zype/models/segments.rb
|
81
85
|
- lib/zype/models/subtitle_playlists.rb
|
82
86
|
- lib/zype/models/subtitles.rb
|
83
87
|
- lib/zype/models/users.rb
|
88
|
+
- lib/zype/models/video_content_rules.rb
|
84
89
|
- lib/zype/models/video_imports.rb
|
85
90
|
- lib/zype/models/video_sources.rb
|
86
91
|
- lib/zype/models/videos.rb
|