herogi-client


License

License

MIT
Categories

Categories

CLI User Interface
GroupId

GroupId

com.herogi.client
ArtifactId

ArtifactId

herogi-client_2.11
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

herogi-client
herogi-client
Project URL

Project URL

https://herogi.com
Project Organization

Project Organization

com.herogi.client
Source Code Management

Source Code Management

https://github.com/Herogi/herogi-scala

Download herogi-client_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.herogi.client/herogi-client_2.11/ -->
<dependency>
    <groupId>com.herogi.client</groupId>
    <artifactId>herogi-client_2.11</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.herogi.client/herogi-client_2.11/
implementation 'com.herogi.client:herogi-client_2.11:1.0.0'
// https://jarcasting.com/artifacts/com.herogi.client/herogi-client_2.11/
implementation ("com.herogi.client:herogi-client_2.11:1.0.0")
'com.herogi.client:herogi-client_2.11:jar:1.0.0'
<dependency org="com.herogi.client" name="herogi-client_2.11" rev="1.0.0">
  <artifact name="herogi-client_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.herogi.client', module='herogi-client_2.11', version='1.0.0')
)
libraryDependencies += "com.herogi.client" % "herogi-client_2.11" % "1.0.0"
[com.herogi.client/herogi-client_2.11 "1.0.0"]

Dependencies

compile (5)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.9
com.typesafe.akka : akka-http_2.11 jar 10.0.5
com.typesafe.scala-logging : scala-logging_2.11 jar 3.5.0
io.spray : spray-json_2.11 jar 1.3.3
com.typesafe.akka : akka-http-spray-json_2.11 jar 10.0.5

test (2)

Group / Artifact Type Version
org.scalatest : scalatest_2.11 jar 3.0.1
org.mockito : mockito-core jar 2.2.9

Project Modules

There are no modules declared in this project.

herogi-scala

Herogi scala helper library

SBT Settings

Just add herogi as a dependency.

Latest:

"com.herogi.client" %% "herogi-client" % "1.0.0-SNAPSHOT"

Your First Event

Following is minimum needed code send an event to Herogi, you can find the full example here.

  implicit val system = ActorSystem()
  implicit val ec = scala.concurrent.ExecutionContext.Implicits.global

  val eventSender = new HerogiEventSender("appid", "appsecret")

  val event = new Event("s1", "e1", List("scenario1"), Some(Map("param1" -> "value1")))

  eventSender.sendEvent(event) map { res =>
    println(res)
  }

Sending to All Scenarios

To send all scenarios available, you can skip to scenario specifying during event creation:

val event = new Event("s1", "e1", List.empty, Some(Map("param1" -> "value1")))

//or better

val event = new Event(sessionId = "s1", eventName = "e1", params = Some(Map("param1" -> "value1")))
com.herogi.client

Versions

Version
1.0.0