46 Commits

Author SHA1 Message Date
Tom Longhurst
cd1835326b Fix xUnit Warnings (#2906)
* Fix xUnit Warnings

* Fix

* Fix formatting in AsyncPaginationExtensionGenerator.cs

---------

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2024-04-15 13:19:26 -07:00
gitasaurus
3c82ff359c [FEAT] Adds support for enterprise audit logs 2023-05-09 10:28:58 -05:00
Chris Simpson
2f7bd00dd6 feat: Removing accept header previews (#2515) 2022-08-01 09:37:23 -05:00
Brendan Forster
287861e4a7 rewrite the setup of responses to use a standard helper function (#2177) 2020-04-14 11:30:15 -03:00
Brendan Forster
aeb8d19f29 address new Travis build warning (#2017)
* make explicit that which previously was fine

* suppress build warning
2019-09-24 11:19:10 -03:00
dependabot-preview[bot]
61bd1d1018 Bump NSubstitute from 3.1.0 to 4.2.1 (#1993)
* Bump NSubstitute from 3.1.0 to 4.2.1

Bumps NSubstitute from 3.1.0 to 4.2.1.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* fix failing tests
2019-09-16 19:12:56 -03:00
Brendan Forster
c098ecda60 added overloads to IApiConnection which support passing in ApiOptions 2016-02-14 16:56:34 +11:00
Brendan Forster
80719c0033 aaaand format the code 2015-11-04 13:38:51 -08:00
Haacked
890f852c90 🎨 Refactor GetQueuedOperation to reduce duplication
Most calls to `GetQueuedOperation` are used to queue up an operation
that'll return a collection in a subsequent call. In the case that the
API returns No Content, we want to return an empty collection. This
refactoring embeds that last bit of logic into `GetQueuedOperation`
rather than making every caller have to do it.
2015-08-07 16:20:45 -07:00
Haacked
0e74097dde Handle NoContent response for queued operations
We didn't handle the 204 response properly for the `StatisticsClient`.
Now we do.

Fixes #836
2015-08-07 10:41:02 -07:00
Mordechai Zuber
347da7b938 ApiConnection, Connection 2015-05-19 09:28:52 +03:00
Kristian Hald
261e47f2f5 Implemented data less 'Post' method and used in ping and test hook calls. 2015-04-20 23:19:59 +02:00
Haacked
4653e798a7 Make Response.StatusCode readonly 2015-01-04 19:15:42 -08:00
Haacked
89e8fdfeaf Make Response.Body readonly 2015-01-04 19:15:40 -08:00
Haacked
ff3506f3e8 Make some of the IResponse properties readonly 2015-01-04 19:13:32 -08:00
Haacked
53a6516de2 Change IResponse.Body to object
This removes the awkward Body and BodyAsObject property combo we used to
have.
2015-01-04 19:06:50 -08:00
Haacked
4c8bab20eb IApiResponse no longer inherits IResponse 2015-01-04 18:58:53 -08:00
Haacked
09d5c236a4 Rename IResponse<T> to IApiResponse 2015-01-04 18:33:48 -08:00
Paul Betts
8c5249894a Fix up stubs 2014-04-30 21:41:36 -07:00
Paul Betts
1c8ac1d32a Fix up ApiExtensions 2014-04-30 21:31:52 -07:00
Paul Betts
c18b156fab Rename IConnection methods 2014-04-30 21:30:45 -07:00
Nigel Sampson
2b470ed5dc Unit tests accepts overrides 2014-04-08 10:46:32 +12:00
Amy Palamountain
dd15b62cf4 fixed indenting 2014-02-16 17:05:10 +13:00
Amy Palamountain
63da057642 Provide cancellation token option 2014-02-16 17:04:59 +13:00
Amy Palamountain
e71c3e3d5f GetQueuedOperation<T> takes cancellation token
+ test fix up and test of cancellation.
2014-02-16 17:04:56 +13:00
Amy Palamountain
809ebd182c Unit tests for QueuedOpertaion 2014-02-16 17:04:49 +13:00
Amy Palamountain
706ab469ab Assert he makes a get request 2014-02-16 17:04:48 +13:00
James R Sconfitto
cdad0ad809 Return a status code from Delete requests 2013-11-09 10:46:46 -05:00
Haacked
1d64210ac5 Fix endpoint URLs for Enterprise support
Since Enterprise base URLs end with /api/v3 we need to make sure
the endpoints are relative and not absolute.
2013-10-29 16:02:00 -07:00
Haacked
14ad942ea8 RateLimit class encapsulates rate limit headers
Added a RateLimit class to encapsulate pulling rate limit information
from the headers. This is now exposed by ApiInfo as well as the
RateLimitExceeededException. That way these two classes are not grabbing
the same information in different ways which we were doing before.
2013-10-18 14:49:00 -07:00
Haacked
995e0c5b55 More api cleanup
Make accepts come before contentType everywhere. Also remove unnecessary
overloads of IConnection.
2013-10-15 15:43:52 -07:00
Haacked
50a197742d Fix releases client to pass accepts header 2013-10-15 13:59:14 -07:00
Haacked
25c83ac206 Reorder accepts and contentType parameters 2013-10-15 13:47:49 -07:00
Haacked
d6e560c737 Remove type argument from DeleteAsync 2013-10-15 13:43:16 -07:00
Haacked
f49939ab10 Add Put tests and fix test names 2013-10-15 10:09:25 -07:00
half-ogre
5ff270dc55 use HTTP verbs for clarity: PATCH edition 2013-10-14 12:41:35 -07:00
half-ogre
e933ca7391 make Upload a generic POST
The Releases API-specific part of uploading (the accept header) is now
in the Releases client and the API connection just has a generic POST
method. /cc @spraints
2013-10-14 12:38:10 -07:00
half-ogre
a0306ae1df use HTTP verbs for clarity: PUT edition
GetOrCreate no more
2013-10-14 12:14:29 -07:00
half-ogre
e7da50cb9d remove the T from ApiConnection{T}
It isn't buying is much, and by getting rid of it we can make API
connection more general. getting rid of strangeness like GetItem and
Upload
2013-10-14 12:05:10 -07:00
half-ogre
6f3fa81789 move internal stuff to .Internal namespace 2013-10-08 15:14:06 -07:00
Haacked
f8e7d2da29 Improve accepts and content type handling 2013-10-06 22:26:24 -07:00
Haacked
c979b342b6 Upload should take explicit contenttype parameter
Rather than accept an arbitrary dictionary, let's make it accept the
values we know. We still need to tackle the arbitrary headers problem
soon though.
2013-10-03 09:49:55 -07:00
Matt Burke
d0a5c5f9a6 Implement upload in ApiConnection. 2013-10-03 09:06:30 -07:00
Haacked
91b5449ddd Removed fluent assertions 2013-09-23 17:41:04 -07:00
Haacked
6a0e27274b Allow passing query parameters to connection
Change the API to support dictionary of query parameters.
2013-09-23 10:15:08 -07:00
Haacked
997e955f38 Rename to Octokit to be consistent with other API libs
GitHub is naming all of the libraries Octokit for their respective
platforms
2013-01-29 14:00:27 -08:00