C# Class CSharp.Bitbucket.Api.Impl.BitbucketTemplate

This is the central class for interacting with Bitbucket.

All Bitbucket operations require OAuth authentication. To perform such operations, BitbucketTemplate must be constructed with the minimal amount of information required to sign requests to Bitbucket's API with an OAuth Authorization header.

Inheritance: Spring.Social.OAuth1.AbstractOAuth1ApiBinding, IBitbucket
Show file Open project: scottksmith95/CSharp.Bitbucket

Public Methods

Method Description
BitbucketTemplate ( string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret ) : System

Create a new instance of BitbucketTemplate.

Protected Methods

Method Description
ConfigureRestTemplate ( RestTemplate restTemplate ) : void

Enables customization of the RestTemplate used to consume provider API resources.

An example use case might be to configure a custom error handler. Note that this method is called after the RestTemplate has been configured with the message converters returned from GetMessageConverters().

GetMessageConverters ( ) : IList

Returns a list of IHttpMessageConverters to be used by the internal RestTemplate.

This implementation adds SpringJsonHttpMessageConverter and ByteArrayHttpMessageConverter to the default list.

Private Methods

Method Description
GetJsonMessageConverter ( ) : SpringJsonHttpMessageConverter

Returns a SpringJsonHttpMessageConverter to be used by the internal RestTemplate. Override to customize the message converter (for example, to set a custom object mapper or supported media types).

InitSubApis ( ) : void

Method Details

BitbucketTemplate() public method

Create a new instance of BitbucketTemplate.
public BitbucketTemplate ( string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret ) : System
consumerKey string The application's API key.
consumerSecret string The application's API secret.
accessToken string An access token acquired through OAuth authentication with Bitbucket.
accessTokenSecret string An access token secret acquired through OAuth authentication with Bitbucket.
return System

ConfigureRestTemplate() protected method

Enables customization of the RestTemplate used to consume provider API resources.
An example use case might be to configure a custom error handler. Note that this method is called after the RestTemplate has been configured with the message converters returned from GetMessageConverters().
protected ConfigureRestTemplate ( RestTemplate restTemplate ) : void
restTemplate RestTemplate The RestTemplate to configure.
return void

GetMessageConverters() protected method

Returns a list of IHttpMessageConverters to be used by the internal RestTemplate.
This implementation adds SpringJsonHttpMessageConverter and ByteArrayHttpMessageConverter to the default list.
protected GetMessageConverters ( ) : IList
return IList