Method | Description | |
---|---|---|
AuthenticateWithVerificationCode ( string code ) : void |
This is the second and final step in the authorisation process. It uses the verification code (retrieved in public string GetVerificationCode()). It exchanges the verification code for an access token. Once this step has been performed the user will be enabled to perform authenticated requests.
|
|
AuthenticatedQuery ( string query ) : IConsumerRequest |
Performs the query specified in the "query" string to perform a request that requires authorization. This method requires that either an accessToken has been set manually or that the GetVerificationCode() and AuthenticateWithVerificationCode(string code) methods have been called previously. It returns the IConsumerRequest fully enabled to make the request specified in the "query" string.
|
|
ConnectionMethods ( ) : System |
Initializes a new instance of the ConnectionMethods class.
|
|
ConnectionMethods ( string consumerKey, string consumerSecret ) : System |
Initializes a new instance of the ConnectionMethods class.
|
|
ConnectionMethods ( string consumerKey, string consumerSecret, IToken accessToken ) : System |
Initializes a new instance of the ConnectionMethods class.
|
|
ConnectionMethods ( string consumerKey, string consumerSecret, string scopeOfRequest ) : System |
Initializes a new instance of the ConnectionMethods class.
|
|
GetVerificationCode ( ) : string |
Performs the first step in the authorisation handshake. It requests a verification code from the TradeMeApi.
|
|
Post ( object toSend, string to ) : System.Xml.Linq.XDocument |
It serializes the toSend object into xml and sends the post message specified in the "to" string using an authorized connection. It returns the response from the server as an XDocument. REQUIRES AUTHENTICATION.
|
|
Post ( object toSend, string to, bool delete ) : System.Xml.Linq.XDocument |
It serializes the toSend object into xml and sends the post message specified in the "to" string using an authorized connection. It returns the response from the server as an XDocument. REQUIRES AUTHENTICATION.
|
|
UnauthenticatedConnection ( string query ) : IConsumerRequest |
Creates a connection with no authorization headers - used for requests that don't require authentication. This method does not actually perform the request - it returns the object to make the request with.
|
public AuthenticateWithVerificationCode ( string code ) : void | ||
code | string | The verification code. |
return | void |
public AuthenticatedQuery ( string query ) : IConsumerRequest | ||
query | string | The query string that will be added to the url and used to connect to the API with. |
return | IConsumerRequest |
public ConnectionMethods ( string consumerKey, string consumerSecret ) : System | ||
consumerKey | string | The consumer key. |
consumerSecret | string | The consumer secret. |
return | System |
public ConnectionMethods ( string consumerKey, string consumerSecret, IToken accessToken ) : System | ||
consumerKey | string | The consumer key. |
consumerSecret | string | The consumer secret. |
accessToken | IToken | The access token. |
return | System |
public ConnectionMethods ( string consumerKey, string consumerSecret, string scopeOfRequest ) : System | ||
consumerKey | string | The consumer key. |
consumerSecret | string | The consumer secret. |
scopeOfRequest | string | The scope of the requests that can be made. |
return | System |
public Post ( object toSend, string to ) : System.Xml.Linq.XDocument | ||
toSend | object | The object that will be serialized into xml and sent. |
to | string | The url the post message will be sent to. |
return | System.Xml.Linq.XDocument |
public Post ( object toSend, string to, bool delete ) : System.Xml.Linq.XDocument | ||
toSend | object | The object that will be serialized into xml and then sent in the post message. |
to | string | The query string that will be added to the base url and used to connect to the API. |
delete | bool | True if you want the request to be of the method DELETE instead of POST. |
return | System.Xml.Linq.XDocument |
public UnauthenticatedConnection ( string query ) : IConsumerRequest | ||
query | string | The url to connect to. |
return | IConsumerRequest |