smartystreets-scala-sdk


License

License

MIT
Categories

Categories

Scala Languages
GroupId

GroupId

com.outr
ArtifactId

ArtifactId

smartystreets-scala-sdk_2.12
Last Version

Last Version

1.0.17
Release Date

Release Date

Type

Type

jar
Description

Description

smartystreets-scala-sdk
smartystreets-scala-sdk
Project URL

Project URL

https://github.com/outr/smartystreets-scala-sdk
Project Organization

Project Organization

com.outr
Source Code Management

Source Code Management

https://github.com/outr/smartystreets-scala-sdk

Download smartystreets-scala-sdk_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.outr/smartystreets-scala-sdk_2.12/ -->
<dependency>
    <groupId>com.outr</groupId>
    <artifactId>smartystreets-scala-sdk_2.12</artifactId>
    <version>1.0.17</version>
</dependency>
// https://jarcasting.com/artifacts/com.outr/smartystreets-scala-sdk_2.12/
implementation 'com.outr:smartystreets-scala-sdk_2.12:1.0.17'
// https://jarcasting.com/artifacts/com.outr/smartystreets-scala-sdk_2.12/
implementation ("com.outr:smartystreets-scala-sdk_2.12:1.0.17")
'com.outr:smartystreets-scala-sdk_2.12:jar:1.0.17'
<dependency org="com.outr" name="smartystreets-scala-sdk_2.12" rev="1.0.17">
  <artifact name="smartystreets-scala-sdk_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.outr', module='smartystreets-scala-sdk_2.12', version='1.0.17')
)
libraryDependencies += "com.outr" % "smartystreets-scala-sdk_2.12" % "1.0.17"
[com.outr/smartystreets-scala-sdk_2.12 "1.0.17"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.8
io.youi : youi-client_2.12 jar 0.10.14

test (2)

Group / Artifact Type Version
org.scalactic : scalactic_2.12 jar 3.0.5
org.scalatest : scalatest_2.12 jar 3.0.5

Project Modules

There are no modules declared in this project.

smartystreets-scala-sdk

Scala SDK for SmartyStreets (https://smartystreets.com)

SBT Configuration

libraryDependencies += "com.outr" %% "smartystreets-scala-sdk" % "1.0.6"

Initialization

Create an instance of SmartyStreets:

val ss = new SmartyStreets(authId = "", authToken = "")

Note: it is usually not ideal to inline details like this into your code as it can change and for security reasons.

This project relies on Profig to allow configuration to be defined as:

  • Command-line arguments (-smartystreets.authId=abc123 -smartystreets.authToken=abc123 and loaded with Profig.merge(args))
  • Configuration JSON (stored in config.json and loaded with Profig.loadDefaults()):
    {
     "smartystreets": {
       "authId": "abc123",
       "authToken": "abc123"
     }
    }
  • Environment Variables (SMARTY_STREETS_AUTH_ID=abc123 and SMARTY_STREETS_AUTH_TOKEN=abc123)

If any of those external configuration options are available simply instantiate SmartyStreets with default arguments:

val ss = new SmartyStreets()

US Address Lookup

Single address lookup is as simple as:

val validated: Future[List[StreetAddress]] = ss.streets.us(street = Some("345 Spear Street San Francisco, CA"))

US Zip Lookup

Single ZIP lookup is as simple as:

val validated: Future[List[Zip]] = ss.zip.us(zipcode = Some("84101"))

Limitations

Currently, no support has been added for international validations or autocompletion.

com.outr

OUTR Technologies

Versions

Version
1.0.17
1.0.16
1.0.15
1.0.12
1.0.11
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0