rscribd 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.
@@ -1,8 +1,13 @@
|
|
1
1
|
# Example 1 - Uploading a test text file and removing it afterwards.
|
2
|
+
require 'rubygems'
|
2
3
|
require 'scribd'
|
3
4
|
|
5
|
+
# Use your API key / secret here
|
6
|
+
api_key = ''
|
7
|
+
api_secret = ''
|
8
|
+
|
4
9
|
# Create a scribd object
|
5
|
-
scribd = Scribd.new(
|
10
|
+
scribd = Scribd.new(api_key, api_secret)
|
6
11
|
|
7
12
|
# Enable debugging if you need
|
8
13
|
# scribd.debug = true
|
@@ -13,7 +18,7 @@ docs = scribd.docs
|
|
13
18
|
begin
|
14
19
|
# Upload the document from a file
|
15
20
|
print "Uploading a document ... "
|
16
|
-
doc_id, doc_guid = docs.upload('
|
21
|
+
doc_id, doc_guid = docs.upload('test.txt')
|
17
22
|
puts "Done doc_id=#{doc_id}, doc_guid=#{doc_guid}"
|
18
23
|
|
19
24
|
# Delete the uploaded document
|
@@ -1,10 +1,15 @@
|
|
1
1
|
# Example 2 - Uploading a test image file and removing it afterwards.
|
2
2
|
#
|
3
3
|
# Note: a different mime-type will be used.
|
4
|
+
require 'rubygems'
|
4
5
|
require 'scribd'
|
5
6
|
|
7
|
+
# Use your API key / secret here
|
8
|
+
api_key = ''
|
9
|
+
api_secret = ''
|
10
|
+
|
6
11
|
# Create a scribd object
|
7
|
-
scribd = Scribd.new(
|
12
|
+
scribd = Scribd.new(api_key, api_secret)
|
8
13
|
|
9
14
|
# Enable debugging if you need
|
10
15
|
# scribd.debug = true
|
@@ -15,7 +20,7 @@ docs = scribd.docs
|
|
15
20
|
begin
|
16
21
|
# Upload the document from a file
|
17
22
|
print "Uploading a document ... "
|
18
|
-
doc_id, doc_guid = docs.upload('
|
23
|
+
doc_id, doc_guid = docs.upload('test.gif', 'gif')
|
19
24
|
puts "Done doc_id=#{doc_id}, doc_guid=#{doc_guid}"
|
20
25
|
|
21
26
|
# Delete the uploaded document
|
@@ -1,8 +1,13 @@
|
|
1
1
|
# Example 2 - Uploading file from a URL and removing it afterwards.
|
2
|
+
require 'rubygems'
|
2
3
|
require 'scribd'
|
3
4
|
|
5
|
+
# Use your API key / secret here
|
6
|
+
api_key = ''
|
7
|
+
api_secret = ''
|
8
|
+
|
4
9
|
# Create a scribd object
|
5
|
-
scribd = Scribd.new(
|
10
|
+
scribd = Scribd.new(api_key, api_secret)
|
6
11
|
|
7
12
|
# Enable debugging if you need
|
8
13
|
# scribd.debug = true
|
@@ -1,9 +1,14 @@
|
|
1
1
|
# Example 4 - Uploading a test text file and changing its settings followed
|
2
2
|
# by cleanup.
|
3
|
+
require 'rubygems'
|
3
4
|
require 'scribd'
|
4
5
|
|
6
|
+
# Use your API key / secret here
|
7
|
+
api_key = ''
|
8
|
+
api_secret = ''
|
9
|
+
|
5
10
|
# Create a scribd object
|
6
|
-
scribd = Scribd.new(
|
11
|
+
scribd = Scribd.new(api_key, api_secret)
|
7
12
|
|
8
13
|
# Enable debugging if you need
|
9
14
|
# scribd.debug = true
|
@@ -14,7 +19,7 @@ docs = scribd.docs
|
|
14
19
|
begin
|
15
20
|
# Upload the document from a file
|
16
21
|
print "Uploading a document ... "
|
17
|
-
doc_id, doc_guid = docs.upload('
|
22
|
+
doc_id, doc_guid = docs.upload('test.txt')
|
18
23
|
puts "Done doc_id=#{doc_id}, doc_guid=#{doc_guid}"
|
19
24
|
|
20
25
|
begin
|
@@ -1,9 +1,14 @@
|
|
1
1
|
# Example 5 - Uploading a test text file and checking its conversion status
|
2
2
|
# followed by cleanup.
|
3
|
+
require 'rubygems'
|
3
4
|
require 'scribd'
|
4
5
|
|
6
|
+
# Use your API key / secret here
|
7
|
+
api_key = ''
|
8
|
+
api_secret = ''
|
9
|
+
|
5
10
|
# Create a scribd object
|
6
|
-
scribd = Scribd.new(
|
11
|
+
scribd = Scribd.new(api_key, api_secret)
|
7
12
|
|
8
13
|
# Enable debugging if you need
|
9
14
|
# scribd.debug = true
|
@@ -14,7 +19,7 @@ docs = scribd.docs
|
|
14
19
|
begin
|
15
20
|
# Upload the document from a file
|
16
21
|
print "Uploading a document ... "
|
17
|
-
doc_id, doc_guid = docs.upload('
|
22
|
+
doc_id, doc_guid = docs.upload('test.txt')
|
18
23
|
puts "Done doc_id=#{doc_id}, doc_guid=#{doc_guid}"
|
19
24
|
|
20
25
|
begin
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: rscribd
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2007-11-
|
8
|
-
summary: Ruby interface to the
|
6
|
+
version: 0.0.2
|
7
|
+
date: 2007-11-20 00:00:00 -08:00
|
8
|
+
summary: Ruby interface to the Scribd API
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: matt.jaynes@gmail.com
|
@@ -29,17 +29,17 @@ post_install_message:
|
|
29
29
|
authors: []
|
30
30
|
|
31
31
|
files:
|
32
|
-
- lib/scribd/search.rb
|
33
32
|
- lib/scribd/base.rb
|
34
33
|
- lib/scribd/docs.rb
|
34
|
+
- lib/scribd/search.rb
|
35
35
|
- lib/scribd.rb
|
36
|
+
- sample/01-docs_upload-text.rb
|
37
|
+
- sample/02-docs_upload-binary.rb
|
38
|
+
- sample/03-docs_uploadFromUrl.rb
|
36
39
|
- sample/04-docs_changeSettings.rb
|
37
40
|
- sample/05-docs_getConversionStatus.rb
|
38
41
|
- sample/test.gif
|
39
|
-
- sample/03-docs_uploadFromUrl.rb
|
40
42
|
- sample/test.txt
|
41
|
-
- sample/01-docs_upload-text.rb
|
42
|
-
- sample/02-docs_upload-binary.rb
|
43
43
|
test_files: []
|
44
44
|
|
45
45
|
rdoc_options: []
|