Add twitter entities

This commit is contained in:
Maurice Parker 2020-04-18 12:03:37 -05:00
parent 8d64a96489
commit d9f6125561
3 changed files with 77 additions and 0 deletions

View File

@ -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"
}
}

View File

@ -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"
}
}

View File

@ -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"
}
}