Client
-
A client instance handles authentication and connection to a SMART on FHIR resource server.
Create an instance of this class, then hold on to it for all your interactions with the SMART server:
import SMART let smart = Client( baseURL: "https://fhir-api-dstu2.smarthealthit.org", settings: [ //"client_id": "my_mobile_app", // if you have one; otherwise uses dyn reg "redirect": "smartapp://callback", // must be registered in Info.plist ] )
There are many other options that you can pass to
See moresettings
, take a look atinit(baseURL:settings:)
. Also see our programming guide for more information.Declaration
Swift
open class Client
-
Describes properties for the authorization flow.
See moreDeclaration
Swift
public struct SMARTAuthProperties
-
Enum describing the desired granularity of the authorize flow.
See moreDeclaration
Swift
public enum SMARTAuthGranularity
-
FHIR errors.
See moreDeclaration
Swift
public enum FHIRError: Error, CustomStringConvertible
-
A JSON dictionary, with
String
keys andAny
values.Declaration
Swift
public typealias FHIRJSON = [String: Any]
-
The block signature for server interaction callbacks that return an error.
Declaration
Swift
public typealias FHIRErrorCallback = ((FHIRError?) -> Void)