NetNewsWire/Frameworks/Account/FeedProvider/Twitter/TwitterUser.swift

28 lines
492 B
Swift
Raw Normal View History

2020-04-17 01:00:27 +02:00
//
// TwitterUser.swift
// Account
//
// Created by Maurice Parker on 4/16/20.
// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
//
import Foundation
struct TwitterUser: Codable {
let name: String?
2020-04-17 03:18:47 +02:00
let screenName: String?
2020-04-17 01:00:27 +02:00
let avatarURL: String?
enum CodingKeys: String, CodingKey {
case name = "name"
2020-04-17 03:18:47 +02:00
case screenName = "screen_name"
2020-04-17 01:00:27 +02:00
case avatarURL = "profile_image_url_https"
}
var url: String {
return "https://twitter.com/\(screenName ?? "")"
}
2020-04-17 01:00:27 +02:00
}