89 lines
3.5 KiB
Swift
89 lines
3.5 KiB
Swift
//
|
|
// ActivityLogAPI.swift
|
|
//
|
|
// Generated by swagger-codegen
|
|
// https://github.com/swagger-api/swagger-codegen
|
|
//
|
|
|
|
import Foundation
|
|
import Alamofire
|
|
|
|
|
|
open class ActivityLogAPI {
|
|
/**
|
|
Gets activity log entries.
|
|
|
|
- parameter startIndex: (query) Optional. The record index to start at. All items with a lower index will be dropped from the results. (optional)
|
|
- parameter limit: (query) Optional. The maximum number of records to return. (optional)
|
|
- parameter minDate: (query) Optional. The minimum date. Format = ISO. (optional)
|
|
- parameter hasUserId: (query) Optional. Filter log entries if it has user id, or not. (optional)
|
|
- parameter completion: completion handler to receive the data and the error objects
|
|
*/
|
|
open class func getLogEntries(startIndex: Int? = nil, limit: Int? = nil, minDate: Date? = nil, hasUserId: Bool? = nil, completion: @escaping ((_ data: ActivityLogEntryQueryResult?,_ error: Error?) -> Void)) {
|
|
getLogEntriesWithRequestBuilder(startIndex: startIndex, limit: limit, minDate: minDate, hasUserId: hasUserId).execute { (response, error) -> Void in
|
|
completion(response?.body, error)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
Gets activity log entries.
|
|
- GET /System/ActivityLog/Entries
|
|
-
|
|
|
|
- API Key:
|
|
- type: apiKey X-Emby-Authorization
|
|
- name: CustomAuthentication
|
|
- examples: [{contentType=application/json, example={
|
|
"TotalRecordCount" : 6,
|
|
"StartIndex" : 1,
|
|
"Items" : [ {
|
|
"Type" : "Type",
|
|
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
|
"Overview" : "Overview",
|
|
"UserPrimaryImageTag" : "UserPrimaryImageTag",
|
|
"Severity" : "",
|
|
"Id" : 0,
|
|
"ShortOverview" : "ShortOverview",
|
|
"ItemId" : "ItemId",
|
|
"Date" : "2000-01-23T04:56:07.000+00:00",
|
|
"Name" : "Name"
|
|
}, {
|
|
"Type" : "Type",
|
|
"UserId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
|
"Overview" : "Overview",
|
|
"UserPrimaryImageTag" : "UserPrimaryImageTag",
|
|
"Severity" : "",
|
|
"Id" : 0,
|
|
"ShortOverview" : "ShortOverview",
|
|
"ItemId" : "ItemId",
|
|
"Date" : "2000-01-23T04:56:07.000+00:00",
|
|
"Name" : "Name"
|
|
} ]
|
|
}}]
|
|
- parameter startIndex: (query) Optional. The record index to start at. All items with a lower index will be dropped from the results. (optional)
|
|
- parameter limit: (query) Optional. The maximum number of records to return. (optional)
|
|
- parameter minDate: (query) Optional. The minimum date. Format = ISO. (optional)
|
|
- parameter hasUserId: (query) Optional. Filter log entries if it has user id, or not. (optional)
|
|
|
|
- returns: RequestBuilder<ActivityLogEntryQueryResult>
|
|
*/
|
|
open class func getLogEntriesWithRequestBuilder(startIndex: Int? = nil, limit: Int? = nil, minDate: Date? = nil, hasUserId: Bool? = nil) -> RequestBuilder<ActivityLogEntryQueryResult> {
|
|
let path = "/System/ActivityLog/Entries"
|
|
let URLString = SwaggerClientAPI.basePath + path
|
|
let parameters: [String:Any]? = nil
|
|
var url = URLComponents(string: URLString)
|
|
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
|
"startIndex": startIndex?.encodeToJSON(),
|
|
"limit": limit?.encodeToJSON(),
|
|
"minDate": minDate?.encodeToJSON(),
|
|
"hasUserId": hasUserId
|
|
])
|
|
|
|
|
|
let requestBuilder: RequestBuilder<ActivityLogEntryQueryResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
|
|
|
|
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
|
|
}
|
|
}
|