# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.

struct AppsPermissionsApi <: SwaggerApi
    client::Swagger.Client
end

function _swaggerinternal_appsPermissionsInfo(_api::AppsPermissionsApi; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/apps.permissions.info", ["slackAuth"])
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/x-www-form-urlencoded"] : [_mediaType])
    return _ctx
end

"""

Returns list of permissions this app has on a team.
Return: Dict{String, Any}
"""
function appsPermissionsInfo(_api::AppsPermissionsApi; _mediaType=nothing)
    _ctx = _swaggerinternal_appsPermissionsInfo(_api; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function appsPermissionsInfo(_api::AppsPermissionsApi, response_stream::Channel; _mediaType=nothing)
    _ctx = _swaggerinternal_appsPermissionsInfo(_api; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

function _swaggerinternal_appsPermissionsRequest(_api::AppsPermissionsApi, scopes::String, trigger_id::String; _mediaType=nothing)
    _ctx = Swagger.Ctx(_api.client, "GET", Dict{String, Any}, "/apps.permissions.request", ["slackAuth"])
    Swagger.set_param(_ctx.query, "scopes", scopes)  # type String
    Swagger.set_param(_ctx.query, "trigger_id", trigger_id)  # type String
    Swagger.set_header_accept(_ctx, ["application/json"])
    Swagger.set_header_content_type(_ctx, (_mediaType === nothing) ? ["application/x-www-form-urlencoded"] : [_mediaType])
    return _ctx
end

"""

Allows an app to request additional scopes
Param: scopes::String (required)
Param: trigger_id::String (required)
Return: Dict{String, Any}
"""
function appsPermissionsRequest(_api::AppsPermissionsApi, scopes::String, trigger_id::String; _mediaType=nothing)
    _ctx = _swaggerinternal_appsPermissionsRequest(_api, scopes, trigger_id; _mediaType=_mediaType)
    Swagger.exec(_ctx)
end

function appsPermissionsRequest(_api::AppsPermissionsApi, response_stream::Channel, scopes::String, trigger_id::String; _mediaType=nothing)
    _ctx = _swaggerinternal_appsPermissionsRequest(_api, scopes, trigger_id; _mediaType=_mediaType)
    Swagger.exec(_ctx, response_stream)
end

export appsPermissionsInfo, appsPermissionsRequest
