Module: Yammer::Api::PendingAttachment

Included in:
Client
Defined in:
lib/yammer/api/pending_attachment.rb

Instance Method Summary collapse

Instance Method Details

#create_pending_attachment(attachment) ⇒ Yammer::ApiResponse

Fetch a pending attachment owned by authenticated user

Examples:

Create new pending attachment

file = File.open('~/attachment.txt', 'r')
Yammer.create_pending_attachment(file)

Returns:

Raises:

See Also:

Rest API path:

  • /api/v1/pending_attachments

Rate Limited?:

  • Yes

Authentication:

  • User context



59
60
61
# File 'lib/yammer/api/pending_attachment.rb', line 59

def create_pending_attachment(attachment)
  post("/api/v1/pending_attachments", :attachment => attachment)
end

#delete_pending_attachment(id) ⇒ Yammer::ApiResponse

Delete a pending attachment owned by the authenticated user

Examples:

Delete existing pending attachment

Yammer.delete_pending_attachment(34)

Returns:

Raises:

See Also:

Rest API path:

  • /api/v1/pending_attachments

Rate Limited?:

  • Yes

Authentication:

  • User context



43
44
45
# File 'lib/yammer/api/pending_attachment.rb', line 43

def delete_pending_attachment(id)
  delete("/api/v1/pending_attachments/#{id}")
end

#get_pending_attachment(id) ⇒ Yammer::ApiResponse

Create a new pending attachment owned by authenticated user

Examples:

Fetch existing pending attachment

Yammer.get_pending_attachment(62)

Returns:

Raises:

See Also:

Rest API path:

  • /api/v1/pending_attachments

Rate Limited?:

  • Yes

Authentication:

  • User context



29
30
31
# File 'lib/yammer/api/pending_attachment.rb', line 29

def get_pending_attachment(id)
  get("/api/v1/pending_attachments/#{id}")
end