{ "data: { "annotations": [ { "type": "iama" "value": { "iama": [Meat Popsicle] } }, { "type": "iso" "value": { "iso": [Ghosts] } }, ] } }
To make use of this information with the current App.net API can be difficult. Currently the best way is to using the Filter API which currently only works with Streaming API. Another way to simplify search is to have your own database of current users annotations.
We realize not all developers will be using Streaming or have a cache handy, so we can composed a local cache with an API that you can off-load your searches too. We hope App.net will eventually update their API to make this an easier task in the future, not requiring 3rd party APIs like this.
There is two types of objects: categories and tags. For convienence, I've composed them both in a similar structure in hopes to make extraction and processing simple. The overall structure is an unlimited nested-tree of the following generic node structure:
"NAMENODE": { "xlate": { "LANG":"STRING", } "cats": { LIST OF NODES, } "tags": { LIST OF NODES, } }
I've tried to include a sample of a category, sub-category, and tag. I've also included the complete and paired down language listing styles. "..." is used to omitted large parts of unneeded data. I'm afraid if I make this example too big, it won't be able to be easily understood in one's browser. Best thing to do is get a real sample by going to the API URL.
{ "data": [ "Hobbies" : { "xlate": { "en-us":"Hobbies", } "cats": { "Activities" : { "tags": { "Camping" : { "xlate": { "en-us":"Camping", } }, } }, "Arts & Crafts" : { ... } } }, ... "Networking" : { "tags": { "Business deals" : { "xlate": { "en-us":"Business deals" } } } } ] }
"data": [ { "7314",2 }, { "7428",1 } ]You can use the ids to pull additional information about the user (Retrieving multiple users using App.net API)
"data": [ { "annotations" : [ { "type" : "iama", "value" : { "iama" : [ "Dining Out", "C", "C++", "CSS", "HTML", "Javascript", "PHP", "VB", "Business deals", "Career opportunities", "Consulting offers", "Expertise requests", "Getting back in touch", "Job inquiries", "New ventures", "Reference requests" ] } } ], "avatar_image" : { "height" : 200, "url" : "https://d2rfichhc2fb9n.cloudfront.net/image/4/Kd_yDqphsKyOuzr3NP2g3-VxdwJ3xFTt3KWLD6Nhc4AG_sNzd2UAWWcXQmoG-Zb5AaMKW-KHxp6UhgYZg-C2LwGVoU_AuE1BlX60SGKSx4B3mm_rxM72d_33gTOsgLomC-1LP-c0Fwp0jtosDgmHExN6BLM", "width" : 200 }, "canonical_url" : "https://alpha.app.net/ryantharp", "counts" : { "followers" : 176, "following" : 369, "posts" : 3776, "stars" : 89 }, "cover_image" : { "height" : 606, "url" : "https://d2rfichhc2fb9n.cloudfront.net/image/4/ESjU2hqqXlTBmkJ8N8hL9-gaRiuNxP2PTHF_JkdrxN3HG7NNCx55DqIItHyA6pnn7Hc4u4QXZgpPcDEKxSMxf1eMJteZI7ndxQ4kqnxuk1rV6hVHtLP9rt7ngBIQvjuFcFM8BCpfOqz_YPNI5UVB-jEcIZU", "width" : 1900 }, "created_at" : "2012-08-17T23:55:35Z", "description" : { "entities" : { "hashtags" : [], "links" : [ { "len" : 24, "pos" : 81, "text" : "http://CustomWebApps.com", "url" : "http://CustomWebApps.com" }, { "len" : 29, "pos" : 227, "text" : "http://adn.customwebapps.com/", "url" : "http://adn.customwebapps.com/" } ], "mentions" : [] }, "html" : "I'm Ryan Tharp. I'm an entrepreneur and full stack developer in the North Bay at http://CustomWebApps.com. I also have a flare for game development (currently using: webgl, websockets). Find out about me and my ADN projects at http://adn.customwebapps.com/", "text" : "I'm Ryan Tharp. I'm an entrepreneur and full stack developer in the North Bay at http://CustomWebApps.com. I also have a flare for game development (currently using: webgl, websockets). Find out about me and my ADN projects at http://adn.customwebapps.com/" }, "id" : "7314", // note this is a string "locale" : "en_US", "name" : "Ryan Tharp", "timezone" : "America/Los_Angeles", "type" : "human", "username" : "ryantharp", "matches": 3 }, { "annotations" : [ { "type" : "net.app.core.directory.twitter", "value" : { "username" : "hisrandomness" } }, { "type" : "net.app.core.directory.homepage", "value" : { "url" : "http://appnetizens.com" } }, { "type" : "com.appnetizens.userinput.country", "value" : { "country" : "NL" } }, { "type" : "com.appnetizens.userinput.gender", "value" : { "gender" : "m" } }, { "type" : "net.app.core.directory.blog", "value" : { "url" : "http://appnetizens.com" } }, { "type" : "com.appnetizens.userinput.nationality", "value" : { "nationality" : "NL" } }, { "type" : "iama", "value" : { "iama" : [ "Camping", "Dining Out", "Fishing", "PHP", "Reference requests" ] } } ], "avatar_image" : { "height" : 189, "url" : "https://d2rfichhc2fb9n.cloudfront.net/image/4/Q4W-_7Xs8Befd311Y02k5c7jlpVTdlpOVjkfU9M2O1pytZQR9g6uuz9I8lEhFCiyFiZrXMKVvu9pxwX3KZJfkJye3xAiP_eTZBqTivhFkQpi0SWhUDSLYbpLwt2QnSiVgtw-OmBhF_AFG5did66KHOODGak", "width" : 189 }, "canonical_url" : "https://alpha.app.net/adrianus", "counts" : { "followers" : 322, "following" : 183, "posts" : 3674, "stars" : 34 }, "cover_image" : { "height" : 434, "url" : "https://d2rfichhc2fb9n.cloudfront.net/image/4/oe3PvS0WlqUcbw2ubf06jshoJjt88r7O4rTr704Hbs6VN7M2bsIfXohohWn5ZdiQw0EPlbcS9XYbqlQTdnotZXJgWB-fB_ZqPL1W4Yr_kd693rDx_Qv50lV4mOFxdX6eUNy6ONKaF-Wzp3pL3TtEeAtjN1g", "width" : 1357 }, "created_at" : "2012-08-18T00:04:53Z", "description" : { "entities" : { "hashtags" : [ { "len" : 3, "name" : "nl", "pos" : 156 } ], "links" : [ { "len" : 22, "pos" : 114, "text" : "http://appnetizens.com", "url" : "http://appnetizens.com" } ], "mentions" : [] }, "html" : "Investor / CFO / Derivator / Analyst / Likes to fiddle around with data and API's. I take full responsibility for http://appnetizens.com Based in Amsterdam #nl", "text" : "Investor / CFO / Derivator / Analyst / Likes to fiddle around with data and API's. I take full responsibility for http://appnetizens.com Based in Amsterdam #nl" }, "id" : "7428", "locale" : "nl_NL", "name" : "Adrianus Wagemakers", "timezone" : "Europe/Amsterdam", "type" : "human", "username" : "adrianus", "matches": 2 } ]
{ "Hobbies" : { "Activities" : { "Camping" : "Camping", "Dining Out" : "Dining Out", "Fishing" : "Fishing", "Hunting" : "Hunting" }, "Arts & Crafts" : { ... } }, ... "Networking" : { "Business deals" : "Business deals", "Career opportunities" : "Career opportunities", "Consulting offers" : "Consulting offers", "Expertise requests" : "Expertise requests", "Getting back in touch" : "Getting back in touch", "Job inquiries" : "Job inquiries", "New ventures" : "New ventures", "Reference requests" : "Reference requests" } }
Initially we choose a string-based value to keep things simple. There is a concern about the limited space available. So I'm requesting implementation that write to these annotations be respectful:
We are going to publish a master JSON categories and tag document. So all implementations will have a standard set of categories tags to increase the chances of finding matches and utilizing the space efficiently as possible. I figure the JSON format is best due to the ADN API using it as well.
We realize if we're publishing a categories and tag dictionary, we might consider switch to a numeric-based tag and including the numerical equivalents in this JSON dictionary file to save even more space. We don't initial do this because we're focusing on adoption. The simpler we make this for developers, the more client's that can utilize it. But it is something that is on the table if we can't solve the space issues
Back to top