Overview
The following operations allow you to work with Links User Info/History. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with links User Info/History, see Sample configuration.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<bitly.getOauthApp> <clientId>{$ctx:clientId}</clientId> </bitly.getOauthApp> |
Properties
clientId:
The the client ID of the app.
Anchor | ||||
---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
The getUserInfo
operation Returns returns or update information about a user .
Code Block | ||||
---|---|---|---|---|
| ||||
<bitly.getUserInfo> <fullName>{$ctx:fullName}</fullName> </bitly.getUserInfo> |
Properties
fullName: (optional) set the users full name value. (only available for the authenticated user.) .
...
Following is a sample REST/JSON request that can be handled by the getUserInfo
operation.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "fullName":"Wso2Bitly" } |
Related Bitly documentation
http://dev.bitly.com/user_info.html#v3_user_tracking_domain_list
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
<bitly.getUserLinkHistory> <linkForGetHistory>{linkForGetHistory}</linkForGetHistory> <limitForGetLink>{limitForGetLink}</limitForGetLink> <isPrivateLinks>{isPrivateLinks}</isPrivateLinks> <userForGetHistory>{userForGetHistory}</userForGetHistory> <queryForGetHistory>{queryForGetHistory}</queryForGetHistory> </bitly.getUserLinkHistory> |
Properties
linkForGetHistory: optional- the Bitlink to return metadata for (when specified, overrides all other options).
limitForGetLink: optional -integer in the range 1 to 100 default: 50, specifying the max number of results to return.
isPrivateLinks: optional- on, off and both whether to include or exclude private history entries. (on = return only private history entries) default: both.
userForGetHistory: optional- the user for whom to retrieve history entries (if different from authenticated user).
queryForGetHistory: optional- ad hoc text search string.
...
Related Bitly documentation
http://dev.bitly.com/user_info.html#v3_user_link_history
Anchor | ||||
---|---|---|---|---|
|
...
Get entries from a user's network history in reverse chronogical order
...
.
...
The getUserNetworkHistory
operation returns entries from a user's network history in reverse chronogical order. (A user's network history includes publicly saved links from Twitter and Facebook connections.) .
Code Block | ||||
---|---|---|---|---|
| ||||
<bitly.getUserNetworkHistory> <isExpandClientId>{isExpandClientId}</isExpandClientId> <limitForGetNW>{limit}</limitForGetNW> <isExpandUser>{expandUser}</isExpandUser> </bitly.getUserNetworkHistory> |
Properties
isExpandClientId: Optional optional- true or false whether to provide additional information about encoding application. default: false.
limitForGetNW: Optional optional -integer in the range of 1 to 100 that specifies the number of records to return (default: 20).
isExpandUser: Optional optional - true or false - include extra user info in response (login, avatar_url, display_name, profile_url, full_name).
...
Following is a sample REST/JSON request that can be handled by the getUserNetworkHistory
operation.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "isExpandClientId":"384783654765746546574656485648", "limitForGetNW":"20" } |
Related Bitly documentation
http://dev.bitly.com/user_info.html#v3_user_link_history
Anchor | ||||
---|---|---|---|---|
|
Following is a sample proxy service that illustrates how to connect to Bitly with the init
operation and use the getOauthApp
operation. The sample request for this proxy can be found in getLinkInfo getOauthApp sample request.
Code Block | ||||
---|---|---|---|---|
| ||||
<proxy xmlns="http://ws.apache.org/ns/synapse" name="bitly" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="accessToken" expression="json-eval($.accessToken)"/> <property name="bitlyLink" expression="json-eval($.bitlyLink)" /> <bitly.init> <accessToken>{$ctx:accessToken}</accessToken> </bitly.init> <bitly.getOauthApp> <clientId>{$ctx:clientId}</clientId> </bitly.getOauthApp> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy> |