Module: AngellistApi::Client::StatusUpdates

Included in:
AngellistApi::Client
Defined in:
lib/angellist_api/client/status_updates.rb

Overview

Defines methods related to URLs

Instance Method Summary collapse

Instance Method Details

#delete_status_updates(id) ⇒ Object

Destroys the specified status update belonging to the authenticated user or to a startup the authenticated user is a team member of. Returns the destroyed status update on success, or an error on failure.

Examples:

Destroys specified status update belonging to authenticated user.

AngellistApi.delete_status_updates(1234)

Parameters:

  • id (Integer)

    ID of the desired status message.



55
56
57
# File 'lib/angellist_api/client/status_updates.rb', line 55

def delete_status_updates(id)
  delete("1/status_updates/#{id}")
end

#get_status_updates(options = {}) ⇒ Object

Return status updates from the given user or startup. If neither is specified, the authenticated user is used. Status updates are paginated and ordered by most recent first.

Examples:

Get status updates for the authenticated user.

AngellistApi.get_status_updates

Get status updates for the startup with ID 1234.

AngellistApi.get_status_updates(:startup_id => 1234)

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :user_id (Integer)

    id of the desired user.

  • :startup_id (Integer)

    id of the desired startup.



22
23
24
# File 'lib/angellist_api/client/status_updates.rb', line 22

def get_status_updates(options={})
  get("1/status_updates", options)
end

#post_status_updates(options = {}) ⇒ Object

Creates a status update for the authenticated user or for a startup the authenticated user is a team member of. Returns the new status update on success, or an error on failure.

Examples:

Update the authenticated user’s status.

AngellistApi.post_status_updates(:message => "Startup advice: Don't fuck up.")

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :message (String)

    The new status. Must be between 1 and 140 characters.

  • :startup_id (Integer)

    id of the startup whose status you want to update. If unspecified, the authenticated user’s status is updated.



41
42
43
# File 'lib/angellist_api/client/status_updates.rb', line 41

def post_status_updates(options={})
  post("1/status_updates", options)
end