This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Configuration and Authentication
Johnathan Ludwig edited this page Jan 27, 2015
·
1 revision
First, you will need to setup the API object.
Name | Type | Description |
---|---|---|
string | Required. Your email. | |
password | string | Required. Your password. |
version | string | Optional version. Defaults to the current version 'v1'. |
api = EspSdk::Api.new(email: 'me@gmail.com', password: 'password', version: 'optional')
api.config
> <EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>
The token that will be used for subsequent requests.
api.config.token
> "6_4wys1a2FhqsECstavC"
The time when this token expires. You will need to request a new token after this time with your email and password again. Returns an ActiveSupport::TimeWithZone
object.
api.config.token_expires_at
> Fri, 19 Sep 2014 15:39:10 UTC +00:00
The email used for subsequent requests.
api.config.email
> "me@gmail.com"
Current and all endpoints in a single array
api.end_points
> [
<EspSdk::EndPoints::Reports:0x000001019bc498 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
<EspSdk::EndPoints::Users:0x000001019bc038 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
<EspSdk::EndPoints::ExternalAccounts:0x000001028a3ab0 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
<EspSdk::EndPoints::CustomSignatures:0x000001028a3560 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
<EspSdk::EndPoints::Organizations:0x000001028a3100 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
<EspSdk::EndPoints::SubOrganizations:0x000001028a2bb0 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
<EspSdk::EndPoints::Teams:0x000001028a2750 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
<EspSdk::EndPoints::Signatures:0x000001028a22f0 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
<EspSdk::EndPoints::Dashboard:0x000001028a1e90 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>,
<EspSdk::EndPoints::ContactRequests:0x000001028a1940 @config=<EspSdk::Configure:0x00000102890f28 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>
<EspSdk::EndPoints::Services:0x000001031949f8 @config=<EspSdk::Configure:0x000001010880e8 @email="me@gmail.com", @version="v1", @uri="https://api.evident.io/api", @token="6_4wys1a2FhqsECstavC", @token_expires_at=Fri, 19 Sep 2014 15:39:10 UTC +00:00>>
]