Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
languagexml
titlegetOauthApp
<bitly.getOauthApp>
        <clientId>{$ctx:clientId}</clientId>
 </bitly.getOauthApp>
Properties
  • clientId:The  the client ID of the app.
Anchor
request
request
Sample request

...

Anchor
getUserInfo
getUserInfo
Get or update information about a user

The getUserInfo operation Returns returns or update information about a user .

Code Block
languagexml
titlegetUserInfo
<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
languagexml
titleSample Request for getUserInfo
{
"fullName":"Wso2Bitly"
}
Related Bitly documentation

http://dev.bitly.com/user_info.html#v3_user_tracking_domain_list

Anchor
getUserLinkHistory
getUserLinkHistory
Get entries from a user's link history in reverse chronological order.

...

Code Block
languagexml
titlegetUserLinkHistory
<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
getUserNetworkHistory
getUserNetworkHistory

...

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
languagexml
titlegetUserNetworkHistory
<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
languagexml
titleSample Request for getUserNetworkHistory
{
"isExpandClientId":"384783654765746546574656485648",
"limitForGetNW":"20"
}
Related Bitly documentation

http://dev.bitly.com/user_info.html#v3_user_link_history

Anchor
sampleconfiguration
sampleconfiguration
Sample configuration

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
languagexml
titleSample Proxy
<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>