(index ("access-key" 0) ("secret-key" 146) ("https" 292) ("list-buckets" 491) ("bucket-exists?" 588) ("create-bucket!" 745) ("delete-bucket!" 944) ("list-objects" 1145) ("put-object!" 1276) ("put-string!" 1952) ("put-sexp!" 2265) ("put-file!" 2584) ("get-file" 2679) ("get-object" 2819) ("get-string" 3041) ("get-sexp" 3192) ("delete-object!" 3439) ("with-bucket" 3674))
(def (sig (parameter "(access-key [string])" (id access-key))) (p "This needs to be set before you can access S3. This is your AWS access key."))
(def (sig (parameter "(secret-key [string])" (id secret-key))) (p "This needs to be set before you can access S3. This is your AWS secret key."))
(def (sig (parameter "(https [boolean])" (id https))) (p "If set to " (tt "#t") " Amazon S3 will be accessed via https. Defaults to " (tt "#f") ". Deprecated in favor of " (tt "make-base-uri") "."))
(def (sig (procedure "(list-buckets)" (id list-buckets))) (p "Returns a list of your buckets."))
(def (sig (procedure "(bucket-exists? bucket)" (id bucket-exists?))) (p "Returns " (tt "#t") " when the specified bucket exists, " (tt "#f") " otherwise."))
(def (sig (procedure "(create-bucket! bucket)" (id create-bucket!))) (p "Creates a bucket. If the bucket already exists, you will most likely get an error. The result of this call is unspecified."))
(def (sig (procedure "(delete-bucket! bucket)" (id delete-bucket!))) (p "Attempts to delete the specified bucket. If the bucket doesn't exist or can't be deleted, you will get an unspecified error."))
(def (sig (procedure "(list-objects bucket)" (id list-objects))) (p "Returns a list of all the objects in the specified bucket."))
(def (sig (procedure "(put-object! bucket key object-thunk object-length object-type)" (id put-object!))) (p "This is the basic/raw way of putting an object on S3. It is recommended to use either " (tt "put-string!") " or " (tt "put-sexp!") ", if you can. Takes a bucket, a key (string) for identifying the object, a thunk that returns the object, the length of the object, and the object type.") (p "If the key already specifies an object on S3, the object will be replaced.") (p "As an example, " (tt "put-string!") " is implemented like this: " (tt "(put-object! bucket key (lambda () string) (string-length string) \"text/plain\")") ".") (p "The return is unspecified."))
(def (sig (procedure "(put-string! bucket key string)" (id put-string!))) (p "Simply takes a bucket, key (string) to identify the string, and the string to put on S3; and pushes the string to S3.") (p "If the key already specifies an string on S3, the string will be replaced.") (p "The return is unspecified."))
(def (sig (procedure "(put-sexp! bucket key sexp)" (id put-sexp!))) (p "Simply takes a bucket, key (string) to identify the sexp, and a quoted s-expression to put on S3; and pushes the s-expression to S3.") (p "If the key already specifies a s-exp on S3, the s-exp will be replaced.") (p "The return is unspecified."))
(def (sig (procedure "(put-file! bucket key file-path)" (id put-file!))) (p "Upload a file."))
(def (sig (procedure "(get-file bucket key file-path)" (id get-file))) (p "Retrieve arbitrary item and write it to " (tt "file-path") "."))
(def (sig (procedure "(get-object bucket key)" (id get-object))) (p "Takes a bucket and an object key and returns the object identified by the key. Note that all procedures that call to S3 also return request response."))
(def (sig (procedure "(get-string bucket key)" (id get-string))) (p "Takes a bucket and an object key and returns the string identified by the key."))
(def (sig (procedure "(get-sexp bucket key)" (id get-sexp))) (p "Takes a bucket and an object key and returns the s-expression identified by the key. Note that a returned s-expression must be " (tt "eval") "ed before it can be treated as code."))
(def (sig (procedure "(delete-object! bucket key)" (id delete-object!))) (p "Takes a bucket and an object key and attempts to delete the object identified by the key. If the object can't be deleted, an unspecified error will occur."))
(def (sig (syntax "(with-bucket bucket ...)" (id with-bucket))) (p "All amazon-s3 operations in the body will use the specified bucket without requiring it to be explicitly set.") (p "WARNING! DEPRECATED This is broken and only works with calls that start with " (tt "bucket") ". The next version of this lib will make this pattern obsolete.") (highlight scheme "(with-bucket \"foo\"\n  (put-file! \"foo-file\" \"~/foo\")\n  (get-file \"foo-file\" \"~/foo2\"))\n\n(with-bucket \"foo\"\n  (+ 1 2 3)) ; this will not work!"))
