2020-03-14 04:16:52 +01:00
|
|
|
//
|
|
|
|
// NewsBlurStoryStatusChange.swift
|
|
|
|
// Account
|
|
|
|
//
|
|
|
|
// Created by Anh Quang Do on 2020-03-13.
|
|
|
|
// Copyright (c) 2020 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
struct NewsBlurStoryStatusChange {
|
|
|
|
let hashes: [String]
|
|
|
|
}
|
|
|
|
|
2020-03-15 01:42:45 +01:00
|
|
|
extension NewsBlurStoryStatusChange: NewsBlurDataConvertible {
|
2020-03-14 04:16:52 +01:00
|
|
|
var asData: Data? {
|
|
|
|
var postData = URLComponents()
|
|
|
|
postData.queryItems = hashes.map { URLQueryItem(name: "story_hash", value: $0) }
|
|
|
|
|
|
|
|
return postData.percentEncodedQuery?.data(using: .utf8)
|
|
|
|
}
|
|
|
|
}
|