API

YouAre API documentation to create nifty and useful applications. To get help, suggest improvements... check out our YouAre API Developer Forum.

Basics

This API is currently being developed. The easiest and only available way at this moment to use YouAre POST API is through cURL (unless you use it without authentification).

YouAre Logos. You can use our logos in your application: Download YouAre Logos.

HTTP methods:
YouAre API allows both GET or POST.

Character Encoding:
UTF-8

Formats: YouAre API supports JSON and serialized data through PHP

TimeStamps: Delivered in the format below:
Tue, 12 Aug 2008 05:37:40 GMT

Rate Limit: YouAre API doesn't have any requests limitation, but we reserve the right to do it in the future.

API Keys: To use YouAre API, there is no need for an API Key. Requests and usage can be done with no API key.

Session and Authentification. YouAre API methods are two:

  1. Without Authentification (GET methods): Used to get YouAre data (Users not authentificated might not be able to see "protected user updates" if they both are followers).
  2. With Authentification (POST methods): Used to publish and to get YouAre data (users authentificated will be able to see "protected user updates" if they both are followers).

Top

Reading data

Used to get YouAre data. Users authentificated will be able to see "protected user updates" if they both are followers.

  1. People: Latest Public Updates (Protected updates not included)

    Available Formats:

    • http://youare.com/api/people/json (can be paginated adding: /files/xxx)

      xxx is compulsory and a number specifying the pagination (1 will output the last 15 posts, 2 will output posts from 16 to 30...)

      The output will be JSON with this data:
      {"user_name":"gabubu","permalink":"http:\/\/youare.com\/gabubu\/2008\/08\/12\/23141","description":"This is a test for the API documentation","publish_data":"Tue, 12 Aug 2008 08:42:52 GMT"}

    • http://youare.com/api/people/php (can be paginated adding /files/xxx)

      xxx is compulsory and a number specifying the pagination (1 will output the last 15 posts, 2 will output posts from 16 to 30...)

      The output will be serialized PHP with this data:
      {s:9:"user_name";s:6:"gabubu";s:9:"permalink";s:41:"http://youare.com/gabubu/2008/08/12/23141";s:11:"description";s:40:"This is a test for the API documentation";s:12:"publish_data";s:29:"Tue, 12 Aug 2008 08:42:52 GMT";}

    In both cases:
    user_name = Username
    permalink = Permalink of the entry
    description = Text

  2. Latest User Updates (If you are not authentificated, protected updates will not be displayed)

    Available Formats:

    • http://youare.com/api/updates/zzz/json (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the last 50 posts, 2 will output posts from 51 to 100...)

      The output will be JSON with this data:
      {"user_name":"gabubu","permalink":"http:\/\/youare.com\/gabubu\/2008\/08\/12\/23141","description":"This is a test for the API documentation","publish_data":"Tue, 12 Aug 2008 08:42:52 GMT"}

    • http://youare.com/api/updates/zzz/php (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the last 50 posts, 2 will output posts from 50 to 100 .. )

      The output will be serialized PHP with this data:
      {s:9:"user_name";s:6:"gabubu";s:9:"permalink";s:41:"http://youare.com/gabubu/2008/08/12/23141";s:11:"description";s:40:"This is a test for the API documentation";s:12:"publish_data";s:29:"Tue, 12 Aug 2008 08:42:52 GMT";}

    In both cases:
    user_name = Username
    permalink = Permalink of the entry
    description = Text

  3. User + Following Latest Updates (If you are not authentificated, protected updates will not be displayed)

    Available Formats:

    • http://youare.com/api/updates/zzz/following/json (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the last 15 posts, 2 will output posts from 16 to 30 .. )

      The output will be JSON with this data:
      {"user_name":"gabubu","permalink":"http:\/\/youare.com\/gabubu\/2008\/08\/12\/23141","description":"This is a test for the API documentation","publish_data":"Tue, 12 Aug 2008 08:42:52 GMT"}

    • http://youare.com/api/updates/zzz/following/php (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the last 15 posts, 2 will output posts from 16 to 30...)

      The output will be serialized PHP with this data:
      {s:9:"user_name";s:6:"gabubu";s:9:"permalink";s:41:"http://youare.com/gabubu/2008/08/12/23141";s:11:"description";s:40:"This is a test for the API documentation";s:12:"publish_data";s:29:"Tue, 12 Aug 2008 08:42:52 GMT";}

    In both cases:
    user_name = Username
    permalink = Permalink of the entry
    description = Text

  4. Latest User Weblife Updates (If you are not authentificated, protected updates will not be displayed)

    Available Formats:

    • http://youare.com/api/updates/zzz/weblife/json (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the last 15 posts, 2 will output posts from 16 to 30...)

      The output will be JSON with this data:
      {"user_name":"gabubu","permalink":"http:\/\/youare.com\/gabubu\/weblife\/7983","description":"Introducing the CSS World Awards<\/a>","publish_data":"Wed, 09 Jul 2008 02:51:06 GMT"}

    • http://youare.com/api/updates/zzz/weblife/php (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the last 15 posts, 2 will output posts from 16 to 30...)

      The output will be serialized PHP with this data:
      {s:9:"user_name";s:6:"gabubu";s:9:"permalink";s:37:"http://youare.com/gabubu/weblife/7983";s:11:"description";s:116:"Introducing the CSS World Awards";s:12:"publish_data";s:29:"Wed, 09 Jul 2008 02:51:06 GMT";}

    In both cases:
    user_name = Username
    permalink = Permalink of the entry
    description = Text

  5. User profile (Work Experience, Education info, Bio)

    Available Formats:

    • http://youare.com/api/profile/zzz/json

      zzz stands for the username

      The output will be JSON with this data:
      {"rss_id":67295,"username":"gabubu","realname":"Gabriel Segura","avatar":"avatar_31419_10","following":"238","followers":"128","country_iso":"es",
      "country":"Spain ","city":"Madrid","description":"Mum used to say i was quite smart. She was right."},"jobs":[{"company_name":"YouAre.com","position":"Head SysAdmin \/ Web developer \/ Master of the Universe","city":"Madrid",
      "data_from":"2007-09-01",
      "data_to":"2008-10-01","from_year":"2007","until_year":"2008",
      "from_month":"September","until_month":"10",
      "period":"14","industry":"Telecommunications and Technology",
      "website":"http:\/\/youare.com","until":"October 2008"},{"company_name":"Ericsson Spain","position":"GSM\/GPRS\/UMTS Service Engineer",
      "city":"Madrid",
      "data_from":"1999-07-01",
      "data_to":"2008-10-01","from_year":"1999",
      "until_year":"2008","from_month":"July",
      "until_month":"10","period":"112",
      "industry":"Telecommunications and Technology",
      "website":"http:\/\/www.ericsson.com","until":"October 2008"},{"company_name":"Fiat Spain","position":"Head programmer","city":"Madrid",
      "data_from":"1998-09-01","data_to":"1999-06-01","from_year":"1998",
      "until_year":"1999","from_month":"September","until_month":"6",
      "period":"10",
      "industry":"Telecommunications and Technology",
      "website":null,"until":"June 1999"}],
      "education":[{"school_name":"Linkopings University",
      "degree":"Telecomunications Engineer","city":"Linkoping",
      "data_from":"1998-01-01","data_to":"2000-01-01","from_year":"1998",
      "until_year":"2000","website":"http:\/\/liu.se","until":"2000"},
      {"school_name":"Universidad Alcal\u00e1 de Henares","degree":"Telecomunications Engineer","city":"Madrid",
      "data_from":"1993-01-01",
      "data_to":"1998-01-01","from_year":"1993","until_year":"1998",
      "website":"http:\/\/uah.es","until":"1998"}

    • http://youare.com/api/profile/zzz/php

      zzz stands for the username

      The output will be serialized PHP with this data:
      {s:6:"rss_id";i:67295;s:8:"username";s:6:"gabubu";s:8:"realname";s:14:"Gabriel Segura";s:6:"avatar";s:15:"avatar_31419_10";s:9:"following";s:3:"238";s:9:"followers";s:3:"128";
      s:11:"country_iso";s:2:"es";s:7:"country";s:6:"Spain ";s:4:"city";s:6:"Madrid";s:11:"description";s:49:"Mum used to say i was quite smart. She was right.";}s:4:"jobs";
      a:3:{i:0;a:13:{s:12:"company_name";s:10:"YouAre.com";
      s:8:"position";s:54:"Head SysAdmin / Web developer / Master of the Universe";s:4:"city";s:6:"Madrid";
      s:9:"data_from";s:10:"2007-09-01";s:7:"data_to";
      s:10:"2008-10-01";s:9:"from_year";s:4:"2007";
      s:10:"until_year";s:4:"2008";s:10:"from_month";s:9:"September"; s:11:"until_month";s:2:"10";s:6:"period";s:2:"14";
      s:8:"industry";s:33:"Telecommunications and Technology";
      s:7:"website";s:17:"http://youare.com";
      s:5:"until";s:12:"October 2008";}i:1;a:13:{s:12:"company_name";s:14:"Ericsson Spain";s:8:"position";s:30:"GSM/GPRS/UMTS Service Engineer";
      s:4:"city";s:6:"Madrid";s:9:"data_from";s:10:"1999-07-01";
      s:7:"data_to";s:10:"2008-10-01";s:9:"from_year";s:4:"1999";
      s:10:"until_year";s:4:"2008";s:10:"from_month";s:4:"July";s:11:"until_month";s:2:"10";s:6:"period";
      s:3:"112";s:8:"industry";
      s:33:"Telecommunications and Technology";s:7:"website";
      s:23:"http://www.ericsson.com";
      s:5:"until";
      s:12:"October 2008";}i:2;a:13:{s:12:"company_name";s:10:"Fiat Spain";
      s:8:"position";s:15:"Head programmer";s:4:"city";s:6:"Madrid";
      s:9:"data_from";s:10:"1998-09-01";s:7:"data_to";
      s:10:"1999-06-01";s:9:"from_year";s:4:"1998";s:10:"until_year";s:4:"1999";
      s:10:"from_month";s:9:"September";s:11:"until_month";s:1:"6";
      s:6:"period";s:2:"10";s:8:"industry";s:33:"Telecommunications and Technology";
      s:7:"website";N;s:5:"until";s:9:"June 1999";}}s:9:"education";a:2:{i:0;a:9:{s:11:"school_name";s:21:"Linkopings University";
      s:6:"degree";s:26:"Telecomunications Engineer";
      s:4:"city";s:9:"Linkoping";s:9:"data_from";s:10:"1998-01-01";s:7:"data_to";s:10:"2000-01-01";
      s:9:"from_year";s:4:"1998";s:10:"until_year";s:4:"2000";
      s:7:"website";s:13:"http://liu.se";s:5:"until";s:4:"2000";}i:1;a:9:{s:11:"school_name";
      s:30:"Universidad Alcal· de Henares";s:6:"degree";s:26:"Telecomunications Engineer";s:4:"city";
      s:6:"Madrid";s:9:"data_from";s:10:"1993-01-01";
      s:7:"data_to";s:10:"1998-01-01";
      s:9:"from_year";s:4:"1993";s:10:"until_year";s:4:"1998";
      s:7:"website";s:13:"http://uah.es";s:5:"until";s:4:"1998";}

  6. User followers

    Available Formats:

    • http://youare.com/api/zzz/followers/json (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the first 15 followers, 2 will output followers from 16 to 30...). Alphabetically ordered.

      The output will be JSON with this data:
      followers":[{"user_id":"31415","user_name":"alfonso","user_avatar":"avatar_31415_2",
      "num_fwng":"10","num_fwrs":"32","name":"Alfonso Jim\u00e9nez","country":"United Kingdom ",
      "hometown":"5","privacy_age":"0","privacy_city":"0","num_fwng_prth":"(10)","num_fwrs_prth":"(32)","age":", 22 years old","summary":"Web Developer ","city":"Manchester"}

    • http://youare.com/api/zzz/followers/php (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the first 15 followers, 2 will output followers from 16 to 30...). Alphabetically ordered.

      The output will be serialized PHP with this data:
      {s:9:"followers";a:20:{i:0;a:15:{s:7:"user_id";s:5:"31415";s:9:"user_name";s:7:"alfonso";
      s:11:"user_avatar";s:14:"avatar_31415_2";s:8:"num_fwng";s:2:"10";s:8:"num_fwrs";s:2:"32";s:4:"name";
      s:16:"Alfonso JimÈnez";s:7:"country";s:15:"United Kingdom ";s:8:"hometown";
      s:1:"5";s:11:"privacy_age";s:1:"0";s:12:"privacy_city";s:1:"0";s:13:"num_fwng_prth";
      s:4:"(10)";s:13:"num_fwrs_prth";s:4:"(32)";s:3:"age";
      s:14:", 22 years old";s:7:"summary";s:14:"Web Developer ";s:4:"city";s:10:"Manchester";}

  7. User Following

    Available Formats:

    • http://youare.com/api/zzz/following/json (can be paginated adding /files/xxx)
    • http://youare.com/api/zzz/following/php (can be paginated adding /files/xxx

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the first 15 followings, 2 will output followings from 16 to 30...). Alphabetically ordered.

      The output are exactly the same as chapter 6.

  8. User Following Filtering (If you are not authentificated, protected updates will not be displayed)

    Available Formats:

    • http://youare.com/api/zzz/following/xxx/json (can be paginated adding /files/xxx)
    • http://youare.com/api/zzz/following/xxx/php (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the first 15 followings, 2 will output followings from 16 to 30...). Alphabetically ordered.
      yyy is compulsory (if not filtering use chapter 8 format) and can be several values : (contacts|acquaintances|friends|met|co-workers|colleagues|children|parents|siblings|spouses|kin|crushes|dates|sweethearts).

      The output are exactly the same as chapter 6.

  9. People from Cities / Countries

    Available Formats:

    • http://youare.com/api/geo/xxx/zzz/json (can be paginated adding /files/yyy)

      xxx stands for the country
      zzz stands for the city. Not compulsory.
      yyy is compulsory and a number specifying the pagination (1 will output the first 15 users, 2 will output users from 16 to 30...). Alphabetically ordered.

      Example 1
      http://youare.com/api/geo/spain/json

      Output (JSON with this data)
      {"name":"Abel ","country":"Spain ","age":"","city":"Cerdanyola del Valles","rss_id":70203,"username":"jazze",
      "avatar":"avatar_34327_ 1","following":"1","followers":"1","country_iso":"es","description":""},{"name":"Abel Castosa",
      "country":"Spain ","age":", 19 years old","city":"Culleredo","rss_id":67491,"username":"abelcastosa","avatar":"jeronimous",
      "following":"0","followers":"0","country_iso":"es","description":""}

      Example 2
      http://youare.com/api/geo/spain/madrid/json

      Output (JSON with this data)
      {"name":"Adrian Navarro","country":"Spain ","age":", 14 years old","city":"Madrid","rss_id":67441,
      "username":"adrinavarro","avatar":"avatar_31565_ 1","following":"3","followers":"2","country_iso":"es",
      "description":"Just freaking here."},{"name":"Alberto Cruz","country":"Spain ","age":", 24 years old",
      "city":"Madrid","rss_id":67568,"username":"creeel","avatar":"jeronimous",
      "following":"0","followers":"0","country_iso":"es","description":""}

    • http://youare.com/api/geo/xxx/zzz/php (can be paginated adding /files/yyy)

      xxx stands for the country
      zzz stands for the city. Not compulsory.
      yyy is compulsory and a number specifying the pagination (1 will output the first 15 users, 2 will output users from 16 to 30...). Alphabetically ordered.

      Example 1 (Serialized PHP data)
      http://youare.com/api/geo/spain/php

      {s:4:"name";s:5:"Abel ";s:7:"country";s:6:"Spain ";s:3:"age";s:0:"";s:4:"city";s:21:"Cerdanyola del Valles";
      s:6:"rss_id";i:70203;s:8:"username";s: 5:"jazze";s:6:"avatar";s:14:"avatar_34327_1";
      s:9:"following";s:1:"1";s:9:"followers";s:1:"1";s:11:"country_iso";s:2:"es";s:11:"description";s: 0:"";}i:1;a:11:{s:4:"name";
      s:12:"Abel Castosa";s:7:"country";s:6:"Spain";s:3:"age";s:14:",19 years old";
      s:4:"city";s:9:"Culleredo";s:6:"rss_id";i: 67491;s:8:"username";s:11:"abelcastosa";
      s:6:"avatar";s:10:"jeronimous";s:9:"following";s:1:"0";s:9:"followers";
      s:1:"0";s:11:"country_iso";s:2:"es";s:11:"description";s:0:"";}

      Example 2 (Serialized PHP data)
      http://youare.com/api/geo/spain/madrid/php

      Output (JSON with this data)
      {s:4:"name";s:15:"Adrián Navarro";s:7:"country";s:6:"Spain ";s:3:"age";s:14:", 14 years old";s:4:"city";s:6:"Madrid";
      s:6:"rss_id";i:67441;s:8:"username";s:11:"adrinavarro";s:6:"avatar";s:14:"avatar_31565_ 1";s:9:"following";s:1:"3";
      s:9:"followers";s:1:"2";s: 11:"country_iso";s:2:"es";s:11:"description";s:19:"Just freaking here.";}i:1;a:11:{s:4:"name";
      s:12:"Alberto Cruz";s:7:"country";s:6:"Spain ";s:3:"age";s:14:", 24 years old";
      s:4:"city";s:6:"Madrid";s:6:"rss_id";i:67568;s:8:"username";s:6:"creeel";s:6:"avatar";
      s:10:"jeronimous";s:9:"following";s:1:"0";s:9:"followers";s:1:"0";
      s:11:"country_iso";s:2:"es";s:11:"description";s:0:"";}

  10. User favorites (If you are not authentificated, protected updates will not be displayed)

    Available Formats:

    • http://youare.com/api/zzz/favorites/json (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the first 15 favorite updates, 2 will output favorite updates from 16 to 30...)

      The output will be JSON with this data:
      {favorites":[{"data":"Web Design Toolbox: 130+ New Tools to Make You a Better and Faster Designer. Mencionan a CSS Mania http:\/\/mashable.com\/2008\/11\/05\/web-design-toolbox\/<\/a>","description":null,"user_name":"jlantunez","avatar":"avatar_31417_37","name":"Jos\u00e9 Luis Ant\u00fanez","date":"2008-11-06 12:33","permalink":"http:\/\/youare.com\/jlantunez\/2008\/11\/06\/100213"}

    • http://youare.com/api/zzz/favorites/php (can be paginated adding /files/xxx)

      zzz stands for the username
      xxx is compulsory and a number specifying the pagination (1 will output the first 15 favorite updates, 2 will output favourite updates from 16 to 30...)

      The output will be serialized PHP with this data:
      {favorites";a:15:{i:0;a:7:{s:4:"data";s:238:"Web Design Toolbox: 130+ New Tools to Make You a Better and Faster Designer. Mencionan a CSS Mania http://mashable.com/2008/11/05/web-design-toolbox/";
      s:11:"description";N;s:9:"user_name";s:9:"jlantunez";s:6:"avatar";s:15:"avatar_31417_37";s:4:"name";
      s:19:"JosÈ Luis Ant˙nez";s:4:"date";s:16:"2008-11-06 12:33";s:9:"permalink";s:45:"http://youare.com/jlantunez/2008/11/06/100213";

Top

Writing data (Authentification required)

Used to publish YouAre data (all of them POST methods):

  1. Creating text content

    URL to POST: http://youare.com/api_auth/new/text/
    curl FORMAT: curl -u user:password -d status="This is an API test message"
    http://youare.com/api_auth/new/text

    user: YouAre username (or email address)
    password: YouAre password
    status: Text to update. (Remember to convert to UTF-8 and if URLs are inserted URL encode parameters that take complex strings).

    Output:
    {"content_id":"23335","content_data":"Last API
    test","day":"13","month":"8","year":"2008","user":"gabubu","permalink":"2008\/08\/13\/23335"}{"service":"YouAre"}

    content_id: Content Identity (for future features)
    content_data: Text inserted
    day: Day inserted
    month: Month inserted
    year: Year inserted
    user: User owner
    permalink: Permalink to the entry (inside YouAre)

  2. Creating video Content

    URL to POST: http://youare.com/api_auth/new/video/
    curl FORMAT: curl -u user:password -d video_description="This is the Video Description" -d url-pub="http://youtube.com/watch?v=y8Kyi0WNg40" http://youare.com/api_auth/new/video

    user: YouAre username (or email address)
    password: YouAre password
    video_description: Short video intro
    url-pub: URL to watch the video. You can publish videos from any flash video sharing service. This can be done in two ways.

    Output:
    {"content_id":"23336","content_data":"y8Kyi0WNg40","content_description":"This is the Video Description","day":"13","month":"8","year":"2008","user":"gabubu","video_permalink":"http:\/\/www.youtube.com\/watch?v=y8Kyi0WNg40","permalink":"2008\/08\/13\/23336"}{"service":"YouAre"}

    content_id: Content Identity (for future features)
    content_description: Video description
    content_data: Stripped parts of the video (for future features)
    day: Day inserted
    month: Month inserted
    year: Year inserted
    user: User owner
    video_permalink: Permalink to the video (outside YouAre)
    permalink: Permalink to the entry (inside YouAre)

  3. Creating image Content from URL

    URL to POST: http://youare.com/api_auth/new/image/
    curl FORMAT: option One: curl -u user:password -d image_description="This is the Image Description" -d url-pub="http://flickr.com/photos/rbolance/313103922" http://youare.com/api_auth/new/image
    option Two: curl -u user:password -d image_description="This is the Image Description" -d url-pub="http://farm1.static.flickr.com/107/313103922_601db3cae1.jpg" http://youare.com/api_auth/new/image

    user: Username (or email address)
    password: password
    image_description: Short image intro
    url-pub: URL to see the picture or URL to the .jpg/gif/png directly (as seen in the examples)

    Output:

    • Option One

      {"content_id":"23338","content_data":"a:2:{s:15:\"image_permalink\";s:43:\"http:\/\/flickr.com\/photos\/rbolance\/313103922\";s:4:\"data\";s:44:\"1.static.flickr.com\/107\/313103922_601db3cae1\";}","content_description":"This is the Image Description","day":"13","month":"8","year":"2008","user":"gabubu","image_permalink":"http:\/\/flickr.com\/photos\/rbolance\/313103922","permalink":"2008\/08\/13\/23338"}{"service":"YouAre"}

    • Option Two:

      {"content_id":"23337","content_data":"","content_description":"This is the Image Description","day":"13","month":"8","year":"2008","user":"gabubu","image_permalink":"http:\/\/youare.s3.amazonaws.com\/31419-.jpg","permalink":"2008\/08\/13\/23337"}

    content_id: Content Identity (for future features)
    content_description: Image intro
    day: Day inserted
    month: Month inserted
    year: Year inserted
    image_permalink: Permalink to the Image (outside YouAre)
    permalink: Permalink to the entry (inside YouAre)
    content_data: Not useful as all the contents are delivered in separated variables (for future features)

  4. Creating image Content Uploading File

    URL to POST: http://youare.com/api_auth/new/image_upload/

    curl FORMAT: curl -u user:password -d image_description="This is the Image Description" -d
    upload-file="/home/mydomain.com/test.jpg" http://youare.com/api_auth/new/image

    user: Username (or email address)
    password: password
    image_description: Short image intro
    upload-file: Path to the local directory where the file is stored (as seen in the examples).
    Obviously if you are uploading a file from your server, it has to be the path in YOUR server. Otherwise, chapter 3 will be used.

    Curl Example:

    	<?php
    	$localfile = '/home/mydomain/test.jpg'; 
    	$ch = curl_init(); 
    	curl_setopt($ch, CURLOPT_URL, 'http://youare.com/api_auth/new/image_upload'); 
    	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    	curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); 
    	curl_setopt($ch, CURLOPT_USERPWD, 'username:password'); 
    	curl_setopt($ch, CURLOPT_POST, true); 
    	curl_setopt($ch, CURLOPT_POSTFIELDS, array('showdata' => '1', 'image_description' => 'this is the image description', 'upload-file' => '@'.$localfile));
    
    	curl_setopt($ch, CURLOPT_TIMEOUT, 10); // timeout 10 segs  
    	$data = curl_exec($ch); 
    	curl_close($ch); 
    	echo $data; 
    	?>
    	
  5. Start Following users

    Available Formats:

    • http//www.youare.com/api_auth/follow/xxxx/((contact|acquaintance|friend|met|co-worker|colleague|child|parent|sibling|spouse|kin|crush|date|sweetheart)/?)+/json

      xxx for the user to follow.
      Several type of following can be set.

      Example:
      http://www.youare.com/api_auth/follow/jlantunez/friend/met/colleague/json

      Ouput:
      {"service":"YouAre","title":"Follow user","follow":{"result":true,"messages":"Now you are following jlantunez"}}

    • http//www.youare.com/api_auth/follow/xxxx/((contact|acquaintance|friend|met|co-worker|colleague|child|parent|sibling|spouse|kin|crush|date|sweetheart)/?)+/php )

      xxx for the user to follow.
      Several type of following can be set.

      Example:
      http://www.youare.com/api_auth/follow/jlantunez/friend/met/colleague/php

      Ouput:
      a:3:{s:7:"service";s:6:"YouAre";s:5:"title";s:11:"Follow user";s:6:"follow";a:2:{s:6:"result";b:1;s:8:"messages";s:31:"Now you are following jlantunez";}}

      Ouput in case of error:
      {"service":"YouAre","title":"Follow | remove","remove_follow":{"result":false,"messages":"There is not any user named xxx"}}

  6. Stop Following users

    Available Formats:

    • http://youare.com/api_auth/follow/xxx/remove/json

      xxx stands for the user.

      Example:
      http://youare.com/api_auth/follow/jlantunez/remove/json

      Ouput:
      {"service":"YouAre","title":"Follow | remove","remove_follow":{"result":true,"messages":"Now you are not following jlantunez"}}

    • http://youare.com/api_auth/follow/xxx/remove/php)

      xxx stands for the user

      Example:
      http://youare.com/api_auth/follow/jlantunez/remove/php

      Ouput:
      a:3:{s:7:"service";s:6:"YouAre";s:5:"title";s:15:"Follow | remove";s:13:"remove_follow";a:2:{s:6:"result";b:1;s:8:"messages";s:35:"Now you are not following jlantunez";}}

  7. Inbox Messages Management
    • View Inbox Messages for the user

      Available Formats:

      http://youare.com/api_auth/inbox/(json|php)

      Ouputs:

      For JSON
      {"service":"YouAre","title":"Inbox","inbox":[{"message_id":"376","avatar":"avatar_31417_37","user_name":"jlantunez",
      "message":"testeanado aAPI inbox","date":"2008-11-11 09:52:14"}]}

      For PHP
      a:3:{s:7:"service";s:6:"YouAre";s:5:"title";s:5:"Inbox";s:5:"inbox";a:1:{i:0;a:5:{s:10:"message_id";s:3:"376";
      s:6:"avatar";s:15:"avatar_31417_37";s:9:"user_name";s:9:"jlantunez";s:7:"message";s:21:"testeanado aAPI inbox";s:4:"date";s:19:"2008-11-11 09:52:14";}}}

    • View Messages Sent by the user

      Available Formats:

      http://youare.com/api_auth/inbox/sent/(json|php)

      Ouputs:

      For JSON
      {"service":"YouAre","title":"Inbox | Sent","inbox":[{"message_id":"375","avatar":"avatar_31419_1","user_name":"mariamtnez","message":"See you later in Hotel Barcel\u00f3 ?","date":"2008-11-11 09:10:20"}]}

      For PHP
      a:3:{s:7:"service";s:6:"YouAre";s:5:"title";s:12:"Inbox | Sent";s:5:"inbox";a:1:{i:0;a:5:{s:10:"message_id";
      s:3:"375";s:6:"avatar";s:14:"avatar_31419_1";s:9:"user_name";s:11:"mariamtnez";
      s:7:"message";s:62:"See you later in Hotel BarcelÛ ?";s:4:"date";s:19:"2008-11-11 09:10:20";}}}

    • Delete Inbox Messages

      Available Formats:

      http://youare.com/api_auth/inbox/remove/xxx/(json|php)

      xxx stands for the id of the message (message_id in previous API Inbox chapters)

      Ouputs:

      Example: http://youare.com/api_auth/inbox/remove/375/json
      For JSON
      {"service":"YouAre","title":"Inbox | delete","inbox_remove":{"message":"The message you sent has been remove","result":true}}

    • Send Inbox Message

      URL to POST: http://youare.com/api_auth/inbox/xxx/(json|php)

      curl example:

      <?php
      $ch = curl_init(); 
      curl_setopt($ch, CURLOPT_URL, 'http://youare.com/api_auth/inbox/xxx/json'); 
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
      curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
      curl_setopt($ch, CURLOPT_USERPWD, 'username:password'); 
      curl_setopt($ch, CURLOPT_POSTFIELDS, "message=1234"); 
      curl_setopt($ch, CURLOPT_POST, true); 
      curl_setopt($ch, CURLOPT_TIMEOUT, 10); // timeout 10 segs  
      $data = curl_exec($ch); 
      curl_close($ch);
      echo ($data);
      
      ?>

      xxx stands for the user you are sending the message to.

  8. Notification settings

    Available Formats:

    • http://youare.com/api_auth/settings/notifications/new_following/xxx/private_messages/yyy/replies/zzz/newsletter/qqq/json

      xxx stands for true or false (related to notifications when new user starts following you)
      yyy stands for true or false (related to notifications when you receive an inbox message)
      zzz stands for true or false (related to notifications when a user replies to you)
      qqq stands for true or false (related to notifications in case you want to receive newsletters from the YouAre Team)

      xxx, yyy, zzz and qqq are not compulsory unless you want to modify them.

      Ouputs:

      Example 1: http://youare.com/api_auth/settings/notifications/new_following/true/private_messages/true/replies/false/newsletter/true/json

      This will set to true notifications when you have a new following, when a private message has been sent to you, and confirms you want to receive newsletters. False for notifications when you receive a reply:
      {"service":"YouAre","title":"Notifications | Settings","follow":{"result":{"new_following":"true","private_messages":"true","replies":"false","newsletter":"true"}}}

      Example 2: http://youare.com/api_auth/settings/notifications/new_following/true/newsletter/true/json

      Parameters not passed will remain untouched.:
      {"service":"YouAre","title":"Notifications | Settings","follow":{"result":{"new_following":"true","newsletter":"true"}}}

Top

Search people or cities (With/without authentification)

Available Formats:

  1. http://youare.com/api/search/zzz/json (can be paginated adding /files/xxx)

    zzz stands for the username
    xxx is compulsory and a number specifying the pagination (1 will output 10 users, 2 will output users from 11 to 20...)

    The output will be JSON with this data:
    {"name":"Gabriel Segura","country":"Spain ","age":", 32 years old",
    "city":"Madrid","rss_id":67295,"username":"gabubu","avatar":"avatar_31419_8","following":"134",
    "followers":"82","country_iso":"es","description":"Mum used to say i was quite smart. She was right."}]}

  2. http://youare.com/api/search/zzz/php (can be paginated adding /files/xxx)

    zzz stands for the username
    xxx is compulsory and a number specifying the pagination (1 will output 10 users, 2 will output users from 11 to 20...)

    The output will be serialized PHP with this data:
    s:4:"name";s:14:"Gabriel Segura";s:7:"country";s:6:"Spain ";s:3:"age";s:14:",32 years old";
    s:4:"city";s:6:"Madrid";s:6:"rss_id";i:67295;s:8:"username";s:6:"gabubu";s:6:"avatar";
    s:14:"avatar_31419_8";s:9:"following";s:3:"134";s:9:"followers";s:2:"82";
    s:11:"country_iso";s:2:"es";s:11:"description";s:49:"Mum used to say i was quite smart. She was right.";}}}

