Add twitter entities
This commit is contained in:
parent
8d64a96489
commit
d9f6125561
|
@ -0,0 +1,25 @@
|
|||
//
|
||||
// TwitterEntities.swift
|
||||
// Account
|
||||
//
|
||||
// Created by Maurice Parker on 4/18/20.
|
||||
// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct TwitterEntities: Codable {
|
||||
|
||||
let hashtags: [TwitterHashtag]?
|
||||
let urls: [TwitterURL]?
|
||||
let userMentions: [TwitterMention]?
|
||||
let symbols: [TwitterSymbol]?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case hashtags = "hashtags"
|
||||
case urls = "urls"
|
||||
case userMentions = "user_mentions"
|
||||
case symbols = "symbols"
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// TwitterMentions.swift
|
||||
// Account
|
||||
//
|
||||
// Created by Maurice Parker on 4/18/20.
|
||||
// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct TwitterMention {
|
||||
|
||||
let name: String?
|
||||
let indices: [Int]?
|
||||
let screenName: String?
|
||||
let expandedURL: String?
|
||||
let idStr: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case name = "url"
|
||||
case indices = "indices"
|
||||
case screenName = "screen_name"
|
||||
case expandedURL = "expandedURL"
|
||||
case idStr = "idStr"
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
//
|
||||
// TwitterURL.swift
|
||||
// Account
|
||||
//
|
||||
// Created by Maurice Parker on 4/18/20.
|
||||
// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct TwitterURL: Codable {
|
||||
|
||||
let url: String?
|
||||
let indices: [Int]?
|
||||
let displayURL: String?
|
||||
let expandedURL: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case url = "url"
|
||||
case indices = "indices"
|
||||
case displayURL = "displayURL"
|
||||
case expandedURL = "expandedURL"
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue