Commit graph

17 commits

Author SHA1 Message Date
Dmitriy Zaporozhets
634cbd7138 Refactor API classes. So api classes like Gitlab::Issues become API::Issues 2013-05-14 15:33:31 +03:00
Dmitriy Zaporozhets
4d378f3c9a load notes for wall via api 2013-03-19 12:35:55 +02:00
Sebastian Ziebell
d269d107d8 API: fixed adding a note
Now the correct attribute is checked if it's available or not. Also fixed a test.
2013-02-27 18:12:02 +01:00
Sebastian Ziebell
7499f65014 API: extracted helper method to validate required parameters, code clean up
Added a helper method to check if required parameters are given in an API call. Can be used
to return a `400 Bad Request` return code if a required attribute is missing.
Code clean up and fixed tests.
2013-02-27 17:50:30 +01:00
Sebastian Ziebell
33c1463645 API: fixes return codes for notes, documentation updated
The notes API documentation updated with return codes. API now returns `400 Bad Request` if
required attributes are not present. Return codes are documented now, also tested in added tests.
The documentation now reflects the current state of the API.
2013-02-20 22:17:05 +01:00
Sebastian Ziebell
6fc3263e15 API: extracted helper method to provide 400 bad request error with description
Extracted a method for 400 error (Bad request) and adjusted code accordingly. The name of
the missing attribute is used to show which one was missing from the request. It is used to
give an appropriate message in the json response.
2013-02-13 15:48:52 +01:00
Sebastian Ziebell
8045a81bcf Merge branch 'master' into fixes/api 2013-02-08 10:32:42 +01:00
Sebastian Ziebell
bb24275f8d Status code 400 is returned if body is missing on note creation.
If a note is created with a POST request via API (`/projects/:id/notes`) status
code 400 is returned instead of 404. The resource itself exists but the request
is incomplete. Specs added to check different status codes when accessing, creating
and updating notes.
2013-02-06 17:11:00 +01:00
Micah Huff
1694dc8fe2 Expose MergeRequest object as a notable in the API to allow for easy retrieval of comments 2013-01-29 21:15:13 -08:00
Dmitriy Zaporozhets
afbdbb0c95 Rspec fixes 2013-01-04 18:50:31 +02:00
Riyad Preukschas
8f01190eb5 Remove all references tp the project code parameter from the API 2012-12-21 18:47:04 +01:00
Nihad Abbasov
270a43370a API: get a single wall note 2012-12-01 02:20:45 -08:00
Nihad Abbasov
ee6187bd55 API: ability to create a wall note 2012-11-29 15:52:56 -08:00
Nihad Abbasov
c946bf886c API: create new notes 2012-11-29 12:11:00 -08:00
Nihad Abbasov
1c5aa848ce API: get a single note 2012-11-29 12:11:00 -08:00
Nihad Abbasov
9a4974b760 correct example 2012-11-29 12:11:00 -08:00
Nihad Abbasov
01eab583d0 API: list wall, snippet and issue notes 2012-11-29 12:11:00 -08:00