Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Decodable to Himotoki.Decodable #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Pagination/GitHubRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extension GitHubRequest {
}
}

extension GitHubRequest where Response: Decodable {
extension GitHubRequest where Response: Himotoki.Decodable {
func response(from object: Any, urlResponse: HTTPURLResponse) throws -> Response {
return try decodeValue(object)
}
Expand Down
2 changes: 1 addition & 1 deletion Pagination/PaginationResponse.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import Himotoki

struct SearchResponse<Element: Decodable>: PaginationResponse {
struct SearchResponse<Element: Himotoki.Decodable>: PaginationResponse {
let elements: [Element]
let page: Int
let nextPage: Int?
Expand Down
4 changes: 2 additions & 2 deletions Pagination/PaginationResponseType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import Foundation
import Himotoki

protocol PaginationResponse {
associatedtype Element: Decodable
associatedtype Element: Himotoki.Decodable
var elements: [Element] { get }
var page: Int { get }
var nextPage: Int? { get }
init(elements: [Element], page: Int, nextPage: Int?)
}

struct AnyPaginationResponse<Element: Decodable>: PaginationResponse {
struct AnyPaginationResponse<Element: Himotoki.Decodable>: PaginationResponse {
let elements: [Element]
let page: Int
let nextPage: Int?
Expand Down
2 changes: 1 addition & 1 deletion Pagination/PaginationViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import APIKit
import Action
import Himotoki

class PaginationViewModel<Element: Decodable> {
class PaginationViewModel<Element: Himotoki.Decodable> {
let indicatorViewAnimating: Driver<Bool>
let elements: Driver<[Element]>
let loadError: Driver<Error>
Expand Down
2 changes: 1 addition & 1 deletion Pagination/Repository.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import Himotoki

struct Repository: Decodable {
struct Repository: Himotoki.Decodable {
let id: Int
let fullName: String
let stargazersCount: Int
Expand Down