mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #1450 from danny-g/master
changed docs to YARD for head_object.rb
This commit is contained in:
commit
c7f6c692d8
2 changed files with 39 additions and 40 deletions
|
@ -3,30 +3,30 @@ module Fog
|
||||||
class AWS
|
class AWS
|
||||||
class Real
|
class Real
|
||||||
|
|
||||||
|
#
|
||||||
# Get headers for an object from S3
|
# Get headers for an object from S3
|
||||||
#
|
#
|
||||||
# ==== Parameters
|
# @param bucket_name [String] Name of bucket to read from
|
||||||
# * bucket_name<~String> - Name of bucket to read from
|
# @param object_name [String] Name of object to read
|
||||||
# * object_name<~String> - Name of object to read
|
# @param options [Hash]:
|
||||||
# * options<~Hash>:
|
# @option options [String] If-Match Returns object only if its etag matches this value, otherwise returns 412 (Precondition Failed).
|
||||||
# * 'If-Match'<~String> - Returns object only if its etag matches this value, otherwise returns 412 (Precondition Failed).
|
# @option options [Time] If-Modified-Since Returns object only if it has been modified since this time, otherwise returns 304 (Not Modified).
|
||||||
# * 'If-Modified-Since'<~Time> - Returns object only if it has been modified since this time, otherwise returns 304 (Not Modified).
|
# @option options [String] If-None-Match Returns object only if its etag differs from this value, otherwise returns 304 (Not Modified)
|
||||||
# * 'If-None-Match'<~String> - Returns object only if its etag differs from this value, otherwise returns 304 (Not Modified)
|
# @option options [Time] If-Unmodified-Since Returns object only if it has not been modified since this time, otherwise returns 412 (Precodition Failed).
|
||||||
# * 'If-Unmodified-Since'<~Time> - Returns object only if it has not been modified since this time, otherwise returns 412 (Precodition Failed).
|
# @option options [String] Range Range of object to download
|
||||||
# * 'Range'<~String> - Range of object to download
|
# @option options [String] versionId specify a particular version to retrieve
|
||||||
# * 'versionId'<~String> - specify a particular version to retrieve
|
#
|
||||||
|
# @return [Excon::Response] response:
|
||||||
|
# * body [String] Contents of object
|
||||||
|
# * headers [Hash]:
|
||||||
|
# * Content-Length [String] - Size of object contents
|
||||||
|
# * Content-Type [String] - MIME type of object
|
||||||
|
# * ETag [String] - Etag of object
|
||||||
|
# * Last-Modified - [String] Last modified timestamp for object
|
||||||
|
#
|
||||||
|
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectHEAD.html
|
||||||
#
|
#
|
||||||
# ==== Returns
|
|
||||||
# * response<~Excon::Response>:
|
|
||||||
# * body<~String> - Contents of object
|
|
||||||
# * headers<~Hash>:
|
|
||||||
# * 'Content-Length'<~String> - Size of object contents
|
|
||||||
# * 'Content-Type'<~String> - MIME type of object
|
|
||||||
# * 'ETag'<~String> - Etag of object
|
|
||||||
# * 'Last-Modified'<~String> - Last modified timestamp for object
|
|
||||||
#
|
|
||||||
# ==== See Also
|
|
||||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectHEAD.html
|
|
||||||
|
|
||||||
def head_object(bucket_name, object_name, options={})
|
def head_object(bucket_name, object_name, options={})
|
||||||
unless bucket_name
|
unless bucket_name
|
||||||
|
|
|
@ -5,30 +5,29 @@ module Fog
|
||||||
|
|
||||||
require 'fog/aws/parsers/storage/initiate_multipart_upload'
|
require 'fog/aws/parsers/storage/initiate_multipart_upload'
|
||||||
|
|
||||||
|
#
|
||||||
# Initiate a multipart upload to an S3 bucket
|
# Initiate a multipart upload to an S3 bucket
|
||||||
#
|
#
|
||||||
# ==== Parameters
|
# @param bucket_name [String] Name of bucket to create object in
|
||||||
# * bucket_name<~String> - Name of bucket to create object in
|
# @param object_name [String] Name of object to create
|
||||||
# * object_name<~String> - Name of object to create
|
# @param options [Hash]:
|
||||||
# * options<~Hash>:
|
# @option options [String] Cache-Control Caching behaviour
|
||||||
# * 'Cache-Control'<~String> - Caching behaviour
|
# @option options [String] Content-Disposition Presentational information for the object
|
||||||
# * 'Content-Disposition'<~String> - Presentational information for the object
|
# @option options [String] Content-Encoding Encoding of object data
|
||||||
# * 'Content-Encoding'<~String> - Encoding of object data
|
# @option options [String] Content-MD5 Base64 encoded 128-bit MD5 digest of message (defaults to Base64 encoded MD5 of object.read)
|
||||||
# * 'Content-MD5'<~String> - Base64 encoded 128-bit MD5 digest of message (defaults to Base64 encoded MD5 of object.read)
|
# @option options [String] Content-Type Standard MIME type describing contents (defaults to MIME::Types.of.first)
|
||||||
# * 'Content-Type'<~String> - Standard MIME type describing contents (defaults to MIME::Types.of.first)
|
# @option options [String] x-amz-acl Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
||||||
# * 'x-amz-acl'<~String> - Permissions, must be in ['private', 'public-read', 'public-read-write', 'authenticated-read']
|
# @option options [String] x-amz-meta-#{name} Headers to be returned with object, note total size of request without body must be less than 8 KB.
|
||||||
# * "x-amz-meta-#{name}" - Headers to be returned with object, note total size of request without body must be less than 8 KB.
|
|
||||||
#
|
#
|
||||||
# ==== Returns
|
# @return [Excon::Response] response:
|
||||||
# * response<~Excon::Response>:
|
# * body [Hash]:
|
||||||
# * body<~Hash>:
|
# * Bucket [String] - Bucket where upload was initiated
|
||||||
# * 'Bucket'<~String> - Bucket where upload was initiated
|
# * Key [String] - Object key where the upload was initiated
|
||||||
# * 'Key'<~String> - Object key where the upload was initiated
|
# * UploadId [String] - Id for initiated multipart upload
|
||||||
# * 'UploadId'<~String> - Id for initiated multipart upload
|
|
||||||
#
|
#
|
||||||
# ==== See Also
|
# @see http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadInitiate.html
|
||||||
# http://docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadInitiate.html
|
|
||||||
#
|
#
|
||||||
|
|
||||||
def initiate_multipart_upload(bucket_name, object_name, options = {})
|
def initiate_multipart_upload(bucket_name, object_name, options = {})
|
||||||
request({
|
request({
|
||||||
:expects => 200,
|
:expects => 200,
|
||||||
|
|
Loading…
Reference in a new issue