/
github.opa
98 lines (84 loc) · 2.25 KB
/
github.opa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
Copyright © 2011 MLstate
This file is part of OPA.
OPA is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License, version 3, as published by
the Free Software Foundation.
OPA is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
more details.
You should have received a copy of the GNU Affero General Public License
along with OPA. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Author : Nicolas Glondu <nicolas.glondu@mlstate.com>
**/
/**
* GitHub generic API module
*
* @category api
* @author Nicolas Glondu, 2011
* @destination public
*/
//package stdlib.apis.github
/* Types returned by API */
type GitHub.plan = {
name : string
collaborators : int
space : int
private_repos : int
}
type GitHub.user_more = {
total_private_repo_count : int
collaborators : int
disk_usage : int
owned_private_repo_count : int
private_gist_count : int
plan : GitHub.plan
}
type GitHub.user = {
id : int
login : string
name : string
company : string
gravatar_id : string
created_at : Date.date
location : string
blog : string
public_repo_count : int
public_gist_count : int
followers_count : int
following_count : int
user_type : string
more : option(GitHub.user_more)
}
type GitHub.repository = {
name : string
owner : string
homepage : string /* Not always returned */
url : string
description : string
language : string
created_at : Date.date
pushed_at : Date.date
size : int
private : bool
fork : bool
forks : int
watchers : int
has_downloads : bool
has_wiki : bool
has_issues : bool
open_issues : int
}
type GitHub.public_key = {
title : string
id : int
key : string
}
type GitHub.commit_user = {
name : string
login : string
email : string
}