Class: JIRA::Attachment
- Inherits:
-
NamedEntity
- Object
- Entity
- DynamicEntity
- NamedEntity
- JIRA::Attachment
- Defined in:
- lib/jiraSOAP/entities/attachment.rb
Overview
Only contains the metadata for an attachment. The URI for an attachment appears to be of the form "JIRAService.endpoint_url/secure/attachment/DynamicEntity#id/#file_name".
Instance Attribute Summary collapse
-
#content ⇒ String
Content to be used for adding attachments, using RemoteAPI#add_attachments_to_issue_with_key.
Instance Method Summary collapse
-
#attachment ⇒ Object
Fetch the attachment from the server.
- #author ⇒ String
- #create_time ⇒ Time
- #file_name ⇒ String (also: #filename)
-
#file_size ⇒ Number
Measured in bytes.
- #mime_type ⇒ String (also: #content_type)
Methods inherited from NamedEntity
Methods inherited from DynamicEntity
Methods inherited from Entity
add_attribute, inherited, #initialize_with_xml, new_with_xml
Instance Attribute Details
#content ⇒ String
This method does not allow you to read the content of an existing attachment on the issue; only the metadata for the attachment may be read at this time.
Content to be used for adding attachments, using RemoteAPI#add_attachments_to_issue_with_key. Do not base64 encode the data yourself, it will be done for you when the attachment is uploaded.
However, attachment data coming from the server will come down in base64 encoded format...
32 33 34 |
# File 'lib/jiraSOAP/entities/attachment.rb', line 32 def content @content end |
Instance Method Details
#attachment ⇒ Object
Fetch the attachment from the server.
50 51 52 |
# File 'lib/jiraSOAP/entities/attachment.rb', line 50 def raise NotImplementedError, 'Please implement me. :(' end |
#author ⇒ String
8 |
# File 'lib/jiraSOAP/entities/attachment.rb', line 8 add_attribute :author, 'author', :content |
#create_time ⇒ Time
46 |
# File 'lib/jiraSOAP/entities/attachment.rb', line 46 add_attribute :create_time, 'created', :to_iso_date |
#file_name ⇒ String Also known as: filename
11 |
# File 'lib/jiraSOAP/entities/attachment.rb', line 11 add_attribute :file_name, 'filename', :content |
#file_size ⇒ Number
Measured in bytes
43 |
# File 'lib/jiraSOAP/entities/attachment.rb', line 43 add_attribute :file_size, 'filesize', :to_i |
#mime_type ⇒ String Also known as: content_type
35 |
# File 'lib/jiraSOAP/entities/attachment.rb', line 35 add_attribute :mime_type, 'mimetype', :content |