Created
August 4, 2011 16:44
-
-
Save spier/1125599 to your computer and use it in GitHub Desktop.
Samples of using YQL with PeerIndex API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<profile> | |
<name>Sebastian Spier</name> | |
<twitter>sebastianspier</twitter> | |
<slug>sebastianspier</slug> | |
<known>1</known> | |
<authority>35</authority> | |
<activity>34</activity> | |
<audience>31</audience> | |
<peerindex>34</peerindex> | |
<url>http://pi.mu/i2VL</url> | |
<topics> | |
<topic>open source</topic> | |
</topics> | |
</profile> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM peerindex.profile WHERE id='sebastianspier' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM twitter.users WHERE id='sebastianspier' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT created_at, from_user, text | |
FROM twitter.search | |
WHERE q="PeerIndex" AND rpp="5" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT name, twitter, peerindex | |
FROM peerindex.profile | |
WHERE id IN ( | |
SELECT from_user | |
FROM twitter.search | |
WHERE q="PeerIndex" AND rpp="5" | |
) | |
| sort(field="peerindex", descending="true") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<results> | |
<created_at>Tue, 26 Jul 2011 21:19:29 +0000</created_at> | |
<from_user>Mike_Rossetti</from_user> | |
<text>Tweet frequency has been inversely proportional with this account's PeerIndex. #socialinfluence</text> | |
</results> | |
<results> | |
<created_at>Tue, 26 Jul 2011 21:04:13 +0000</created_at> | |
<from_user>focus2grow</from_user> | |
<text>RT @pamelamuldoon: I've just claimed my @PeerIndex profile, check it out http://t.co/KMt6Dox</text> | |
</results> | |
<results> | |
<created_at>Tue, 26 Jul 2011 20:54:28 +0000</created_at> | |
<from_user>dfolwell</from_user> | |
<text>Cool site @Peerindex Check out your score compared to others? http://t.co/DsIKmnm</text> | |
</results> | |
<results> | |
<created_at>Tue, 26 Jul 2011 20:50:10 +0000</created_at> | |
<from_user>benri</from_user> | |
<text>I've just curated a group on Design featuring @creativehat (3) @fcircunflexo (11) @art21web (19) see it here http://t.co/bag6Mgu</text> | |
</results> | |
<results> | |
<created_at>Tue, 26 Jul 2011 20:37:21 +0000</created_at> | |
<from_user>beth_tk</from_user> | |
<text>RT @azeem: PeerIndex is looking for a Data engineer http://t.co/XAd0pMq &amp; a Senior Data Scientist http://t.co/lFnldfb - free cookies! pls RT</text> | |
</results> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT name, twitter, peerindex | |
FROM peerindex.profile | |
WHERE id IN ( | |
SELECT from_user | |
FROM twitter.search | |
WHERE q="PeerIndex" AND rpp="5" | |
) | |
| sort(field="peerindex", descending="true") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<results> | |
<json> | |
<peerindex>51</peerindex> | |
<twitter>benri</twitter> | |
<name>Benoit Richard</name> | |
</json> | |
<json> | |
<twitter>focus2grow</twitter> | |
<peerindex>37</peerindex> | |
<name>Teicko Huber</name> | |
</json> | |
<json> | |
<twitter>beth_tk</twitter> | |
<peerindex>28</peerindex> | |
<name>Beth Holmes</name> | |
</json> | |
<json> | |
<twitter>Mike_Rossetti</twitter> | |
<peerindex>18</peerindex> | |
<name>Mike Rossetti</name> | |
</json> | |
<json> | |
<twitter>dfolwell</twitter> | |
<name>David Folwell</name> | |
</json> | |
</results> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment