@@ -19,8 +19,7 @@ def projects
1919 # @param project_slug [String] the slug of the project to retrieve.
2020 # @param organization_slug [String] the slug of the organization the project belong to.
2121 # @return [SentryApi::ObjectifiedHash]
22- def project ( project_slug , organization_slug = "" )
23- organization_slug = @default_org_slug if organization_slug == ""
22+ def project ( project_slug , organization_slug = @default_org_slug )
2423 get ( "/projects/#{ organization_slug } /#{ project_slug } /" )
2524 end
2625
@@ -37,8 +36,7 @@ def project(project_slug, organization_slug="")
3736 # @option options [Hash] optional options to override in the project settings.
3837 # @param organization_slug [String] the slug of the organization the project belong to.
3938 # @return [SentryApi::ObjectifiedHash]
40- def update_project ( project_slug , options = { } , organization_slug = "" )
41- organization_slug = @default_org_slug if organization_slug == ""
39+ def update_project ( project_slug , options = { } , organization_slug = @default_org_slug )
4240 put ( "/projects/#{ organization_slug } /#{ project_slug } /" , body : options )
4341 end
4442
@@ -49,8 +47,7 @@ def update_project(project_slug, options={}, organization_slug="")
4947 #
5048 # @param project_slug [String] the slug of the project to delete.
5149 # @param organization_slug [String] the slug of the organization the project belong to.
52- def delete_project ( project_slug , organization_slug = "" )
53- organization_slug = @default_org_slug if organization_slug == ""
50+ def delete_project ( project_slug , organization_slug = @default_org_slug )
5451 delete ( "/projects/#{ organization_slug } /#{ project_slug } /" )
5552 end
5653
@@ -68,7 +65,7 @@ def delete_project(project_slug, organization_slug="")
6865 # @option options [String] :resolution an explicit resolution to search for (eg: 10s). This should not be used unless you are familiar with Sentry’s internals as it’s restricted to pre-defined values.
6966 # @param organization_slug [String] the slug of the organization the project belong to.
7067 # @return [Array<Array>]
71- def project_stats ( project_slug , options = { } , organization_slug = "" )
68+ def project_stats ( project_slug , options = { } , organization_slug = @default_org_slug )
7269 get ( "/projects/#{ organization_slug } /#{ project_slug } /stats/" , query : options )
7370 end
7471
@@ -81,8 +78,7 @@ def project_stats(project_slug, options={}, organization_slug="")
8178 # @param file_path [String] the absolute file path of the dsym file.
8279 # @param organization_slug [String] the slug of the organization.
8380 # @return [Array<SentryApi::ObjectifiedHash>]
84- def upload_dsym_files ( project_slug , file_path , organization_slug = "" )
85- organization_slug = @default_org_slug if organization_slug == ""
81+ def upload_dsym_files ( project_slug , file_path , organization_slug = @default_org_slug )
8682 post ( "/projects/#{ organization_slug } /#{ project_slug } /files/dsyms/" , body : { file : File . new ( file_path ) } )
8783 end
8884
@@ -94,8 +90,7 @@ def upload_dsym_files(project_slug, file_path, organization_slug="")
9490 # @param organization_slug [String] the slug of the organization.
9591 # @param project_slug [String] the slug of the project to list the dsym files of.
9692 # @return [Array<SentryApi::ObjectifiedHash>]
97- def project_dsym_files ( project_slug , organization_slug = "" )
98- organization_slug = @default_org_slug if organization_slug == ""
93+ def project_dsym_files ( project_slug , organization_slug = @default_org_slug )
9994 get ( "/projects/#{ organization_slug } /#{ project_slug } /files/dsyms/" )
10095 end
10196
@@ -122,8 +117,7 @@ def client_keys(project_slug, organization_slug="")
122117 # @option options [String] :name the name for the new key.
123118 # @param organization_slug [String] the slug of the organization the client keys belong to.
124119 # @return [SentryApi::ObjectifiedHash]
125- def create_client_key ( project_slug , options = { } , organization_slug = "" )
126- organization_slug = @default_org_slug if organization_slug == ""
120+ def create_client_key ( project_slug , options = { } , organization_slug = @default_org_slug )
127121 post ( "/projects/#{ organization_slug } /#{ project_slug } /keys/" , body : options )
128122 end
129123
@@ -135,8 +129,7 @@ def create_client_key(project_slug, options={}, organization_slug="")
135129 # @param project_slug [String] the slug of the project the client keys belong to.
136130 # @param key_id [String] the ID of the key to delete.
137131 # @param organization_slug [String] the slug of the organization the client keys belong to.
138- def delete_client_key ( project_slug , key_id , organization_slug = "" )
139- organization_slug = @default_org_slug if organization_slug == ""
132+ def delete_client_key ( project_slug , key_id , organization_slug = @default_org_slug )
140133 delete ( "/projects/#{ organization_slug } /#{ project_slug } /keys/#{ key_id } /" )
141134 end
142135
@@ -151,8 +144,7 @@ def delete_client_key(project_slug, key_id, organization_slug="")
151144 # @option options [String] :name the new name for the client key.
152145 # @param organization_slug [String] the slug of the organization the client keys belong to.
153146 # @return [Array<SentryApi::ObjectifiedHash>]
154- def update_client_key ( project_slug , key_id , options = { } , organization_slug = "" )
155- organization_slug = @default_org_slug if organization_slug == ""
147+ def update_client_key ( project_slug , key_id , options = { } , organization_slug = @default_org_slug )
156148 put ( "/projects/#{ organization_slug } /#{ project_slug } /keys/#{ key_id } /" , body : options )
157149 end
158150
@@ -164,8 +156,7 @@ def update_client_key(project_slug, key_id, options={}, organization_slug="")
164156 # @param project_slug [String] the slug of the project the client keys belong to.
165157 # @param organization_slug [String] the slug of the organization the client keys belong to.
166158 # @return [Array<SentryApi::ObjectifiedHash>]
167- def project_events ( project_slug , organization_slug = "" )
168- organization_slug = @default_org_slug if organization_slug == ""
159+ def project_events ( project_slug , organization_slug = @default_org_slug )
169160 get ( "/projects/#{ organization_slug } /#{ project_slug } /events/" )
170161 end
171162
@@ -178,8 +169,7 @@ def project_events(project_slug, organization_slug="")
178169 # @param event_id [String] the slug of the project the event belongs to.
179170 # @param organization_slug [String] the slug of the organization the client keys belong to.
180171 # @return [SentryApi::ObjectifiedHash]
181- def project_event ( project_slug , event_id , organization_slug = "" )
182- organization_slug = @default_org_slug if organization_slug == ""
172+ def project_event ( project_slug , event_id , organization_slug = @default_org_slug )
183173 get ( "/projects/#{ organization_slug } /#{ project_slug } /events/#{ event_id } /" )
184174 end
185175
@@ -189,8 +179,7 @@ def project_event(project_slug, event_id, organization_slug="")
189179 # SentryApi.project_issues('project-slug')
190180 #
191181 # @return [Array<SentryApi::ObjectifiedHash>]
192- def project_issues ( project_slug , organization_slug = "" )
193- organization_slug = @default_org_slug if organization_slug == ""
182+ def project_issues ( project_slug , organization_slug = @default_org_slug )
194183 get ( "/projects/#{ organization_slug } /#{ project_slug } /issues/" )
195184 end
196185
0 commit comments