1 ! Copyright (C) 2009 Chris Double.
\r
2 ! See http://factorcode.org/license.txt for BSD license.
\r
3 USING: help.markup help.syntax ;
\r
8 { "seq" "a sequence of " { $link bucket } " objects" }
\r
11 "Returns a list of " { $link bucket } " objects containing data on the buckets available on S3."}
\r
13 { $unchecked-example "USING: s3 ;" "buckets ." "{ }" }
\r
19 { "bucket" "a string" }
\r
22 "Creates a bucket with the given name."
\r
25 { $unchecked-example "USING: s3 ;" "\"testbucket\" create-bucket" "" }
\r
31 { "bucket" "a string" }
\r
34 "Deletes the bucket with the given name."
\r
37 { $unchecked-example "USING: s3 ;" "\"testbucket\" delete-bucket" "" }
\r
43 { "bucket" "a string" }
\r
44 { "seq" "a sequence of " { $link key } " objects"}
\r
47 "Returns a sequence of " { $link key } " objects. Each object in the sequence has information about the keys contained within the bucket."
\r
50 { $unchecked-example "USING: s3 ;" "\"testbucket\" keys . " "{ }" }
\r
56 { "bucket" "a string" }
\r
57 { "key" "a string" }
\r
58 { "response" "The HTTP response object"}
\r
59 { "data" "The data returned from the http request"}
\r
62 "Does an HTTP request to retrieve the object in the bucket with the given key."
\r
65 { $unchecked-example "USING: s3 ;" "\"testbucket\" \"mykey\" http-get " "" }
\r
71 { "data" "an object" }
\r
72 { "mime-type" "a string" }
\r
73 { "bucket" "a string"}
\r
74 { "key" "a string"}
\r
75 { "headers" "an assoc"}
\r
78 "Stores the object under the key in the given bucket. The object has "
\r
79 "the given mimetype. 'headers' should contain key/values for any headers to "
\r
80 "be associated with the object. 'data' is any Factor object that can be "
\r
81 "used as the 'data' slot in <post-data>. If it's a <pathname> it stores "
\r
82 "the contents of the file. If it's a stream, it's the contents of the "
\r
86 { $unchecked-example "USING: s3 ;" "\"hello\" binary encode \"text/plain\" \"testbucket\" \"hello.txt\" H{ { \"x-amz-acl\" \"public-read\" } } put-object" "" }
\r
87 { $unchecked-example "USING: s3 ;" "\"hello.txt\" <pathname> \"text/plain\" \"testbucket\" \"hello.txt\" H{ { \"x-amz-acl\" \"public-read\" } } put-object" "" }
\r
93 { "bucket" "a string"}
\r
94 { "key" "a string"}
\r
97 "Deletes the object in the bucket with the given key."
\r
100 { $unchecked-example "USING: s3 ;" "\"testbucket\" \"mykey\" delete-object" "" }
\r
104 ARTICLE: "s3" "Amazon S3"
\r
105 "The " { $vocab-link "s3" } " vocabulary provides a wrapper to the Amazon "
\r
106 "Simple Storage Service API."
\r
108 "To use the api you must set the variables " { $link key-id } " and "
\r
109 { $link secret-key } " to your Amazon S3 key and secret key respectively. Once "
\r
110 "this is done you can call any of the words below."
\r
111 { $subsection buckets }
\r
112 { $subsection create-bucket }
\r
113 { $subsection delete-bucket }
\r
114 { $subsection keys }
\r
115 { $subsection get-object }
\r
116 { $subsection put-object }
\r
117 { $subsection delete-object }
\r