[WebDNA] More APIs - Viral Heat - Twitter Data Pipe
This WebDNA talk-list message is from
2011
It keeps the original formatting.
numero = 106397
interpreted = N
texte = --002354470638080517049f039c67Content-Type: text/plain; charset=ISO-8859-1Viral Heat is a Social Listening platform that I use to gather research anddata - in this example tweets. It has a free api, but I use the pay service.Connecting to and parsing the api is pretty straight forward. Here's thecode if you want to try it out ever.Here's my post:http://www.bastedo.com/2011/03/api-viralheat-twitter-data-pipe/Here's the info on the API: http://www.viralheat.com/api/mentions_apiHere is a sample of the output:http://www.tenplusone.com/apis/viralHeat_twitterMentions.htmlAll the other Viral Heat api's are similar though each has a differentslightly different path structure and output and you'll have to adjust theparsing. The is a dynamic way to create and add fields based on the parsedxml coming soon as well - probably covered beforeHere is a sample of the xml that the api outputs:XXXXXXXXXXXXXXXXXXXXXXXSuchard Hot Chocolate, T-Discs for TassimoCoffeemakers, 8-Count Packages http://bit.ly/fzQndPTwitterMon Mar 21 12:01:55 UTC 2011sandrahayes2010sandra hayes http://twitter.com/sandrahayes2010/statuses/49802915870806016 http://twitter.com/sandrahayes2010http://a1.twimg.com/sticky/default_profile_images/default_profile_0_normal.png796b85f2-8d97-3244-af90-023290a7257e10entrueHere's the code for the archives.:[text]errorCatch=1[/text][text]showVariables=1[/text][!]--------Function Variables-------[/!][text]theDOMAIN=www.viralheat.com[/text][text]thePATH=/api/[/text][text]theMethod=twitter/mentions[/text][text]profile_id=XXXXXXX[/text][text]theAPIkey=XXXXXXXXXX[/text][text]MyTestVariable=[!][/!][TCPConnect host=[theDOMAIN]][TCPSend skipheader=T]GET[thePATH][theMethod]?profile_id=[profile_id]&api_key=[theAPIkey]HTTP/1.0[UnURL]%0D%0A[/Unurl]Host:[theDOMAIN][UnURL]%0D%0A%0D%0A[/UnURL][/TCPSend][/TCPConnect][/text][xmlparse var=xml_var2][MyTestVariable][/xmlparse] [xmlnodes ref=xml_var2&path=named:entry][!]---[name]=[value] --[/!] [xmlnodes] [!]--- - [name]=[value] --[/!] [xmlnodes] [!]--- -- [name]=[value] --[/!][!]-----VH_T_message----[/!][showif [name]=message] [text]VH_T_message=[value][/text][/showif][!]-----VH_T_platform----[/!][showif [name]=platform] [text]VH_T_platform=[value][/text][/showif][!]-----VH_T_date_published----[/!][showif [name]=date_published] [text]VH_T_date_published=[value][/text][/showif][!]-----VH_T_author----[/!][showif [name]=author] [text]VH_T_author=[value][/text][/showif][!]-----VH_T_author_display_name----[/!][showif [name]=author_display_name] [text]VH_T_author_display_name=[value][/text][/showif][!]-----VH_T_link----[/!][showif [name]=link] [text]VH_T_link=[value][/text][/showif][!]-----VH_T_profile_link----[/!][showif [name]=profile_link] [text]VH_T_profile_link=[value][/text][/showif][!]-----VH_T_profile_image_link----[/!][showif [name]=profile_image_link] [text]VH_T_profile_image_link=[value][/text][/showif][!]-----VH_T_record_hash----[/!][showif [name]=record_hash] [text]VH_T_record_hash=[value][/text][/showif][!]-----VH_T_positive_score----[/!][showif [name]=positive_score] [text]VH_T_positive_score=[value][/text][/showif][!]-----VH_T_negative_score----[/!][showif [name]=negative_score] [text]VH_T_negative_score=[value][/text][/showif][!]-----VH_T_language----[/!][showif [name]=language] [text]VH_T_language=[value][/text][/showif][!]-----VH_T_tweet_contains_link----[/!][showif [name]=tweet_contains_link] [text]VH_T_tweet_contains_link=[value][/text][/showif][/xmlnodes][showif [name]=tweet] [showif [showVariables]=1] [!]------Show Variables----[/!][!]----Record to database here or do more api work -------[/!] VH_T_message: [VH_T_message] VH_T_platform: [VH_T_platform] VH_T_date_published: [VH_T_date_published] VH_T_author: [VH_T_author] VH_T_author_display_name: [VH_T_author_display_name] VH_T_link: [VH_T_link] VH_T_profile_link: [VH_T_profile_link] VH_T_profile_image_link: [VH_T_profile_image_link] VH_T_record_hash: [VH_T_record_hash] VH_T_positive_score: [VH_T_positive_score] VH_T_negative_score: [VH_T_negative_score] VH_T_language: [VH_T_language] VH_T_VH_T_tweet_contains_link:[VH_T_tweet_contains_link]
------------------------------------------------------------------------------------------------------------------ [/showif][/showif][/xmlnodes][/xmlnodes]--002354470638080517049f039c67Content-Type: text/html; charset=ISO-8859-1Content-Transfer-Encoding: quoted-printableViral Heat is a Social Listening platform that I use to gather research and= data - in this example tweets. It has a free api, but I use the pay servic=e. Connecting to and parsing the api is pretty straight forward. Here=9;s the code if you want to try it out ever.
All the other Viral Heat api's are similar= though each has a different slightly different path structure and output a=nd you'll have to adjust the parsing. The is a dynamic way to create an=d add fields based on the parsed xml coming soon as well - probably covered= before
[WebDNA] More APIs - Viral Heat - Twitter Data Pipe (David Bastedo 2011)
--002354470638080517049f039c67Content-Type: text/plain; charset=ISO-8859-1Viral Heat is a Social Listening platform that I use to gather research anddata - in this example tweets. It has a free api, but I use the pay service.Connecting to and parsing the api is pretty straight forward. Here's thecode if you want to try it out ever.Here's my post:http://www.bastedo.com/2011/03/api-viralheat-twitter-data-pipe/Here's the info on the API: http://www.viralheat.com/api/mentions_apiHere is a sample of the output:http://www.tenplusone.com/apis/viralHeat_twitterMentions.htmlAll the other Viral Heat api's are similar though each has a differentslightly different path structure and output and you'll have to adjust theparsing. The is a dynamic way to create and add fields based on the parsedxml coming soon as well - probably covered beforeHere is a sample of the xml that the api outputs:XXXXXXXXXXXXXXXXXXXXXXXSuchard Hot Chocolate, T-Discs for TassimoCoffeemakers, 8-Count Packages http://bit.ly/fzQndPTwitterMon Mar 21 12:01:55 UTC 2011sandrahayes2010sandra hayes http://twitter.com/sandrahayes2010/statuses/49802915870806016 http://twitter.com/sandrahayes2010http://a1.twimg.com/sticky/default_profile_images/default_profile_0_normal.png796b85f2-8d97-3244-af90-023290a7257e10entrueHere's the code for the archives.:[text]errorCatch=1[/text][text]showVariables=1[/text][!]--------Function Variables-------[/!][text]theDOMAIN=www.viralheat.com[/text][text]thePATH=/api/[/text][text]theMethod=twitter/mentions[/text][text]profile_id=XXXXXXX[/text][text]theAPIkey=XXXXXXXXXX[/text][text]MyTestVariable=[!][/!][TCPConnect host=[theDOMAIN]][TCPSend skipheader=T]GET[thePATH][theMethod]?profile_id=[profile_id]&api_key=[theAPIkey]HTTP/1.0[unurl]%0D%0A[/Unurl]Host:[theDOMAIN][unurl]%0D%0A%0D%0A[/UnURL][/TCPSend][/TCPConnect][/text][xmlparse var=xml_var2][MyTestVariable][/xmlparse] [xmlnodes ref=xml_var2&path=named:entry][!]---[name]=[value] --[/!] [xmlnodes][!]--- - [name]=[value] --[/!] [xmlnodes][!]--- -- [name]=[value] --[/!][!]-----VH_T_message----[/!][showif [name]=message] [text]VH_T_message=[value][/text][/showif][!]-----VH_T_platform----[/!][showif [name]=platform] [text]VH_T_platform=[value][/text][/showif][!]-----VH_T_date_published----[/!][showif [name]=date_published] [text]VH_T_date_published=[value][/text][/showif][!]-----VH_T_author----[/!][showif [name]=author] [text]VH_T_author=[value][/text][/showif][!]-----VH_T_author_display_name----[/!][showif [name]=author_display_name] [text]VH_T_author_display_name=[value][/text][/showif][!]-----VH_T_link----[/!][showif [name]=link] [text]VH_T_link=[value][/text][/showif][!]-----VH_T_profile_link----[/!][showif [name]=profile_link] [text]VH_T_profile_link=[value][/text][/showif][!]-----VH_T_profile_image_link----[/!][showif [name]=profile_image_link] [text]VH_T_profile_image_link=[value][/text][/showif][!]-----VH_T_record_hash----[/!][showif [name]=record_hash] [text]VH_T_record_hash=[value][/text][/showif][!]-----VH_T_positive_score----[/!][showif [name]=positive_score] [text]VH_T_positive_score=[value][/text][/showif][!]-----VH_T_negative_score----[/!][showif [name]=negative_score] [text]VH_T_negative_score=[value][/text][/showif][!]-----VH_T_language----[/!][showif [name]=language] [text]VH_T_language=[value][/text][/showif][!]-----VH_T_tweet_contains_link----[/!][showif [name]=tweet_contains_link] [text]VH_T_tweet_contains_link=[value][/text][/showif][/xmlnodes][showif [name]=tweet] [showif [showVariables]=1] [!]------Show Variables----[/!][!]----Record to database here or do more api work -------[/!] VH_T_message: [VH_T_message] VH_T_platform: [VH_T_platform] VH_T_date_published: [VH_T_date_published] VH_T_author: [VH_T_author] VH_T_author_display_name: [VH_T_author_display_name] VH_T_link: [VH_T_link] VH_T_profile_link: [VH_T_profile_link] VH_T_profile_image_link: [VH_T_profile_image_link] VH_T_record_hash: [VH_T_record_hash] VH_T_positive_score: [VH_T_positive_score] VH_T_negative_score: [VH_T_negative_score] VH_T_language: [VH_T_language] VH_T_VH_T_tweet_contains_link:[VH_T_tweet_contains_link]
------------------------------------------------------------------------------------------------------------------ [/showif][/showif][/xmlnodes][/xmlnodes]--002354470638080517049f039c67Content-Type: text/html; charset=ISO-8859-1Content-Transfer-Encoding: quoted-printableViral Heat is a Social Listening platform that I use to gather research and= data - in this example tweets. It has a free api, but I use the pay servic=e. Connecting to and parsing the api is pretty straight forward. Here=9;s the code if you want to try it out ever.
All the other Viral Heat api's are similar= though each has a different slightly different path structure and output a=nd you'll have to adjust the parsing. The is a dynamic way to create an=d add fields based on the parsed xml coming soon as well - probably covered= before
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...