Class/Object

com.solarmosaic.client.utilityApi

UtilityApiClient

Related Docs: object UtilityApiClient | package utilityApi

Permalink

case class UtilityApiClient(token: String, timeoutDuration: FiniteDuration = 10.seconds) extends SprayJsonSupport with IsoDateTimeConversions with Product with Serializable

UtilityAPI client.

token

API token

timeoutDuration

Request timeout duration, defaults to 10 seconds.

See also

https://utilityapi.com/api/tokens/new.html

Linear Supertypes
Serializable, Serializable, Product, Equals, IsoDateTimeConversions, SprayJsonSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. UtilityApiClient
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. IsoDateTimeConversions
  7. SprayJsonSupport
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new UtilityApiClient(token: String, timeoutDuration: FiniteDuration = 10.seconds)

    Permalink

    token

    API token

    timeoutDuration

    Request timeout duration, defaults to 10 seconds.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val basePath: Path

    Permalink
  6. val baseUri: Uri

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def dateTimeToIsoFormat(dateTime: DateTime): String

    Permalink

    Convert a DateTime into an ISO 8601 formatted String.

    Convert a DateTime into an ISO 8601 formatted String.

    dateTime

    The DateTime to format.

    returns

    Formatted String.

    Definition Classes
    IsoDateTimeConversions
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def getAccount(accountUid: String)(implicit format: FormatType = FormatTypes.json): Future[Option[AccountResponse]]

    Permalink

    Get an account by account uid.

    Get an account by account uid.

    accountUid

    The unique identifier for the account.

    format

    The response format.

    returns

    A Future containing Some account, or None if the account was not found.

    See also

    https://utilityapi.com/api/docs/api.html#accounts-uid

  12. def getAccounts()(implicit format: FormatType = FormatTypes.json): Future[List[AccountResponse]]

    Permalink

    Get all accounts.

    Get all accounts.

    format

    The response format.

    returns

    A Future containing a list of accounts.

    See also

    https://utilityapi.com/api/docs/api.html#accounts

  13. def getAccountsByReferralIds(referralIds: List[String])(implicit format: FormatType = FormatTypes.json): Future[List[AccountResponse]]

    Permalink

    Get accounts by referral ids.

    Get accounts by referral ids.

    referralIds

    List of referral ids.

    format

    The response format.

    returns

    A Future containing a list of accounts.

    See also

    https://utilityapi.com/api/docs/api.html#accounts

  14. def getBillsByServiceUid(serviceUid: String)(implicit format: FormatType = FormatTypes.json): Future[List[BillResponse]]

    Permalink

    Get bills by service uid.

    Get bills by service uid.

    serviceUid

    The unique identifier for the service.

    format

    The response format.

    returns

    A Future containing a list of bills.

    See also

    https://utilityapi.com/api/docs/api.html#bills

  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def getIntervalsByServiceUid(serviceUid: String, start: Option[DateTime] = None, end: Option[DateTime] = None)(implicit format: FormatType = FormatTypes.json): Future[List[IntervalResponse]]

    Permalink

    Get meter intervals by service uid.

    Get meter intervals by service uid.

    serviceUid

    The unique identifier for the service.

    format

    The response format.

    returns

    A Future containing a list of meter intervals.

    See also

    https://utilityapi.com/api/docs/api.html#intervals

  17. def getService(serviceUid: String)(implicit format: FormatType = FormatTypes.json): Future[Option[ServiceResponse]]

    Permalink

    Get a service by service uid.

    Get a service by service uid.

    serviceUid

    The unique identifier for the service.

    format

    The response format.

    returns

    A Future containing Some service, or None if the service was not found.

    See also

    https://utilityapi.com/api/docs/api.html#services-uid

  18. def getServices()(implicit format: FormatType = FormatTypes.json): Future[List[ServiceResponse]]

    Permalink

    Get all services.

    Get all services.

    format

    The response format.

    returns

    A Future containing a list of services.

    See also

    https://utilityapi.com/api/docs/api.html#services

  19. def getServicesByAccountUids(accountUids: List[String])(implicit format: FormatType = FormatTypes.json): Future[List[ServiceResponse]]

    Permalink

    Get services by account uids.

    Get services by account uids.

    accountUids

    The unique identifier for the account.

    format

    The response format.

    returns

    A Future containing a list of account services.

    See also

    https://utilityapi.com/api/docs/api.html#services

  20. def getUri(path: Path): Uri

    Permalink

    The client URI with the given Path appended to the base Path.

  21. def getUri(segments: Any*): Uri

    Permalink

    The client URI with the given String segments appended to the base Path.

  22. def getUri: Uri

    Permalink

    The client URI.

  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def isoFormatToDateTime(formatted: String): DateTime

    Permalink

    Convert an ISO 8601 formatted String into a DateTime.

    Convert an ISO 8601 formatted String into a DateTime.

    formatted

    The formatted String.

    returns

    A DateTime.

    Definition Classes
    IsoDateTimeConversions
  25. def modifyAccount(accountUid: String, request: AccountModifyRequest)(implicit format: FormatType = FormatTypes.json): Future[Option[AccountResponse]]

    Permalink

    Modify an account by account uid.

    Modify an account by account uid.

    accountUid

    The unique identifier for the account.

    request

    The request model.

    format

    The request/response format.

    returns

    A Future containing Some account, or None if the account was not found.

    See also

    https://utilityapi.com/docs#accounts-modify

  26. def modifyService(serviceUid: String, request: ServiceModifyRequest)(implicit format: FormatType = FormatTypes.json): Future[Option[ServiceResponse]]

    Permalink

    Modify a service by service uid.

    Modify a service by service uid.

    serviceUid

    The unique identifier for the service.

    request

    The request model.

    format

    The request/response format.

    returns

    A Future containing Some service, or None if the service was not found.

    See also

    https://utilityapi.com/docs#services-modify

  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. def pipeline[T](request: HttpRequest)(implicit arg0: FromResponseUnmarshaller[T], format: FormatType = FormatTypes.json): Future[T]

    Permalink

    Gets a future response for the given request, unmarshalling it to the given type.

    Gets a future response for the given request, unmarshalling it to the given type.

    T

    The type to unmarshal the response to.

    request

    The HTTP request.

    format

    Which format to deliver the response in.

    returns

    A Future containing the unmarshalled response object.

    Attributes
    protected[com.solarmosaic.client.utilityApi]
  31. implicit def sprayJsonMarshaller[T](implicit writer: RootJsonWriter[T], printer: JsonPrinter): Marshaller[T]

    Permalink
    Definition Classes
    SprayJsonSupport
  32. implicit def sprayJsonMarshallerConverter[T](writer: RootJsonWriter[T])(implicit printer: JsonPrinter): Marshaller[T]

    Permalink
    Definition Classes
    SprayJsonSupport
  33. implicit def sprayJsonUnmarshaller[T](implicit arg0: RootJsonReader[T]): Unmarshaller[T]

    Permalink
    Definition Classes
    SprayJsonSupport
  34. implicit def sprayJsonUnmarshallerConverter[T](reader: RootJsonReader[T]): Unmarshaller[T]

    Permalink
    Definition Classes
    SprayJsonSupport
  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  36. implicit val system: ActorSystem

    Permalink
  37. implicit val timeout: Timeout

    Permalink
  38. val timeoutDuration: FiniteDuration

    Permalink

    Request timeout duration, defaults to 10 seconds.

  39. val token: String

    Permalink

    API token

  40. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from IsoDateTimeConversions

Inherited from SprayJsonSupport

Inherited from AnyRef

Inherited from Any

Ungrouped