fortytwo 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +68 -66
- data/lib/fortytwo/responses/models/cursus_user.rb +1 -1
- data/lib/fortytwo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48cc8a78ff6272711bb718150566dbecae564b82
|
4
|
+
data.tar.gz: f24170785dfeec0afba650ff977a16123a326337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4f61dae46bafa4f010693c58dc34014474c1c0f71b8ff442768244ae100a86b99f109ac8756a51843703e90ca61bf5088e634dcb32291c03ed82c7855a5a5ac
|
7
|
+
data.tar.gz: c18397ff8d90cdb5c18d9ef0cd36b1a64e7bced69e615479625852b856a8e536f0706848713fcd496a908aa6b32a1aaf93e096cbaf25f29c646919522242b177
|
data/README.md
CHANGED
@@ -50,90 +50,92 @@ Responses from the API are all parsed and converted into Ruby objects. This way,
|
|
50
50
|
response = client.user("mfernand")
|
51
51
|
user = response.user
|
52
52
|
|
53
|
-
user.id
|
54
|
-
user.email
|
55
|
-
user.login
|
56
|
-
user.first_name
|
57
|
-
user.last_name
|
58
|
-
user.url
|
59
|
-
user.phone
|
60
|
-
user.url
|
61
|
-
user.displayname
|
62
|
-
user.image_url
|
63
|
-
user.staff
|
64
|
-
user.correction_point
|
65
|
-
user.pool_month
|
66
|
-
user.pool_year
|
67
|
-
user.location
|
68
|
-
user.wallet
|
69
|
-
user.groups
|
53
|
+
user.id #=> 19619
|
54
|
+
user.email #=> "mfernand@student.42.us.org"
|
55
|
+
user.login #=> "mfernand"
|
56
|
+
user.first_name #=> "Matias"
|
57
|
+
user.last_name #=> "Fernandez"
|
58
|
+
user.url #=> "https://api.intra.42.fr/v2/users/mfernand"
|
59
|
+
user.phone #=> nil
|
60
|
+
user.url #=> "https://api.intra.42.fr/v2/users/mfernand"
|
61
|
+
user.displayname #=> "Matias Fernandez"
|
62
|
+
user.image_url #=> "https://cdn.intra.42.fr/users/mfernand.jpg"
|
63
|
+
user.staff #=> false
|
64
|
+
user.correction_point #=> 2
|
65
|
+
user.pool_month #=> "july"
|
66
|
+
user.pool_year #=> "2016"
|
67
|
+
user.location #=> nil
|
68
|
+
user.wallet #=> 0
|
69
|
+
user.groups #=> []
|
70
70
|
|
71
71
|
user.cursus_users.each do |user_cursus|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
72
|
+
user_cursus.id #=> 14121
|
73
|
+
user_cursus.begin_at #=> "2016-09-19T22:00:00.000Z"
|
74
|
+
user_cursus.end_at #=> nil
|
75
|
+
user_cursus.grade #=> "Midshipman"
|
76
|
+
user_cursus.level #=> 3.91
|
77
|
+
user_cursus.skills #=> nil
|
78
|
+
user_cursus.cursus_id #=> 1
|
79
|
+
|
80
|
+
user_cursus.cursus.id #=> 1
|
81
|
+
user_cursus.cursus.created_at #=> "2014-11-02T16:43:38.480Z"
|
82
|
+
user_cursus.cursus.name #=> "42"
|
83
|
+
user_cursus.cursus.slug #=> "42"
|
84
84
|
end
|
85
85
|
|
86
86
|
user.projects_users.each do |user_project|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
87
|
+
user_project.id #=> 405588
|
88
|
+
user_project.occurence #=> nil
|
89
|
+
user_project.final_mark #=> 115
|
90
|
+
user_project.status #=> "finished"
|
91
|
+
user_project.validated #=> true
|
92
|
+
user_project.current_team_id #=> 1434665
|
93
|
+
user_project.cursus_ids #=> [1]
|
94
|
+
|
95
|
+
user_project.project.id #=> 1
|
96
|
+
user_project.project.name #=> "Libft"
|
97
|
+
user_project.project.slug #=> "libft"
|
98
98
|
end
|
99
99
|
|
100
100
|
user.expertises_users.each do |expertise|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
101
|
+
expertise.id #=> 7696
|
102
|
+
expertise.expertise_id #=> 29
|
103
|
+
expertise.interested #=> true
|
104
|
+
expertise.value #=> 2
|
105
|
+
expertise.contact_me #=> false
|
106
|
+
expertise.created_at #=> "2016-10-15T02:05:37.861Z"
|
107
|
+
expertise.user_id #=> 19619
|
108
108
|
end
|
109
109
|
|
110
110
|
user.achievements.each do |achievement|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
111
|
+
achievement.id #=> 41
|
112
|
+
achievement.name #=> "In the name of Nicolas"
|
113
|
+
achievement.description #=> "Etre logué 90h sur une semaine. (à bosser, comme Nicolas vous l'a conseillé !)"
|
114
|
+
achievement.tier #=> "easy"
|
115
|
+
achievement.kind #=> "scolarity"
|
116
|
+
achievement.visible #=> true
|
117
|
+
achievement.image #=> "/uploads/achievement/image/41/SCO001.svg"
|
118
|
+
achievement.nbr_of_success #=> nil
|
119
|
+
achievement.users_url #=> "https://api.intra.42.fr/v2/achievements/41/users"
|
120
120
|
end
|
121
121
|
|
122
122
|
response = client.user_sessions("mfernand")
|
123
123
|
user_sessions = response.user_sessions
|
124
124
|
|
125
125
|
user_sessions.each do |session|
|
126
|
-
session.id
|
127
|
-
session.begin_at
|
128
|
-
session.end_at
|
129
|
-
session.primary
|
130
|
-
session.floor
|
131
|
-
session.row
|
132
|
-
session.post
|
133
|
-
session.host
|
134
|
-
session.campus_id
|
126
|
+
session.id #=> 5017063
|
127
|
+
session.begin_at #=> "2016-11-14T09:57:19"
|
128
|
+
session.end_at #=> "2016-11-14T10:07:19"
|
129
|
+
session.primary #-> true
|
130
|
+
session.floor #=> nil
|
131
|
+
session.row #=> nil
|
132
|
+
session.post #=> nil
|
133
|
+
session.host #=> "e1z2r7p18"
|
134
|
+
session.campus_id #=> 7
|
135
135
|
end
|
136
136
|
|
137
137
|
```
|
138
138
|
|
139
|
-
|
139
|
+
## Contribute to FortyTwo
|
140
|
+
|
141
|
+
There's lots of ways you can contribute. Hit me up on slack, fork it, play around with the implementation, or improve the docs.
|
data/lib/fortytwo/version.rb
CHANGED