dmcloud 1.0 → 1.1
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 +8 -8
- data/dmcloud.gemspec +2 -2
- data/lib/dm_cloud/media.rb +13 -13
- data/lib/{dm_cloud.rb → dmcloud.rb} +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmU0YWI4Mjk2YzQ1ZjIwN2NjMzU3YzkyODE3ZDJjMWNjYmUzYWZjMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTkwMzMzZGI5YWI3YTY0MmE5ODk4NDRlY2EyNTk5Njc4ZDFmYjA4OA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWNmOGIxY2JmYjNkZjA1Y2FhNmJjNDc1OTIyYjFjNzE4YjU0NThjODQxMGZl
|
10
|
+
NGEzZDZjODIzN2YyMTI3YTZhOGJlYzZlODc5MjdlYjZkZjE0ZGU3NWEyZWZk
|
11
|
+
NDUzYjViMTNkOWI3Y2YzMWQzZWY1ZGJmM2E1ZDVkYWM5NjQzMzI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjI5MjdhZGZmY2RkOGI2MjBmZDE4MWRhNmY0NGIzMzQyMDJlNTZkNWU1OGM5
|
14
|
+
NzE5ZWQxMmVkNTk4ZjYyZmM0MDYzZTMzZWU0ODUzNWIzYmEwNzhkNjM3ZGYy
|
15
|
+
MWU3Y2QwOWM5MWVkZjAyMjA0OTkzMWQ3YjljYjk1NDliODcwNjI=
|
data/dmcloud.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "dmcloud"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ritik Malhotra", "Tanooj Luthra"]
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
"Rakefile",
|
25
25
|
"VERSION",
|
26
26
|
"dmcloud.gemspec",
|
27
|
-
"lib/
|
27
|
+
"lib/dmcloud.rb",
|
28
28
|
"lib/dm_cloud/builder/media.rb",
|
29
29
|
"lib/dm_cloud/media.rb",
|
30
30
|
"lib/dm_cloud/request.rb",
|
data/lib/dm_cloud/media.rb
CHANGED
@@ -7,7 +7,7 @@ module DmCloud
|
|
7
7
|
# or also download a media with the url paramater
|
8
8
|
# and use it as the source to encode the ASSET_NAME listed in assets_names
|
9
9
|
# Params :
|
10
|
-
# args:
|
10
|
+
# args:
|
11
11
|
# url: SCHEME://USER:PASSWORD@HOSTNAME/MY/PATH/FILENAME.EXTENSION (could be ftp or http)
|
12
12
|
# author: an author name
|
13
13
|
# title: a title for the film
|
@@ -15,19 +15,19 @@ module DmCloud
|
|
15
15
|
# when you set this parameter you must also set the url parameter
|
16
16
|
# Return :
|
17
17
|
# media_id: return the media id of the object
|
18
|
-
def self.create(
|
18
|
+
def self.create(url, assets_names = [], meta = {})
|
19
19
|
call_type = "media.create"
|
20
20
|
|
21
21
|
params = {
|
22
22
|
:call => call_type,
|
23
|
-
args: Builder::Media.create(
|
23
|
+
args: Builder::Media.create(url, assets_names, meta)
|
24
24
|
}
|
25
25
|
DmCloud.config[:auto_call] == true ? DmCloud::Request.execute(call_type, params) : {call: call_type, params: params}
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
28
|
# Delete a media object with all its associated assets.
|
29
|
-
#
|
30
|
-
# Parameters:
|
29
|
+
#
|
30
|
+
# Parameters:
|
31
31
|
# id (media ID) – (required) the id of the media object you want to delete.
|
32
32
|
# Return :
|
33
33
|
# Nothing
|
@@ -41,9 +41,9 @@ module DmCloud
|
|
41
41
|
}
|
42
42
|
DmCloud.config[:auto_call] == true ? DmCloud::Request.execute(call_type, params) : {call: call_type, params: params}
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
# Gives information about a given media object.
|
46
|
-
#
|
46
|
+
#
|
47
47
|
# Params :
|
48
48
|
# media_id: (media ID) – (required) the id of the new media object.
|
49
49
|
# fields (Array) – (required) the list of fields to retrieve.
|
@@ -59,12 +59,12 @@ module DmCloud
|
|
59
59
|
}
|
60
60
|
DmCloud.config[:auto_call] == true ? DmCloud::Request.execute(call_type, params) : {call: call_type, params: params}
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
63
|
# Returns a paginated list of media info structures.
|
64
64
|
# You must specify the fields you want to retrieve.
|
65
65
|
# The fields are described in the documentation of the method info.
|
66
|
-
#
|
67
|
-
# Parameters:
|
66
|
+
#
|
67
|
+
# Parameters:
|
68
68
|
# options:
|
69
69
|
# fields (Array) – (optional default return all informations) the fields to retrieve
|
70
70
|
# page (Integer) – (optional) the page number, default: 1
|
@@ -80,6 +80,6 @@ module DmCloud
|
|
80
80
|
}
|
81
81
|
DmCloud.config[:auto_call] == true ? DmCloud::Request.execute(call_type, params) : {call: call_type, params: params}
|
82
82
|
end
|
83
|
-
|
83
|
+
|
84
84
|
end
|
85
|
-
end
|
85
|
+
end
|
@@ -5,11 +5,11 @@ require 'yaml'
|
|
5
5
|
# For parts more generals and not representating DailyMotion Cloud API,
|
6
6
|
# I add some about my own opinion.
|
7
7
|
module DmCloud
|
8
|
-
|
8
|
+
|
9
9
|
# Configuration defaults
|
10
10
|
# I used this parts from Slainer68 paybox_system gem.
|
11
11
|
# I liked the concept and how he handle this part.
|
12
|
-
# Thx Slainer68, I created my first gem,
|
12
|
+
# Thx Slainer68, I created my first gem,
|
13
13
|
# and next one will be an update to your paybox_system gem.
|
14
14
|
@@config = {
|
15
15
|
security_level: 'none',
|
@@ -55,4 +55,4 @@ module DmCloud
|
|
55
55
|
autoload(:Media, 'dm_cloud/media')
|
56
56
|
autoload(:Request, 'dm_cloud/request')
|
57
57
|
autoload(:Signing, 'dm_cloud/signing')
|
58
|
-
end
|
58
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dmcloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ritik Malhotra
|
@@ -126,7 +126,7 @@ files:
|
|
126
126
|
- Rakefile
|
127
127
|
- VERSION
|
128
128
|
- dmcloud.gemspec
|
129
|
-
- lib/
|
129
|
+
- lib/dmcloud.rb
|
130
130
|
- lib/dm_cloud/builder/media.rb
|
131
131
|
- lib/dm_cloud/media.rb
|
132
132
|
- lib/dm_cloud/request.rb
|