Skip to content

Commit

Permalink
Merge pull request #149 from Giphy/task/video-search
Browse files Browse the repository at this point in the history
Add new video as media type
  • Loading branch information
giorgia committed Jan 21, 2021
2 parents 264a7c7 + 758b7c9 commit 76763a9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Sources/GPHTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import Foundation
/// Text Media Type
case text

/// Video Media Type
case video

public typealias RawValue = String

public var rawValue: RawValue {
Expand All @@ -37,12 +40,14 @@ import Foundation
return "sticker"
case .text:
return "text"
case .video:
return "video"
}
}

public var endpointPathComponent: String {
switch self {
case .gif, .sticker:
case .gif, .sticker, .video:
return rawValue + "s"
default:
return rawValue
Expand All @@ -57,11 +62,12 @@ import Foundation
self = .sticker
case "text":
self = .text
case "video":
self = .video
default:
self = .gif
}
}

}

/// Represents a Giphy Rendition Type (Original/Preview/...)
Expand Down

0 comments on commit 76763a9

Please sign in to comment.