ScopeRequest
public struct ScopeRequest
Struct contains the information of a requested scopes.
-
Type of the requested scopes.
Declaration
Swift
public enum ScopeType : String
-
An array of scopes to be granted.
Declaration
Swift
public let scopes: [String]
-
Boolean indicating whether to keep all previously granted scopes.
Declaration
Swift
public let includeGrantedScopes: Bool
-
Type of the scopes to be granted.
Declaration
Swift
public let scopeType: ScopeType
-
String representation of the scopes, used in URL query. Nil if the array is empty.
Declaration
Swift
public var scopeString: String? { get }
-
Designated Initializer.
Declaration
Swift
public init(scopeType: ScopeType, scopes: [String], includeGrantedScopes: Bool)
Parameters
scopeType
Type of the requested scopes.
scopes
A list of scope returned by Dropbox server. Each scope correspond to a group of API endpoints. To call one API endpoint you have to obtains the scope first otherwise you will get HTTP 401.
includeGrantedScopes
If false, Dropbox will give you the scopes in scopes array. Otherwise Dropbox server will return a token with all scopes user previously granted your app together with the new scopes.