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