Api class

Constructors

Api(String endpoint, String identifier, String accountNumber, String publicKey, String secretKey, String appId)

Properties

accountNumber String
The account number for the account used in Kyte
final
appId String
The application ID for the app on Kyte you will access
final
client ↔ Client
getter/setter pair
endpoint String
The endpoint url for the Kyte API
final
hashCode int
The hash code for this object.
no setterinherited
identifier String
The identifier string for the account used in Kyte
final
publicKey String
The public key associated with the account used in Kyte
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secretKey String
The secret key associated with the account used in Kyte
final
sessionToken String
The session token, which defaults to "0" when there is no active session
getter/setter pair
txToken String
The transaction token, which defaults to "0" when there is no active session
getter/setter pair

Methods

delete(String model, {String? field, String? value, Map<String, String>? customHeaders, String pageId = "1", String pageSize = "0", String contentType = "application/json"}) Future
DELETE Request
formattedTimeStamp() DateTime
Get current datetime in UTC to be used in generating the signature and identity string
generateEndpointUrl(String? model, {String? field, String? value}) Uri
Generate the final endpoint URL and path based on request using model, and optional fields field and value.
generateHeader({Map<String, String>? customHeaders, String pageId = "1", String pageSize = "50", String contentType = "application/json"}) Map<String, String>
Generate a map of headers to be sent to Kyte API.
generateIdentity(DateTime now) String
Generate the identity string to pass along in the header with current date time now
generateSignature(DateTime now) String
Generate signature required to authenticate with API using current datetime in UTC as now
get(String model, {String? field, String? value, Map<String, String>? customHeaders, String pageId = "1", String pageSize = "0", String contentType = "application/json"}) Future
GET Request
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post(String model, String body, {Map<String, String>? customHeaders, String pageId = "1", String pageSize = "0", String contentType = "application/json"}) Future
POST Request
put(String model, String body, {String? field, String? value, Map<String, String>? customHeaders, String pageId = "1", String pageSize = "0", String contentType = "application/json"}) Future
PUT Request
request(dynamic fromJosn(Map<String, dynamic> json), KyteRequestType method, String model, {String? body, String? field, String? value, Map<String, String>? customHeaders, String pageId = "1", String pageSize = "0", String contentType = "application/json"}) Future
Makes an HTTP request to the Kyte API backend and returns model data from JSON.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited