Skip to content

Commit d595896

Browse files
committed
* add replace method synopsis on README.rdoc
1 parent c8d47d4 commit d595896

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.rdoc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,26 @@ respect to http://github.com/typester/net-github-upload-perl
3535

3636
# data upload
3737
# you can define content_type => Amazon S3 Content-Type
38+
time = Time.now.to_i
3839
direct_link = gh.upload(
3940
:repos => repos,
4041
:data => 'test',
41-
:name => "test_#{Time.now.to_i}.txt",
42+
:name => "test_#{time}.txt",
43+
:content_type => 'text/plain',
44+
:description => "test file2"
45+
)
46+
47+
# replace file or data
48+
# thx id:rngtng !
49+
direct_link = gh.replace(
50+
:repos => repos,
51+
:file => 'test/test',
52+
:description => "test file"
53+
)
54+
direct_link = gh.replace(
55+
:repos => repos,
56+
:data => 'test',
57+
:name => "test_#{time}.txt",
4258
:content_type => 'text/plain',
4359
:description => "test file2"
4460
)

0 commit comments

Comments
 (0)