Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sbertix committed Jul 28, 2020
1 parent 56285ca commit 51de980
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion SwiftyInsta/API/Endpoints/EndpointRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,3 @@ public extension RawEndpointRepresentable {
/// The endpoint representable.
var representation: LosselessEndpointRepresentable { return rawValue }
}

4 changes: 3 additions & 1 deletion SwiftyInsta/API/Handlers/MediaHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ public final class MediaHandler: Handler {
guard let imageData = optionalImageData else {
return completionHandler(.failure(GenericError.custom("Invalid request.")))
}


// swiftlint:disable line_length
let rUploadParams = "{\"image_compression\":\"{\\\"quality\\\":64,\\\"lib_version\\\":\\\"1676.104000\\\",\\\"ssim\\\":0.99618792533874512,\\\"colorspace\\\":\\\"kCGColorSpaceDeviceRGB\\\",\\\"lib_name\\\":\\\"uikit\\\"}\",\"upload_id\":\"\(uploadId)\",\"xsharing_user_ids\":[],\"media_type\":1}"
// swiftlint:enable line_length
let headers = ["Content-Type": "application/octet-stream",
"X-Entity-Name": "image.jpeg",
"X-Entity-Type": "image/jpeg",
Expand Down
4 changes: 2 additions & 2 deletions SwiftyInsta/Local/Responses/MediaResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public struct Cover: CoverIdentifiableParsedResponse {
public var content: Media.Version? {
return Media.Version.init(rawResponse: rawResponse.croppedImageVersion)
}

/// Init with `rawResponse`.
public init?(rawResponse: DynamicResponse) {
guard rawResponse != .none else { return nil }
Expand All @@ -24,7 +24,7 @@ public struct Cover: CoverIdentifiableParsedResponse {

/// The `rawResponse`.
public let rawResponse: DynamicResponse

// MARK: Codable
public init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
Expand Down
7 changes: 3 additions & 4 deletions SwiftyInsta/Local/Responses/UploadResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,14 @@ public extension Upload {
guard rawResponse != .none else { return nil }
self.rawResponse = rawResponse
}

/// The `rawResponse`.
public let rawResponse: DynamicResponse

public var offset: Int? { return rawResponse.offset.int }
/// The status.
public var status: String? { return rawResponse.status.string }



// MARK: Codable
public init(from decoder: Decoder) throws {
let container = try decoder.singleValueContainer()
Expand Down

0 comments on commit 51de980

Please sign in to comment.