C# Class Rest4Net.BitLy.BitLyProvider

Inheritance: RestApiProvider
Exibir arquivo Open project: acropolium/Rest4Net Class Usage Examples

Public Methods

Method Description
Authenticate ( string xLogin, string xPassword ) : IBitlyResponse

This is used by applications to lookup a bit.ly API key for a user given a bit.ly username and password. Access to this endpoint is restricted and must be requested by emailing [email protected]. When requesting access include your application login and apiKey, and a description of your use case and an estimated volume of requests. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/authenticate

BitLyProvider ( string login, string apiKey ) : System
Clicks ( string shortUrl ) : IBitlyResponse

For one or more bit.ly URL's or hashes, you can generate statistics about the clicks on that link. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/clicks

ClicksWithHashes ( string hash ) : IBitlyResponse

For one or more bit.ly URL's or hashes, you can generate statistics about the clicks on that link. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/clicks

Expand ( string shortUrl ) : IBitlyResponse

Given a bit.ly URL or hash (or multiple), /v3/expand decodes it and returns back the target URL. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/expand

ExpandWithHashes ( string hash ) : IBitlyResponse

Given a bit.ly URL or hash (or multiple), /v3/expand decodes it and returns back the target URL. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/expand

Info ( string shortUrl ) : IBitlyResponse

This is used to return the page title for a given bit.ly link http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/info

InfoWithHashes ( string hash ) : IBitlyResponse

This is used to return the page title for a given bit.ly link http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/info

IsBitlyProDomain ( string domain ) : IBitlyResponse

This is used to query whether a given short domain is assigned for bitly.Pro, and is consequently a valid shortUrl parameter for other api calls. keep in mind that bitly.pro domains are restricted to less than 15 characters in length. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/bitly_pro_domain

Lookup ( string url ) : IBitlyResponse

This is used to query for a bit.ly link based on a long URL. For example you would use /v3/lookup followed by /v3/clicks to find click data when you have a long URL to start with

Shorten ( string longUrl, string domain = null, string xLogin = null, string xApiKey = null ) : IBitlyResponse

For a long URL, /v3/shorten encodes a URL and returns a short one. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/shorten

Validate ( string xLogin, string xApiKey ) : IBitlyResponse

For any given a bit.ly user login and apiKey, you can validate that the pair is active. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/validate

Private Methods

Method Description
Aggregate ( Command query, string paramName, IEnumerable values ) : Command
C ( string path, RequestType requestType = RequestType.Get ) : Command

Method Details

Authenticate() public method

This is used by applications to lookup a bit.ly API key for a user given a bit.ly username and password. Access to this endpoint is restricted and must be requested by emailing [email protected]. When requesting access include your application login and apiKey, and a description of your use case and an estimated volume of requests. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/authenticate
public Authenticate ( string xLogin, string xPassword ) : IBitlyResponse
xLogin string the end-user's bit.ly username or email address
xPassword string the end-user's bit.ly password
return IBitlyResponse

BitLyProvider() public method

public BitLyProvider ( string login, string apiKey ) : System
login string
apiKey string
return System

Clicks() public method

For one or more bit.ly URL's or hashes, you can generate statistics about the clicks on that link. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/clicks
public Clicks ( string shortUrl ) : IBitlyResponse
shortUrl string
return IBitlyResponse

ClicksWithHashes() public method

For one or more bit.ly URL's or hashes, you can generate statistics about the clicks on that link. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/clicks
public ClicksWithHashes ( string hash ) : IBitlyResponse
hash string
return IBitlyResponse

Expand() public method

Given a bit.ly URL or hash (or multiple), /v3/expand decodes it and returns back the target URL. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/expand
public Expand ( string shortUrl ) : IBitlyResponse
shortUrl string refers to one or more bit.ly URLs, (e.g.: http://bit.ly/1RmnUT or http://j.mp/1RmnUT)
return IBitlyResponse

ExpandWithHashes() public method

Given a bit.ly URL or hash (or multiple), /v3/expand decodes it and returns back the target URL. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/expand
public ExpandWithHashes ( string hash ) : IBitlyResponse
hash string refers to one or more bit.ly hashes, (e.g.: 2bYgqR or a-custom-name )
return IBitlyResponse

Info() public method

This is used to return the page title for a given bit.ly link http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/info
public Info ( string shortUrl ) : IBitlyResponse
shortUrl string
return IBitlyResponse

InfoWithHashes() public method

This is used to return the page title for a given bit.ly link http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/info
public InfoWithHashes ( string hash ) : IBitlyResponse
hash string
return IBitlyResponse

IsBitlyProDomain() public method

This is used to query whether a given short domain is assigned for bitly.Pro, and is consequently a valid shortUrl parameter for other api calls. keep in mind that bitly.pro domains are restricted to less than 15 characters in length. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/bitly_pro_domain
public IsBitlyProDomain ( string domain ) : IBitlyResponse
domain string A short domain (ie: nyti.ms)
return IBitlyResponse

Lookup() public method

This is used to query for a bit.ly link based on a long URL. For example you would use /v3/lookup followed by /v3/clicks to find click data when you have a long URL to start with
public Lookup ( string url ) : IBitlyResponse
url string One or more long URLs to lookup
return IBitlyResponse

Shorten() public method

For a long URL, /v3/shorten encodes a URL and returns a short one. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/shorten
public Shorten ( string longUrl, string domain = null, string xLogin = null, string xApiKey = null ) : IBitlyResponse
longUrl string is a long URL to be shortened (example: http://betaworks.com/)
domain string refers to a preferred domain; either bit.ly default or j.mp. This affects the output value of url
xLogin string is the end-user's login when make requests on behalf of another bit.ly user. This allows application developers to pass along an end user's bit.ly login
xApiKey string is the end-user's apiKey when making requests on behalf of another bit.ly user. This allows application developers to pass along an end user's bit.ly apiKey
return IBitlyResponse

Validate() public method

For any given a bit.ly user login and apiKey, you can validate that the pair is active. http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/validate
public Validate ( string xLogin, string xApiKey ) : IBitlyResponse
xLogin string end users user's bit.ly login (for validation)
xApiKey string end users bit.ly apiKey (for validation)
return IBitlyResponse