Module: SentryApi::Client::Events

Included in:
SentryApi::Client
Defined in:
lib/sentry-api/client/events.rb

Instance Method Summary collapse

Instance Method Details

#issue(issue_id) ⇒ SentryApi::ObjectifiedHash

Retrieve an Issue

Examples:

SentryApi.issue('120732258')

Parameters:

  • issue_id (String)

    the ID of the issue to retrieve.

Returns:



12
13
14
# File 'lib/sentry-api/client/events.rb', line 12

def issue(issue_id)
  get("/issues/#{issue_id}/")
end

#issue_events(issue_id) ⇒ Array<SentryApi::ObjectifiedHash>

List an Issue’s Events

Examples:

SentryApi.issue_events('120732258')

Parameters:

  • issue_id (String)

    the ID of the issue to retrieve.

Returns:



23
24
25
# File 'lib/sentry-api/client/events.rb', line 23

def issue_events(issue_id)
  get("/issues/#{issue_id}/events/")
end

#issue_hashes(issue_id) ⇒ Array<SentryApi::ObjectifiedHash>

List an Issue’s Hashes

Examples:

SentryApi.issues_hashes('120732258')

Parameters:

  • issue_id (String)

    the ID of the issue to retrieve.

Returns:



34
35
36
# File 'lib/sentry-api/client/events.rb', line 34

def issue_hashes(issue_id)
  get("/issues/#{issue_id}/hashes/")
end

#latest_event(issue_id) ⇒ SentryApi::ObjectifiedHash

Retrieves the details of the latest event.

Examples:

SentryApi.latest_event('120633628')

Parameters:

  • issue_id (String)

    the ID of the issue to retrieve.

Returns:



74
75
76
# File 'lib/sentry-api/client/events.rb', line 74

def latest_event(issue_id)
  get("/issues/#{issue_id}/events/latest/")
end

#oldest_event(issue_id) ⇒ SentryApi::ObjectifiedHash

Retrieves the details of the oldest event.

Examples:

SentryApi.oldest_event('120633628')

Parameters:

  • issue_id (String)

    the ID of the issue to retrieve.

Returns:



85
86
87
# File 'lib/sentry-api/client/events.rb', line 85

def oldest_event(issue_id)
  get("/issues/#{issue_id}/events/oldest/")
end

#remove_issue(issue_id) ⇒ Object

Removes an individual issue.

Examples:

SentryApi.remove_issue('120732258')

Parameters:

  • issue_id (String)

    the ID of the issue to retrieve.



44
45
46
# File 'lib/sentry-api/client/events.rb', line 44

def remove_issue(issue_id)
  delete("/issues/#{issue_id}/")
end

#update_issue(issue_id, options = {}) ⇒ SentryApi::ObjectifiedHash

Update an individual issue.

Examples:

SentryApi.update_issue('120732258')
SentryApi.update_issue('120732258',{status:'resolved'})
SentryApi.update_issue('120732258',{status:'resolved', assignedTo:'[email protected]'})

Parameters:

  • issue_id (String)

    the ID of the issue to retrieve.

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

    A customizable set of options.

Options Hash (options):

  • :status (String)

    the new status for the groups. Valid values are “resolved”, “unresolved” and “muted”.

  • :assignedTo (String)

    the username of the user that should be assigned to this issue.

  • :hasSeen (Boolean)

    in case this API call is invoked with a user context this allows changing of the flag that indicates if the user has seen the event.

  • :isBookmarked (Boolean)

    in case this API call is invoked with a user context this allows changing of the bookmark flag.

  • :isSubscribed (Boolean)

    in case this API call is invoked with a user context this allows changing of the subscribed flag.

Returns:



63
64
65
# File 'lib/sentry-api/client/events.rb', line 63

def update_issue(issue_id, options={})
  put("/issues/#{issue_id}/", body: options)
end