GithubHelp home page GithubHelp logo

ticktok-io / ticktok-java-client Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 216 KB

Official Java client for ticktok.io

Home Page: https://ticktok.io

License: Apache License 2.0

Java 99.31% Shell 0.69%
ticktok java sdk clock schedule client rabbit mongo

ticktok-java-client's Introduction

Ticktok Java client

CircleCI Release License

This is the official Java sdk for Ticktok.io service.

Quick Start

Import sdk

artifacts available @ bintray repositories

Gradle

repositories {
    jcenter()
}

... 

dependencies {
  ...
    compile 'io.ticktok:ticktok-java-client:0.4.6'
}

Maven

<repositories>
    ...
    <repository>
        <id>jcenter</id>
        <url>https://jcenter.bintray.com/</url>
    </repository>
</repositories>

...

<dependencies>
    ...
    <dependency>
        <groupId>io.ticktok</groupId>
        <artifactId>ticktok-java-client</artifactId>
        <version>0.4.6</version>
    </dependency>
</dependencies>

Example

new Ticktok(options().domain("<ticktok-domain>").token("<ticktok-token>")).
    schedule("my first clock", "every.5.seconds", () -> {
        System.out.print("tick me baby one more time");
    });
new Ticktok(options().domain("<ticktok-domain>").token("<ticktok-token>")).
    tick("my first clock", "every.5.seconds");

Community

Come & chat with us on Slack

ticktok-java-client's People

Contributors

amaziagur avatar rockem avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bonomali

ticktok-java-client's Issues

Tick action fails

When trying to invoke ticktok.tick() I get the following exception

was BEGIN_ARRAY at line 1 column 2 path $
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
at com.google.gson.Gson.fromJson(Gson.java:922)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:836)
at com.google.gson.Gson.fromJson(Gson.java:808)
at io.ticktok.client.server.rest.RestClockActions.clockFrom(RestClockActions.java:50)
at io.ticktok.client.server.rest.RestClockActions.getClockBy(RestClockActions.java:42)
at io.ticktok.client.server.rest.RestClockActions.tick(RestClockActions.java:28)
at io.ticktok.client.Ticktok.tick(Ticktok.java:29)
at io.ticktok.sanity.SanityCheck.main(SanityCheck.java:22)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215)
... 9 more

Spring logback is clashing with ticktok

When trying to use add ticktok-client as a dependency spring fail to load with:

Caused by: java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.SimpleLoggerFactory loaded from file:/Users/esegal/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.25/8dacf9514f0c707cbbcdd6fd699e8940d42fb54e/slf4j-simple-1.7.25.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.