using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace Octokit
{
///
/// A connection for making API requests against URI endpoints.
/// Provides type-friendly convenience methods that wrap methods.
///
public interface IApiConnection
{
///
/// The underlying connection.
///
IConnection Connection { get; }
///
/// Gets the API resource at the specified URI.
///
/// Type of the API resource to get.
/// URI of the API resource to get
/// The API resource.
/// Thrown when an API error occurs.
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
Task Get(Uri uri);
///
/// Gets the API resource at the specified URI.
///
/// Type of the API resource to get.
/// URI of the API resource to get
/// Parameters to add to the API request
/// The API resource.
/// Thrown when an API error occurs.
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "It's fiiiine. It's fine. Trust us.")]
Task Get(Uri uri, IDictionary parameters);
///
/// Gets the API resource at the specified URI.
///
/// Type of the API resource to get.
/// URI of the API resource to get
/// Parameters to add to the API request
/// Accept header to use for the API request
/// The API resource.
/// Thrown when an API error occurs.
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "It's fiiiine. It's fine. Trust us.")]
Task Get(Uri uri, IDictionary parameters, string accepts);
///
/// Gets the HTML content of the API resource at the specified URI.
///
/// URI of the API resource to get
/// Parameters to add to the API request
/// The API resource's HTML content.
/// Thrown when an API error occurs.
Task GetHtml(Uri uri, IDictionary parameters);
///
/// Gets the raw content of the API resource at the specified URI.
///
/// URI of the API resource to get
/// Parameters to add to the API request
/// The API resource's raw content or null if the points to a directory.
/// Thrown when an API error occurs.
Task GetRaw(Uri uri, IDictionary parameters);
///
/// Gets the raw stream of the API resource at the specified URI.
///
/// URI of the API resource to get
/// Parameters to add to the API request
/// The API resource's raw stream or null if the points to a directory.
/// Thrown when an API error occurs.
Task GetRawStream(Uri uri, IDictionary parameters);
///
/// Gets all API resources in the list at the specified URI.
///
/// Type of the API resource in the list.
/// URI of the API resource to get
/// of the API resources in the list.
/// Thrown when an API error occurs.
Task> GetAll(Uri uri);
///
/// Gets all API resources in the list at the specified URI.
///
/// Type of the API resource in the list.
/// URI of the API resource to get
/// Options for changing the API response
/// of the API resources in the list.
/// Thrown when an API error occurs.
Task> GetAll(Uri uri, ApiOptions options);
///
/// Gets all API resources in the list at the specified URI.
///
/// Type of the API resource in the list.
/// URI of the API resource to get
/// Parameters to add to the API request
/// of the API resources in the list.
/// Thrown when an API error occurs.
Task> GetAll(Uri uri, IDictionary parameters);
///
/// Gets all API resources in the list at the specified URI.
///
/// Type of the API resource in the list.
/// URI of the API resource to get
/// Accept header to use for the API request
/// of the API resources in the list.
/// Thrown when an API error occurs.
Task> GetAll(Uri uri, string accepts);
///
/// Gets all API resources in the list at the specified URI.
///
/// Type of the API resource in the list.
/// URI of the API resource to get
/// Parameters to add to the API request
/// Options for changing the API response
/// of the API resources in the list.
/// Thrown when an API error occurs.
Task> GetAll(Uri uri, IDictionary parameters, ApiOptions options);
///
/// Gets all API resources in the list at the specified URI.
///
/// Type of the API resource in the list.
/// URI of the API resource to get
/// Parameters to add to the API request
/// Accept header to use for the API request
/// of the API resources in the list.
/// Thrown when an API error occurs.
Task> GetAll(Uri uri, IDictionary parameters, string accepts);
///
/// Gets all API resources in the list at the specified URI.
///
/// Type of the API resource in the list.
/// URI of the API resource to get
/// Parameters to add to the API request
/// Accept header to use for the API request
/// Options for changing the API response
/// of the API resources in the list.
/// Thrown when an API error occurs.
Task> GetAll(Uri uri, IDictionary parameters, string accepts, ApiOptions options);
///
/// Gets all API resources in the list at the specified URI.
///
/// Type of the API resource in the list.
/// URI of the API resource to get
/// Parameters to add to the API request
/// Accept header to use for the API request
/// Options for changing the API response
/// Function to preprocess HTTP response prior to deserialization (can be null)
/// of the API resources in the list.
/// Thrown when an API error occurs.
Task> GetAll(Uri uri, IDictionary parameters, string accepts, ApiOptions options, Func