Skip to content

Commit

Permalink
Add RepositoryStatus Model
Browse files Browse the repository at this point in the history
  • Loading branch information
azenla committed Aug 29, 2014
1 parent caaa3f9 commit ce74628
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion lib/src/common/repo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -562,4 +562,28 @@ class CreateMerge {
putValue("commit_message", commitMessage, map);
return JSON.encode(map);
}
}
}

class RepositoryStatus {
final GitHub github;

DateTime createdAt;
DateTime updatedAt;
String state;
String targetUrl;
String description;
String context;

RepositoryStatus(this.github);

static RepositoryStatus fromJSON(GitHub github, input) {
if (input == null) return null;
return new RepositoryStatus(github)
..createdAt = parseDateTime(input['created_at'])
..updatedAt = parseDateTime(input['updated_at'])
..state = input['state']
..targetUrl = input['target_url']
..description = input['description']
..context = input['context'];
}
}

0 comments on commit ce74628

Please sign in to comment.