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
{ | |
"count": 2, | |
"page": 1, | |
"pages": 1, | |
"per_page": 20, | |
"sources": [ | |
{ | |
"name": "", | |
"source_type": "facebook_page", | |
"status": "running", |
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
import argparse | |
import base64 | |
import urllib | |
import sys | |
# parse arguments | |
parser = argparse.ArgumentParser(description='Convert a .p12 file into a string a Google Big Query Push connector can use.') | |
parser.add_argument('-f', required=True, action='store', dest='fin', |
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
curl -X POST 'https://api.datasift.com/v1/push/create' \ | |
-d 'name=connectorgooglebigquery' \ | |
-d 'hash=42d388f8b1db497faaf7dab487f11290' \ | |
-d 'output_type=bigquery' \ | |
-d 'output_params.project_id=000000000000' \ | |
-d 'output_params.dataset_id=interactions' \ | |
-d 'output_params.table_id=pushedinteractions' \ | |
-d 'output_params.auth.client_id=000000000000.apps.googleusercontent.com' \ | |
-d 'output_params.auth.service_account=000000000000@developer.gserviceaccount.com' \ | |
-d "output_params.auth.key_file=`python ./p12tobigquery.py -f 3a46aede3a0a2d375b7bdb72743e7da7605fef5c-privatekey.p12`" |
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
curl -X POST http://api.datasift.com/v1/preview/create \ | |
-d 'start=1359849600' \ | |
-d 'hash=e25d533cf287ec44fe66e8362f61961f' \ | |
-d 'parameters=interaction.author.link,targetVol,hour;twitter.user.lang,freqDist,10;twitter.user.followers_count,numStats,hour;interaction.content,wordCount,10' \ | |
-d 'sources=twitter,facebook' \ | |
-H 'Authorization: datasift-user:your-datasift-api-key' |
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
curl -X POST https://api.datasift.com/v1/source/create \ | |
-d 'source_type=facebook_page' \ | |
-d 'name=fbp-theguardian' \ | |
-d 'parameters=%7B%22likes%22%3A%20true%2C%22posts_by_others%22%3Atrue%2C%22comments%22%3Atrue%7D' \ | |
-d 'resources=%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22parameters%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22url%22%3A%20%22http%3A%2F%2Fwww.facebook.com%2Ftheguardian%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22The%20Guardian%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%2010513336322%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%5D' \ | |
-d 'auth=%5B%7B%22parameters%22%3A%7B%22value%22%3A%22911056353669203%7C099f2ce9a5d4d23a47ec4ee39a3caac8%22%7D%2C%22expires_at%22%3A1388556000%7D%5D' \ | |
-H 'Authorization: datasift-user:your-datasift-api-key' |
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
curl -X POST 'https://api.datasift.com/v1/push/delete' \ | |
-d 'id=08b923395b6ce8bfa4d96f57f863a1c3' \ | |
-H 'Authorization: datasift-user:your-datasift-api-key' |
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
{ | |
"id": "c59ce40e865f1704b233", | |
"progress": 100, | |
"status": "succeeded", | |
"feeds": "twitter", | |
"sample": 1, | |
"end": 1359936000, | |
"created_at": 1362500299, | |
"start": 1359849600, | |
"user": "12919", |
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
{ | |
"id": "8d38093ce3a78fbbba6f", | |
"progress": 5, | |
"status": "running", | |
"feeds": "twitter", | |
"sample": 1, | |
"end": 1359936000, | |
"created_at": 1362409489, | |
"start": 1359849600, | |
"user": "12919", |
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
{ | |
"id": "f4d4caee9acfd27faf88843d8d6191b1", | |
"output_type": "dynamodb", | |
"name": "myupdatedpushsubscription", | |
"created_at": 1365430066, | |
"user_id": 12635, | |
"hash": "edd0b9fb266e8f3f2de40bf6c1a2bf3e", | |
"hash_type": "stream", | |
"output_params": { | |
"table": "datasift-dynamodb", |
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
curl -X POST 'https://api.datasift.com/v1/push/update' \ | |
-d 'id=f4d4caee9acfd27faf88843d8d6191b1' \ | |
-d 'name=myupdatedpushsubscription' \ | |
-d 'hash=SourceStreamHash' \ | |
-d 'output_type=s3' \ | |
-d 'output_params.bucket=datasift-s3' \ | |
-d 'output_params.directory=interactions' \ | |
-d 'output_params.acl=private' \ | |
-d 'output_params.auth.access_key=YourAmazonAWSAccessKey' \ | |
-d 'output_params.auth.secret_key=YourAmazonAWSSecretKey' \ |
NewerOlder