uap-scala

ua-parser library for Scala

License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.github.yanana
ArtifactId

ArtifactId

uap-scala_2.12
Last Version

Last Version

0.1.4
Release Date

Release Date

Type

Type

jar
Description

Description

uap-scala
ua-parser library for Scala
Project URL

Project URL

https://github.com/yanana/uap-scala
Project Organization

Project Organization

com.github.yanana
Source Code Management

Source Code Management

https://github.com/yanana/uap-scala

Download uap-scala_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.yanana/uap-scala_2.12/ -->
<dependency>
    <groupId>com.github.yanana</groupId>
    <artifactId>uap-scala_2.12</artifactId>
    <version>0.1.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.yanana/uap-scala_2.12/
implementation 'com.github.yanana:uap-scala_2.12:0.1.4'
// https://jarcasting.com/artifacts/com.github.yanana/uap-scala_2.12/
implementation ("com.github.yanana:uap-scala_2.12:0.1.4")
'com.github.yanana:uap-scala_2.12:jar:0.1.4'
<dependency org="com.github.yanana" name="uap-scala_2.12" rev="0.1.4">
  <artifact name="uap-scala_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.yanana', module='uap-scala_2.12', version='0.1.4')
)
libraryDependencies += "com.github.yanana" % "uap-scala_2.12" % "0.1.4"
[com.github.yanana/uap-scala_2.12 "0.1.4"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.6
org.yaml : snakeyaml jar 1.21
com.twitter : util-collection_2.12 jar 18.7.0

test (2)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.0.5
org.scalacheck : scalacheck_2.12 jar 1.14.0

Project Modules

There are no modules declared in this project.

UA Parser Scala Library

This is the Scala implementation of ua-parser. The implementation uses the shared regex patterns and overrides from regexes.yaml. This is a fork of the original uap-scala, and independently maintained from the original as it seems not to be maintained currently.

wercker status

Quick start

This fork of uap-scala is published to Maven Central, currently only for Scala 2.11 (cross building is in my plan). So add the following to your build.sbt.

libraryDependencies += "com.github.yanana" %% "uap-scala" % "0.1.0"

That's it! It's time to use uap-scala.

import ua.parser.Parser

  val ua = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3"
  val client = Parser.get.parse(ua) // you can also use CachingParser
  println(client) // Client(UserAgent(Mobile Safari,Some(5),Some(1),None),OS(iOS,Some(5),Some(1),Some(1),None),Device(iPhone))
}

Author:

Originary forked from the official UA Parser Scala binding by Piotr Adamski @mcveat.

Versions

Version
0.1.4
0.1.2
0.1.1