Package com.datasift.client

Examples of com.datasift.client.DataSiftConfig


public class PullApiHistorics {
    private PullApiHistorics() {
    }

    public static void main(String... args) throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("zcourts", "acbf4788f875db9fdf6bbd2131b10752");
        final DataSiftClient datasift = new DataSiftClient(config);
        Stream stream = Stream.fromString("13e9347e7da32f19fcdb08e297019d2e");

        PreparedHistoricsQuery historic = datasift.historics().prepare(stream.hash(), DateTime.now().minusHours(5),
                DateTime.now().minusHours(4), "Historics pull test").sync();
View Full Code Here


import com.datasift.client.managedsource.ManagedSource;
import com.datasift.client.managedsource.sources.FacebookPage;

public class ManagedSourcesApi {
    private ManagedSourcesApi() throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("username", "api-key");

        final DataSiftClient datasift = new DataSiftClient(config);

        FacebookPage source = new FacebookPage(config);
        String fbToken = "long-lived-facebook-api-token";
View Full Code Here

import com.datasift.client.preview.HistoricsPreview;
import org.joda.time.DateTime;

public class PreviewApi {
    private PreviewApi() throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("username", "api-key");

        final DataSiftClient datasift = new DataSiftClient(config);
        Stream stream = Stream.fromString("13e9347e7da32f19fcdb08e297019d2e");
        DateTime fiveHrsAgo = DateTime.now().minusHours(5);
        HistoricsPreview preview = datasift.preview().create(fiveHrsAgo, stream,
View Full Code Here

public class CoreApi {
    private CoreApi() {
    }

    public static void main(String... args) throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("username", "api-key");
        //or
        config = new DataSiftConfig().auth("zcourts", "43aedc2c7e292016df949c972afe29be");
        config.setSslEnabled(false);
        final DataSiftClient datasift = new DataSiftClient(config);
        String csdl = "interaction.content contains \"music\"";
        //both sync and async processing are supported by calling "sync" on any FutureDate object

//        Usage u = datasift.usage().sync();
View Full Code Here

public class LiveStream {
    private LiveStream() {
    }

    public static void main(String... args) throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("zcourts", "a9641ee0770d05ff3d83225c9fafe4bb");
        final DataSiftClient datasift = new DataSiftClient(config);
        Stream result = datasift.compile("interaction.content contains \"music\" ").sync();
        //handle exceptions that can't necessarily be linked to a specific stream
        datasift.liveStream().onError(new ErrorHandler());
View Full Code Here

    }

    public static void main(String... args) throws InterruptedException {
        DateTime.now();
        new Date();
        DataSiftConfig config = new DataSiftConfig("zcourts", "acbf4788f875db9fdf6bbd2131b10752");
        final DataSiftClient datasift = new DataSiftClient(config);
        Stream stream = Stream.fromString("13e9347e7da32f19fcdb08e297019d2e");

        PushSubscription streamSubscription = datasift.push()
                .createPull(PullJsonType.JSON_NEW_LINE, stream, "pull test").sync();
View Full Code Here

/**
* @author Christopher Gilbert <christopher.john.gilbert@gmail.com>
*/
public class DynamicListApi {
    private DynamicListApi() throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("username", "api-key");

        DataSiftClient datasift = new DataSiftClient(config);
        DataSiftDynamicList dynamiclist = new DataSiftDynamicList(config);

        DynamicList list = dynamiclist.create(DataSiftDynamicList.ListType.STRING, "example list").sync();
View Full Code Here

import com.datasift.client.push.connectors.S3;
import org.joda.time.DateTime;

public class HistoricsApi {
    private HistoricsApi() throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("zcourts", "44067e0ff342b76b52b36a63eea8e21a");
        DataSiftClient datasift = new DataSiftClient(config);
        Stream stream = Stream.fromString("13e9347e7da32f19fcdb08e297019d2e");

        S3 s3 = PushConnectors
                .s3()
View Full Code Here

public class CoreApi {
    private CoreApi() {
    }

    public static void main(String... args) throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("username", "api-key");
        //or
        config = new DataSiftConfig().auth("zcourts", "44067e0ff342b76b52b36a63eea8e21a");

        final DataSiftClient datasift = new DataSiftClient(config);
        String csdl = "interaction.content contains \"some string\"";
        //both sync and async processing are supported by calling "sync" on any FutureDate object
View Full Code Here

public class PushApi {
    private PushApi() {
    }

    public static void main(String... args) throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("zcourts", "44067e0ff342b76b52b36a63eea8e21a");
        final DataSiftClient datasift = new DataSiftClient(config);
        Stream stream = Stream.fromString("13e9347e7da32f19fcdb08e297019d2e");
        S3 s3 = PushConnectors.s3()
                .accessKey("amazon-access-key")
                .secretKey("amazone-secret")
View Full Code Here

TOP

Related Classes of com.datasift.client.DataSiftConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.