Class: ErrorTracking::SentryClient::ApiUrls

Inherits:
Object
  • Object
show all
Defined in:
lib/error_tracking/sentry_client/api_urls.rb

Instance Method Summary collapse

Constructor Details

#initialize(url_base) ⇒ ApiUrls

Returns a new instance of ApiUrls.


6
7
8
# File 'lib/error_tracking/sentry_client/api_urls.rb', line 6

def initialize(url_base)
  @uri = URI(url_base).freeze
end

Instance Method Details

#issue_latest_event_url(issue_id) ⇒ Object


22
23
24
# File 'lib/error_tracking/sentry_client/api_urls.rb', line 22

def issue_latest_event_url(issue_id)
  with_path("/api/0/issues/#{escape(issue_id)}/events/latest/")
end

#issue_url(issue_id) ⇒ Object


14
15
16
# File 'lib/error_tracking/sentry_client/api_urls.rb', line 14

def issue_url(issue_id)
  with_path("/api/0/issues/#{escape(issue_id)}/")
end

#issues_urlObject


10
11
12
# File 'lib/error_tracking/sentry_client/api_urls.rb', line 10

def issues_url
  with_path(File.join(@uri.path, '/issues/'))
end

#projects_urlObject


18
19
20
# File 'lib/error_tracking/sentry_client/api_urls.rb', line 18

def projects_url
  with_path('/api/0/projects/')
end