In both cases:
name = Real Name (First and second name)
country = Country
age = Age
city = City
rss_id = RSS ID (in the example link will be: http://youare.com/feeds/67295/rss)
user_name = Username
avatar = Avatar number (YouAre stores 3 avatar sizes. In the example: http://youare.s3.amazonaws.com/avatar_31419_8_big.png , http://youare.s3.amazonaws.com/avatar_31419_8_mid.png , http://youare.s3.amazonaws.com/avatar_31419_8_mini.png )
following = User following
followers = User followers
description = Bio

Top

HTTP Status Codes

Return values:

Top

PHP Code Sample (Publishing a Video)

<?php
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, 'http://youare.com/api_auth/new/video'); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);

// Authorization
curl_setopt($ch, CURLOPT_USERPWD, 'username:password');  // username can be also the email address you've signed with into YouAre 
curl_setopt($ch, CURLOPT_POSTFIELDS, "video_description=Videodescription&url-pub=http://youtube.com/watch?v=y8Kyi0WNg40"); 
curl_setopt($ch, CURLOPT_POST, true); 
curl_setopt($ch, CURLOPT_TIMEOUT, 10); // timeout 10 segs  
$data = curl_exec($ch); 
curl_close($ch);

// Display DATA and process done

echo ($data); // In case you want to see also data from the post bakground process

?>

If you have any questions check out YouAre Api Group or contact us.