RESTful API

 

/api/v2/activity

Request Type
POST
 
Adds and activity to the identity's social feed.
 
Example URL
https://example.stitchz.net/api/v2/activity?identity=http%3a%2f%2fwww.facebook.com%2f3408qq4958qw3&format=xml
 
Available Providers
 
Request
Required Parameter Type Description
yes Bearer string The application's unique Oauth2 bearer token (access token) in the request header
yes Identity string The identity string provided by Stitchz when the user logged in.
  Format string The format of the authenticated Stitchz response, XML, JSON, JSONP. A query string parameter can be included in the request (e.g. ?format=json) or a header variable of "Accept" with the proper value, e.g. 'application/json', 'application/xml', etc. The default response is in "JSON" format.
  title string The activities title to be posted to the user's social stream. Currently only supported and required by Google+.
yes message string The status message to be posted to the user's social stream.
Example Request
$ curl -X POST --d "title=my%20activity%20post&message=this%20is%20gonna%20be%20great!"
-H "Authorization: Bearer e72e16c7e42f292c6912e7710c838347ae178b4a"
-H "Accept: application/json"
-A "example client"
https://example.stitchz.net/api/v2/activity/1234567890_10999990000011111?identity=http%3a%2f%2fwww.facebook.com%2f3408Rq4958qw3

POST /api/v2/activity/1234567890_10999990000011111?identity=http%3a%2f%2fwww.facebook.com%2f3408Rq4958qw3 HTTP/1.1
User-Agent: example client
Host: example.stitchz.net
Accept: application/json
Authorization: Bearer e72e16c7e42f292c6912e7710c838347ae178b4a
Response
The response returned contains the fields and attributes as defined by the service provider, i.e. Facebook, etc.
 
Header Type Description
Location Url The new activity's Get request Url.
 
Example XML Response
Example JSON Response
Location: 'https://api.stitchz.net/Activity/1234567890_10999990000011111'

<activity>
    <id>1234567890_10999990000011111</id>
</activity>
Location: 'https://api.stitchz.net/Activity/1234567890_10999990000011111'

{
    "id":"1234567890_10999990000011111"
}
Request Type
GET
 
Gets a single activity from the identity's social stream.
 
Example URL
https://login.stitchz.net/api/v2/activity/1234567890_10999990000011111?identity=http%3a%2f%2fwww.facebook.com%2f3408Rq4958qw3
 
Available Providers
 
Request
Required Parameter Type Description
yes Bearer string The application's unique Oauth2 bearer token (access token) in the request header
yes Identity string The identity string provided by Stitchz when the user logged in.
  Format string The format of the authenticated Stitchz response, XML, JSON, JSONP. A query string parameter can be included in the request (e.g. ?format=json) or a header variable of "Accept" with the proper value, e.g. 'application/json', 'application/xml', etc. The default response is in "JSON" format.
yes id string The activity ID to retrieve from the user's social stream, e.g. 000000000000000000000
Example Request
$ curl -H "Authorization: Bearer e72e16c7e42f292c6912e7710c838347ae178b4a"
-H "Accept: application/json"
-A "example client"
https://example.stitchz.net/api/v2/activity/1234567890_10999990000011111?identity=http%3a%2f%2fwww.facebook.com%2f3408Rq4958qw3

GET /api/v2/activity/1234567890_10999990000011111?identity=http%3a%2f%2fwww.facebook.com%2f3408Rq4958qw3 HTTP/1.1
User-Agent: example client
Host: example.stitchz.net
Accept: application/json
Authorization: Bearer e72e16c7e42f292c6912e7710c838347ae178b4a
Response
The response returned contains the fields and attributes as defined by the service provider, i.e. Twitter, etc.
 
