2020-04-18 19:03:16 +02:00
|
|
|
//
|
|
|
|
// TwitterHashtag.swift
|
|
|
|
// Account
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 4/18/20.
|
|
|
|
// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
2020-04-20 02:19:39 +02:00
|
|
|
struct TwitterHashtag: Codable, TwitterEntity {
|
2020-04-18 19:03:16 +02:00
|
|
|
|
|
|
|
let text: String?
|
|
|
|
let indices: [Int]?
|
|
|
|
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
|
|
case text = "text"
|
|
|
|
case indices = "indices"
|
|
|
|
}
|
|
|
|
|
2020-04-20 02:27:37 +02:00
|
|
|
var startIndex: Int {
|
|
|
|
if let indices = indices, indices.count > 0 {
|
|
|
|
return indices[0] - 1
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2020-04-20 02:19:39 +02:00
|
|
|
func renderAsHTML() -> String {
|
|
|
|
return ""
|
|
|
|
}
|
2020-04-18 19:03:16 +02:00
|
|
|
}
|