89 Commits

Author SHA1 Message Date
Kato Stølen 4fbbe4ca2c Add cancellation token support for release assets uploading (#2267) 2021-02-21 17:08:30 -04:00
Jose de Jesus Medina 66a6781584 spellcheck round 2 (#2259) 2020-10-06 09:47:36 -03:00
Cédric Luthi 69d118230d Add support to get raw file content as byte[] (#2151) 2020-04-12 13:22:35 -03:00
Ryan Gribble cee6635861 provide a Delete<T>() overload that takes a Uri and accept header, but no body (#1868) 2018-09-09 09:59:31 +10:00
Itai Bar-Haim 4e804f61a6 Prefer using nameof(x) over literal "x" (#1781)
* updated XML docs and added some missing bits.

* prefer nameof(x) over literal "x"
2018-03-07 20:43:10 +10:00
Martin Scholz b4fad9bfab Add multiple assignees to issues (#1339)
* [WIP]

* add new method to add assignees for an issue

* added new overloads

* added unit tests

* fixed missed overload calls

* fixed inconsistency in tests

* added integration tests

* fixed errors in tests

* fixed all remarks

* added new overloads

* added unit tests

* added integration tests

* fixed incorrect variable names

* added new overloads

* added unit tests

* added itegration tests

* fixed integration tests

* removed extra empty lines

* fixed errors in unit tests

* added overloads on IObservableReleasesClient and IReleasesClient

* added new unit tests

* added integration tests

* added Task as return value of unit tests

* added Task as return parameter

* added return value ReleasesClientTests

* another try to get tests work

* another one try

* undo prev commit

* fixed errors in tests

* removed extra ThrowsAsync checks

* added new overloads

* added unit tests

* added integration tests

* added integration tests

* Add ApiOptions overloads to IWatchedClient + tests.

* Add ApiOptions overloads to IObservableWatchedClient + tests.

* More tests.

* fixed error in ObservableWatchedClient

* added unit tests

* added integration tests

* added new overloads

* added unit tests

* added integration tests

* renamed "Ensures" methods to deliver more consistency in code

* fixed failed tests

* Add ApiOptions overloads to methods on I(Observable)IssuesLabelsClient (#1329)

* correcting a couple of tests (#1331)

* Add ApiOption overloads to methods on I(Observable)OrganizationsClient (#1324)

* Add ApiOptions overloads to methods on I(Observable)OrganizationMembersClient (#1332)

* fix description

* add new response for IssueAssignees

* add constructor for IssueAssignees

* add debugger display for NewAssignees

* add methods for observable assignees client; new unit tests

* add observable unit tests for add method

* place AddAssignees under IssueClient

* fix description

* [WIP] add generic delete method

* revert add assignees

* add assignees key under issue client

* remove IssueAssignees dependencies

* fix type IssueAssignees

* add remove method for issue assignees; finish generic delete method

* unit tests for remove assignees

* Add Assignees property to NewIssue and UpdateIssue requets
Add Asignees property to Issue response
Removed [SerializeNull] attribute from UpdateIssue.Assignee as this was causing it to remove assignee when none was specified
Add a couple of integration tests to prove Assignees are being deserialised

* rename NewAssignees to AssignessUpdate

* change Assignees key description

* check null Issue.ToUpdate method

* add accept header for IssuesClientTests

* Fix some more unit tests

* add integration test

Check if an assignee was added to an issue

* fix merge conflicts

* resolve conflicts

* implement some hints from @ryangribble

* resolve merge fixes

* clean up

* some more changes

* create new repo

Create a new repo for integrationtest
'CanRetrieveIssuesWithMultipleAssignees()'

* fix merge

* fix conflicts

* fix xml

* change test

* change delete overloads

* Fix tests

* fix xml

* Add helper function RemoveLabel

* Add helper function RemoveAssignee

* Format last commit

* Add integration tests to exercise new Assignees field on IssueUpdate

* GitHub API doesnt allow Assignee and Assignees properties to both be specified - API docs say that Assignee is deprecated so mark it [Obsolete] and dont populate it in Issue.ToUpdate()

* Add Assignees field to PullRequest response object, and integration tests to verify it is populated.
This field is not listed in the API docs but probing the API revealed it is included in payloads

* add a couple of extra tests to verify the IssueUpdate.Labels is working correctly

* Include assignees in ctor for consistency

* fix IssueUpdate test for new Assignees field
2017-01-11 22:53:41 +10:00
Martin Scholz 93ae832311 [WIP] Protected branches updates - granular methods (#1443)
* Add get method for required status checks

* Add api urls for required status checks

* change name of apir url for required status checks

* fix xml comment

* add update method for required status checks

* add delete method for required status checks

* fix api url

* fix xml comment

* add api url for required status cehcks contexts

* add get method for required status checks contexts

* add replace method for required status checks contexts

* add add method for required status checks contexts

* add new overload for delete method

* add delete method for required status checks contexts; fix overloads for delete

* add api url for restrictions

* add get method for restrictions

* add delete method for restrictions

* add api url for teams restrictions

* add get method for team restrictions; fix delete method restrictions

* fix overhead for get team restrictions

* fix httpmethod for update required status checks

* add set method for team restrictions

* add add method for team restrictions

* add delete method for team restrictions

* add api url for user restrictions

* add get method for user restrictions

* add set method for user restrictions

* add add method for user restrictions

* add delete method for user restrictions

* Add unit test; fix api urls

* Add ExcludeFromTest class

* add exclude attribute to methods

* Add attribute usage

* Add parameter to interface

* add observable unit tests

* rename excludefromtest

exclude all the tests for the new api endpoints because they broke the
pagination and syncobsverable tests.

* rename excludefromattribute

* refactor observable methods

* [WIP] Add integration tests

* finish integration test

* fix renamed branch protection restrictions

* add team and user collections

* rename set to update

* rename test methods

* optimize integration tests

* made some tidy ups
- fixup comment wording Edit => Replace
- remove spurious characters from description
- remove un-needed exclude attributes

* remove ForOrgRepo tests

* remove unused org contexts

* dispose contexts

* remove obsolete GetRedirect

* add clarifying comment to restriction methods
2016-09-21 07:16:51 +10:00
Ryan Gribble 9d22ed4b1c Remove previously obsoleted IConnection.GetRedirect and IApiConnection.GetRedirect methods 2016-09-06 23:13:51 +10:00
Martin Scholz 89500f4b8a Repository invitations changes (#1410)
* add invitations accept header

* create class RepositoryInvitation

* add repository invitations client

* add api urls for invitations

* [WIP]

* add methods to repository invitations client

* add invite method to repo collaborators client

need to add some new overload to post method in apiconnection

* some changes

* add observable client

* add dependings

* add missing observable client

* add missing xml params

* check client

* change repository invitation model

* [WIP] tests

* [WIP] tests; fix overloads for client

* change GetAllForCurrent; suppress message

* some more tests

* [WIP]

* [WIP]

* add collaborator request model

* change return types

change return types for invitation methods. add permission attribute for
repository collaborators invite method.

* add some more tests

* fix xml doc

* check for null arguments

* fix tests

* some fixes from @ryangribble

* add parameterless constructor for RepositoryInvitation

* change setter

* change constructor

* fix merge conflicts

* [WIP] RepositoryInvitationsClientTests

* fix api url xml

* change collaborator request constructor

* change unit tests for collaborator request

* change repocollaboratorsclient

change overloads for add in invite methods to set permissions

* [WIP] integration tests

* add methods for interface

* NotFoundExceptions

* add overload for invite method

* rename repo property

* gramar

* overloads for observable repo collaborators client

* change integration tests

* new integration tests

* add decline test

* add test for accept invitation
2016-07-23 18:50:22 +10:00
maddin2016 6bedcf8993 add GetAll Method for uri and accepts
add api

fix GetAllMethod

fix ApiOptions
2016-05-27 15:41:30 +02:00
Brendan Forster c1c035cf01 moved ConfigureAwait onto same line as await 2016-04-06 20:28:46 -04:00
Brendan Forster 5b3d540207 a couple of other usages found 2016-04-06 20:26:59 -04:00
Brendan Forster b751a3e44f cleanup some indenting to make things a bit more readable 2016-04-06 20:17:39 -04:00
Brendan Forster c5600ce37b and a couple more awaits for necessary internals 2016-04-06 20:10:20 -04:00
Prayank Mathur 8e49f04a5d Added implementation for delete that takes custom media type header and changed definition for Unlock accordingly 2016-03-30 14:30:37 +05:30
aedampir@gmail.com 8816fd4797 Some misspells in ApiUrls and ApiConnection were fixed. 2016-03-28 13:22:59 +07:00
Brendan Forster aafdda2f00 Merge branch 'master' into api-paging-part-deux 2016-02-24 11:40:43 +11:00
Brendan Forster e27b58d043 a bit of cleanup 2016-02-17 11:14:39 +11:00
Brendan Forster b97254c5a7 swap in shared component for existing rules 2016-02-14 18:14:02 +11:00
Brendan Forster c098ecda60 added overloads to IApiConnection which support passing in ApiOptions 2016-02-14 16:56:34 +11:00
Ryan Gribble 1f13001fd8 Change the QueueLdapSync calls to use Post<T>(uri) with no body/data 2016-02-12 09:37:33 +10:00
Brendan Forster 46d9e1f745 remove Get<T> extension method and update impacted tests to use correct method, removing the need for
additional nulls in tests
2016-01-25 14:57:15 +10:30
Brendan Forster f63690c4d3 obsolete a range of methods around GetArchiveLink
Due to how the default HttpClientAdapter of Octokit will follow redirects by default,
this API is no longer working. Marking it as obsolete.
2015-12-10 08:24:11 +10:30
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
Haacked 0811d4cfd3 🎨 Replace tail recursive call with loop 2015-08-04 20:43:07 -07:00
Kristian Hald 3d56bbf87f Merge remote-tracking branch 'upstream/master' into pr-495ext
Conflicts:
	Octokit/Octokit-MonoAndroid.csproj
	Octokit/Octokit-Monotouch.csproj
2015-05-09 12:51:28 +02:00
Henrik Andersson 3a915fe6cf 🚦 for following redirects 2015-05-08 18:31:46 +10:00
Henrik Andersson 09d1932b4a Add method for getting repo archive link 2015-05-08 18:31:44 +10:00
Haacked 119d331b44 Somebody take the keyboard away from me 2015-04-21 16:25:08 -07:00
Haacked afd5f8ab56 Help POST learn about 2fa codes 2015-04-21 16:12:30 -07:00
Haacked 23bb76a112 Implement Authorizations Delete method with 2fa code
When we delete an authorization, we often need to use basic
authentication because the client might not have the associated token
stored anymore. If 2fa is enabled, the client needs to be able to pass
that along.
2015-04-21 13:40:26 -07: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
Brendan Forster c5adaffe8a them newlines 2015-02-16 09:27:00 +09:30
Brendan Forster 08a2b143d7 missed passing this parameter down 2015-01-29 16:25:03 +09:30
Brendan Forster b8bb2a8277 Merge branch 'master' into new-authorization-api
Conflicts:
	Octokit.Tests/Clients/AuthorizationsClientTests.cs
	Octokit.Tests/Reactive/AuthorizationExtensionsTests.cs
	Octokit/Http/Connection.cs
	Octokit/Models/Response/Authorization.cs
	Octokit/Octokit-Mono.csproj
	Octokit/Octokit-MonoAndroid.csproj
	Octokit/Octokit-Monotouch.csproj
	Octokit/Octokit-Portable.csproj
	Octokit/Octokit-netcore45.csproj
2015-01-28 09:16:16 +09:30
Haacked fa363b169f Remove StatusCode property from ApiResponse
We really want ApiResponse to be a composite of IResponse and the
deserialized content.
2015-01-04 19:25:43 -08:00
Haacked 4c8bab20eb IApiResponse no longer inherits IResponse 2015-01-04 18:58:53 -08:00
Brendan Forster 037aeb7b1e route GetOrCreateApplicationAuthentication to new endpoint, if user has set a Fingerprint 2015-01-04 14:36:58 +09:30
Brendan Forster fc5c060588 well shit, this builds 2014-10-24 13:06:29 -07:00
Dillon Buchanan f45fc8e3ff Implementing the rest of the Notifications API 2014-10-14 10:40:26 -02:00
Brendan Forster f777bc5b63 added overloads for Delete to accept a payload 2014-07-08 10:09:34 +09:30
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
Nigel Sampson 034da197da Accepts parameter for Get 2014-03-26 23:08:00 +13:00
Nigel Sampson 90aa5696a0 Accepts parameter for Patch 2014-03-26 22:58:37 +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