Example XML Response
Example JSON Response
<activity>
    <created_at>Wed Nov 27 02:32:33 +0000 2013</created_at>
    <id>405524515980984320</id>
    <id_str>405524515980984320</id_str>
    <text>Just released a .NET Stitchz Consumer utility via @nuget Easily add Stitchz Login to your web project in 2 lines of code! #nuget #dotnet</text>
    <source>web</source>
    <truncated>false</truncated>
    <in_reply_to_status_id />
    <in_reply_to_status_id_str />
    <in_reply_to_user_id />
    <in_reply_to_user_id_str />
    <in_reply_to_screen_name />
    <user>
        <id>195980728</id>
        <id_str>195980728</id_str>
        <name>Stitchz.net</name>
        <screen_name>stitchzdotnet</screen_name>
        <location> </location>
        <description>Stitchz Login safely and securely authenticates users on to any website</description>
        <url>http://t.co/bXUCkYJsR4</url>
        <entities>
            <url>
                <urls>
                    <url>http://t.co/bXUCkYJsR4</url>
                    <expanded_url>http://www.stitchz.net/</expanded_url>
                    <display_url>stitchz.net</display_url>
                    <indices>0</indices>
                    <indices>22</indices>
                </urls>
            </url>
             <description />
        </entities>
        <protected>false</protected>
        <followers_count>1</followers_count>
        <friends_count>2</friends_count>
        <listed_count>0</listed_count>
        <created_at>Tue Sep 28 01:21:06 +0000 2010</created_at>
        <favourites_count>0</favourites_count>
        <utc_offset />
        <time_zone />
        <geo_enabled>false</geo_enabled>
        <verified>false</verified>
        <statuses_count>3</statuses_count>
        <lang>en</lang>
        <contributors_enabled>false</contributors_enabled>
        <is_translator>false</is_translator>
        <is_translation_enabled>false</is_translation_enabled>
        <profile_background_color>C0DEED</profile_background_color>
        <profile_background_image_url>http://abs.twimg.com/images/themes/theme1/bg.png</profile_background_image_url>
        <profile_background_image_url_https>https://abs.twimg.com/images/themes/theme1/bg.png</profile_background_image_url_https>
        <profile_background_tile>false</profile_background_tile>
        <profile_image_url>http://pbs.twimg.com/profile_images/378800000795713267/7a229ee59abf9d617285f140c8138eb9_normal.png</profile_image_url>
        <profile_image_url_https>https://pbs.twimg.com/profile_images/378800000795713267/7a229ee59abf9d617285f140c8138eb9_normal.png</profile_image_url_https>
        <profile_link_color>0084B4</profile_link_color>
        <profile_sidebar_border_color>C0DEED</profile_sidebar_border_color>
        <profile_sidebar_fill_color>DDEEF6</profile_sidebar_fill_color>
        <profile_text_color>333333</profile_text_color>
        <profile_use_background_image>true</profile_use_background_image>
        <default_profile>true</default_profile>
        <default_profile_image>false</default_profile_image>
        <following>false</following>
        <follow_request_sent>false</follow_request_sent>
        <notifications>false</notifications>
    </user>
    <geo />
    <coordinates />
    <place />
    <contributors />
    <retweet_count>0</retweet_count>
    <favorite_count>0</favorite_count>
    <entities>
        <hashtags>
            <text>nuget</text>
            <indices>122</indices>
            <indices>128</indices>
        </hashtags>
        <hashtags>
            <text>dotnet</text>
            <indices>129</indices>
            <indices>136</indices>
        </hashtags>
        <user_mentions>
            <screen_name>nuget</screen_name>
            <name>NuGet Team</name>
            <id>266877025</id>
            <id_str>266877025</id_str>
            <indices>50</indices>
            <indices>56</indices>
        </user_mentions>
    </entities>
    <favorited>false</favorited>
    <retweeted>false</retweeted>
    <lang>en</lang>
</activity>
{
    "created_at":"Wed Nov 27 02:32:33 +0000 2013",
    "id":405524515980984320,
    "id_str":"405524515980984320",
    "text":"Just released a .NET Stitchz Consumer utility via @nuget Easily add Stitchz Login to your web project in 2 lines of code! #nuget #dotnet",
    "source":"web",
    "truncated":false,
    "in_reply_to_status_id":null,
    "in_reply_to_status_id_str":null,
    "in_reply_to_user_id":null,
    "in_reply_to_user_id_str":null,
    "in_reply_to_screen_name":null,
    "user":{
        "id":195980728,
        "id_str":"195980728",
        "name":"Stitchz.net",
        "screen_name":"stitchzdotnet",
        "location":"",
        "description":"Stitchz Login safely and securely authenticates users on to any website",
        "url":"http:\\/\\/t.co\\/bXUCkYJsR4",
        "entities":{
            "url":{
                "urls":[
                    {
                    "url":"http:\\/\\/t.co\\/bXUCkYJsR4",
                    "expanded_url":"http:\\/\\/www.stitchz.net\\/",
                    "display_url":"stitchz.net",
                    "indices":[0,22]
                    }
                ]
            },
            "description":{
                "urls":[]
            }
        },
        "protected":false,
        "followers_count":1,
        "friends_count":2,
        "listed_count":0,
        "created_at":"Tue Sep 28 01:21:06 +0000 2010",
        "favourites_count":0,
        "utc_offset":null,
        "time_zone":null,
        "geo_enabled":false,
        "verified":false,
        "statuses_count":3,
        "lang":"en",
        "contributors_enabled":false,
        "is_translator":false,
        "is_translation_enabled":false,
        "profile_background_color":"C0DEED",
        "profile_background_image_url":"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png",
        "profile_background_image_url_https":"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png",
        "profile_background_tile":false,
        "profile_image_url":"http:\\/\\/pbs.twimg.com\\/profile_images\\/378800000795713267\\/7a229ee59abf9d617285f140c8138eb9_normal.png",

        "profile_image_url_https":"https:\\/\\/pbs.twimg.com\\/profile_images\\/378800000795713267\\/7a229ee59abf9d617285f140c8138eb9_normal.png",         "profile_link_color":"0084B4",
        "profile_sidebar_border_color":"C0DEED",
        "profile_sidebar_fill_color":"DDEEF6",
        "profile_text_color":"333333",
        "profile_use_background_image":true,
        "default_profile":true,
        "default_profile_image":false,
        "following":false,
        "follow_request_sent":false,
        "notifications":false
    },
    "geo":null,
    "coordinates":null,
    "place":null,
    "contributors":null,
    "retweet_count":0,
    "favorite_count":0,
    "entities":{
        "hashtags":[
            {
                "text":"nuget",
                "indices":[122,128]
            },
            {
                "text":"dotnet",
                "indices":[129,136]
            }
        ],
        "symbols":[],
        "urls":[],
        "user_mentions":[
            {
                "screen_name":"nuget",
                "name":"NuGet Team",
                "id":266877025,
                "id_str":"266877025",
                "indices":[50,56]
            }
        ]
    },
    "favorited":false,
    "retweeted":false,
    "lang":"en"
}