Package com.datasift.client

Examples of com.datasift.client.DataSiftConfig


            System.out.println("Auth must be provided in the form '-a[uth] username api_key'");
            System.exit(0);
        }

        Map.Entry<String, String> authVals = auth.entrySet().iterator().next();
        DataSiftConfig config = new DataSiftConfig(authVals.getKey(), authVals.getValue());
        DataSiftClient dataSift = new DataSiftClient(config);
        switch (parsedArgs.get("e")) {
            case "core":
                executeCore(dataSift, parsedArgs.get("c"), parsedArgs.map("p"));
                break;
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("aszachewicz", "7aba32dc48b2f42f3867cef33b6f7c61");

        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 LiveStream {
    private LiveStream() {
    }

    public static void main(String... args) throws InterruptedException {
        DataSiftConfig config = new DataSiftConfig("zcourts", "130894088ba71db4e793585e40528bc1");
        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

            System.out.println("Auth must be provided in the form '-a[uth] username api_key'");
            System.exit(0);
        }

        Map.Entry<String, String> authVals = auth.entrySet().iterator().next();
        DataSiftConfig config = new DataSiftConfig(authVals.getKey(), authVals.getValue());
        DataSiftClient dataSift = new DataSiftClient(config);
        switch (parsedArgs.get("e")) {
            case "core":
                executeCore(dataSift, parsedArgs.get("c"), parsedArgs.map("p"));
                break;
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.