-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Issues model objects and setup test
- Loading branch information
Showing
7 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// Issue.swift | ||
// Tentacle | ||
// | ||
// Created by Romain Pouclet on 2016-05-23. | ||
// Copyright © 2016 Matt Diephouse. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
/// An Issue on Github | ||
public struct Issue: Hashable, CustomStringConvertible { | ||
enum State { | ||
case Open | ||
case Closed | ||
} | ||
|
||
public let id: Int | ||
public let url: NSURL | ||
|
||
public repositoryUrl: NSURL | ||
public labelsUrl: NSURL | ||
public commentsUrl: NSURL | ||
public eventsUrl: NSURL | ||
public htmlUrl: NSURL | ||
|
||
public let number: Int | ||
public let state: State | ||
public let title: String | ||
public let body: String | ||
public let user: User, | ||
public let labels: [Label] | ||
public let assignee: User? | ||
public let milestone: Milestone? | ||
|
||
public let locked: Bool | ||
public let comments: Int | ||
public let pullRequest: PullRequest? | ||
public let closedAt: NSDate? | ||
public let createdAt: NSDate | ||
public let updatedAt: NSDate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// Label.swift | ||
// Tentacle | ||
// | ||
// Created by Romain Pouclet on 2016-05-23. | ||
// Copyright © 2016 Matt Diephouse. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
struct Label: Hashable, CustomStringConvertible { | ||
let URL: NSURL | ||
let name: String | ||
let color: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Milestone.swift | ||
// Tentacle | ||
// | ||
// Created by Romain Pouclet on 2016-05-23. | ||
// Copyright © 2016 Matt Diephouse. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct Milestone: Hashable, CustomStringConvertible { | ||
enum State { | ||
case Open | ||
case Closed | ||
} | ||
|
||
public let URL: NSURL | ||
public let htmlURL: NSURL | ||
public let labelsURL: NSURL | ||
public let id: Int | ||
public let number: Int | ||
public let state: State | ||
public let title: String | ||
public let description: String | ||
public let creator User | ||
public let openIssues: Int | ||
public let closedIssues: Int | ||
public let createdAt: NSDate | ||
public let updatedAt: NSDate | ||
public let closedAt: NSDate? | ||
public let dueOn: NSDate | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// IssuesTests.swift | ||
// Tentacle | ||
// | ||
// Created by Romain Pouclet on 2016-05-23. | ||
// Copyright © 2016 Matt Diephouse. All rights reserved. | ||
// | ||
|
||
import Argo | ||
@testable import Tentacle | ||
import XCTest | ||
|
||
class IssuesTests: XCTestCase { | ||
|
||
func testDecodeIssues() { | ||
|
||
} | ||
} |