1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[docs::aws::storage] requests finished changing RDoc to Yard

This commit is contained in:
Weston Platter 2013-01-13 19:49:47 -06:00
parent f9f2ebc8f3
commit db0310f474
5 changed files with 56 additions and 69 deletions

View file

@ -5,30 +5,27 @@ module Fog
# Create an object in an S3 bucket
#
# ==== Parameters
# * bucket_name<~String> - Name of bucket to create object in
# * object_name<~String> - Name of object to create
# * data<~File||String> - File or String to create object from
# * options<~Hash>:
# * 'Cache-Control'<~String> - Caching behaviour
# * 'Content-Disposition'<~String> - Presentational information for the object
# * 'Content-Encoding'<~String> - Encoding of object data
# * 'Content-Length'<~String> - Size of object in bytes (defaults to object.read.length)
# * 'Content-MD5'<~String> - Base64 encoded 128-bit MD5 digest of message
# * 'Content-Type'<~String> - Standard MIME type describing contents (defaults to MIME::Types.of.first)
# * 'Expires'<~String> - Cache expiry
# * 'x-amz-acl'<~String> - Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
# * 'x-amz-storage-class'<~String> - Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data
# * "x-amz-meta-#{name}" - Headers to be returned with object, note total size of request without body must be less than 8 KB.
# @param bucket_name [String] Name of bucket to create object in
# @param object_name [String] Name of object to create
# @param data [File||String] File or String to create object from
# @param options [Hash]
# @option options Cache-Control [String] Caching behaviour
# @option options Content-Disposition [String] Presentational information for the object
# @option options Content-Encoding [String] Encoding of object data
# @option options Content-Length [String] Size of object in bytes (defaults to object.read.length)
# @option options Content-MD5 [String] Base64 encoded 128-bit MD5 digest of message
# @option options Content-Type [String] Standard MIME type describing contents (defaults to MIME::Types.of.first)
# @option options Expires [String] Cache expiry
# @option options x-amz-acl [String] Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
# @option options x-amz-storage-class [String] Default is 'STANDARD', set to 'REDUCED_REDUNDANCY' for non-critical, reproducable data
# @option options x-amz-meta-#{name} Headers to be returned with object, note total size of request without body must be less than 8 KB.
#
# ==== Returns
# * response<~Excon::Response>:
# * headers<~Hash>:
# * 'ETag'<~String> - etag of new object
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html
# @return [Excon::Response] response:
# * headers [Hash]:
# * ETag [String] etag of new object
#
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html
def put_object(bucket_name, object_name, data, options = {})
data = Fog::Storage.parse_data(data)
headers = data[:headers].merge!(options)

View file

@ -7,28 +7,26 @@ module Fog
# Change access control list for an S3 object
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to modify
# * object_name<~String> - name of object to get access control list for
# * acl<~Hash>:
# * Owner<~Hash>:
# * ID<~String>: id of owner
# * DisplayName<~String>: display name of owner
# * AccessControlList<~Array>:
# * Grantee<~Hash>:
# * 'DisplayName'<~String> - Display name of grantee
# * 'ID'<~String> - Id of grantee
# @param bucket_name [String] name of bucket to modify
# @param object_name [String] name of object to get access control list for
# @param acl [Hash]:
# * Owner [Hash]
# * ID [String] id of owner
# * DisplayName [String] display name of owner
# * AccessControlList [Array]
# * Grantee [Hash]
# * DisplayName [String] Display name of grantee
# * ID [String] Id of grantee
# or
# * 'EmailAddress'<~String> - Email address of grantee
# * EmailAddress [String] Email address of grantee
# or
# * 'URI'<~String> - URI of group to grant access for
# * Permission<~String> - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
# * acl<~String> - Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
# * options<~Hash>:
# * 'versionId'<~String> - specify a particular version to retrieve
# * URI [String] URI of group to grant access for
# * Permission [String] Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
# @param acl [String] Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
# @param options [Hash]
# @option options versionId [String] specify a particular version to retrieve
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUTacl.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUTacl.html
def put_object_acl(bucket_name, object_name, acl, options = {})
query = {'acl' => nil}

View file

@ -25,17 +25,14 @@ module Fog
# Get an expiring object url from S3 for putting an object
#
# ==== Parameters
# * bucket_name<~String> - Name of bucket containing object
# * object_name<~String> - Name of object to get expiring url for
# * expires<~Time> - An expiry time for this url
# @param bucket_name [String] Name of bucket containing object
# @param object_name [String] Name of object to get expiring url for
# @param expires [Time] An expiry time for this url
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~String> - url for object
# @return [Excon::Response] response:
# * body [String] url for object
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/dev/S3_QSAuth.html
include PutObjectUrl

View file

@ -5,12 +5,10 @@ module Fog
# Change who pays for requests to an S3 bucket
#
# ==== Parameters
# * bucket_name<~String> - name of bucket to modify
# * payer<~String> - valid values are BucketOwner or Requester
# @param bucket_name [String] name of bucket to modify
# @param payer [String] valid values are BucketOwner or Requester
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentPUT.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentPUT.html
def put_request_payment(bucket_name, payer)
data =

View file

@ -5,22 +5,19 @@ module Fog
# Upload a part for a multipart upload
#
# ==== Parameters
# * bucket_name<~String> - Name of bucket to add part to
# * object_name<~String> - Name of object to add part to
# * upload_id<~String> - Id of upload to add part to
# * part_number<~String> - Index of part in upload
# * data<~File||String> - Content for part
# * options<~Hash>:
# * 'Content-MD5'<~String> - Base64 encoded 128-bit MD5 digest of message
# @param bucket_name [String] Name of bucket to add part to
# @param object_name [String] Name of object to add part to
# @param upload_id [String] Id of upload to add part to
# @param part_number [String] Index of part in upload
# @param data [File||String] Content for part
# @param options [Hash]
# @option options Content-MD5 [String] Base64 encoded 128-bit MD5 digest of message
#
# ==== Returns
# * response<~Excon::Response>:
# * headers<~Hash>:
# * 'ETag'<~String> - etag of new object (will be needed to complete upload)
# @return [Excon::Response] response
# * headers [Hash]:
# * ETag [String] etag of new object (will be needed to complete upload)
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadUploadPart.html
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadUploadPart.html
#
def upload_part(bucket_name, object_name, upload_id, part_number, data, options = {})
data = Fog::Storage.parse_data(data)