This file contains 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
{ | |
"retweeted": false, | |
"text": "Photo Organization Service Everpix Launches Public Beta http://t.co/2WQKLro8", | |
"id_str": "152781555297820672", | |
"source": "<a href=\"http://www.alphonsolabs.com/\" rel=\"nofollow\">Pulse News</a>", | |
"entities": { | |
"hashtags": [], | |
"urls": [ | |
{ | |
"expanded_url": "http://feedproxy.google.com/~r/Techcrunch/~3/svLQS-Ayumk/", |
This file contains 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
{ | |
"interaction": { | |
"id": "1e16ebc90331a780e0748d58940628be", | |
"type": "twitter", | |
"created_at": "Thu, 15 Mar 2012 16:33:15 +0000", | |
"author": { | |
"id": 15005238 | |
} | |
}, | |
"twitter": { |
This file contains 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
{ | |
"balance": { | |
"credit": 52.63, | |
"plan": "payg" | |
} | |
} |
This file contains 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
{ | |
"balance": { | |
"remaining_dpus": 84459.1, | |
"cost": 773.23, | |
"plan": "Silver" | |
} | |
} |
This file contains 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
<?php | |
$filename = dirname(__FILE__) . '/part-r-00000.json'; | |
$filehandle = fopen($filename, 'r'); | |
if ($filehandle) { | |
while (($interaction = fgets($filehandle)) !== false) { | |
// Set $interaction as the full JSON interaction, ready for processing. | |
$interaction = json_decode($interaction, true); |
This file contains 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
{"status":"failure","message":"A username and API key are both required"} |
This file contains 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
/** | |
* This example returns your stream usage for the last hour. You can edit the | |
* usage period by passing "hour" or "day" in the getUsage() method. | |
*/ | |
package org.datasift.examples; | |
import org.datasift.*; | |
/** | |
* @author MediaSift |
This file contains 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
{"interaction":{"author":{"avatar":"http:\/\/a0.twimg.com\/profile_images\/1615759403\/powell_HS2_normal.jpg","id":402126179,"link":"http:\/\/twitter.com\/jeffpowell_Mail","name":"Jeff Powell","username":"jeffpowell_Mail"},"content":"RT @Kropotkin_alias: @jeffpowell_Mail If one of our Olympic heroes was found to have failed drug test in 6 months time same decision wou ...","created_at":"Tue, 14 Aug 2012 12:47:15 +0000","id":"1e1e60e2c994ab80e07424eac53e3bc8","link":"http:\/\/twitter.com\/jeffpowell_Mail\/statuses\/235356913284567041","source":"web","type":"twitter"},"klout":{"amplification":13,"network":32.22,"score":51,"topics":["john terry","racism","adidas","san antonio spurs","rafael nadal"],"true_reach":3256},"language":{"confidence":100,"tag":"en"},"salience":{"content":{"sentiment":-7}},"twitter":{"id":"235356913284567041","retweet":{"count":1,"created_at":"Tue, 14 Aug 2012 12:47:15 +0000","id":"235356913284567041","mentions":["jeffpowell_Mail"],"source":"web","text":"@jeffpowell_Mail If one of our Oly |
This file contains 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
<?php | |
$filename = dirname(__FILE__) . '/filename.json'; | |
$filehandle = fopen($filename, 'r'); | |
if ($filehandle) { | |
while (($interaction = fgets($filehandle, 4096)) !== false) { | |
$interaction = json_decode($interaction, true); | |
$total_processed++; | |
if (isset($interaction['twitter']['id'])) { |
This file contains 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
curl -X POST 'https://api.datasift.com/push/validate' \ | |
-d 'output_type=s3' \ | |
-d 'output_params.acl=private' \ | |
-d 'output_params.bucket=BUCKETNAME' \ | |
-d 'output_params.directory=DIRECTORYNAME' \ | |
-d 'output_params.delivery_frequency=60' \ | |
-d 'output_params.auth.access_key=ACCESSKEY' \ | |
-d 'output_params.auth.secret_key=SECRETKEY' \ | |
-H 'Auth: DATASIFT_USERNAME:DATASIFT_APIKEY' |
OlderNewer