fortytwo 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +51 -24
  3. data/lib/fortytwo/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6abbbceb4da8a60b40ba1d75fd220034b273261
4
- data.tar.gz: ba51dce948dd36f78025847037a026c562ab3f35
3
+ metadata.gz: aa27d5a2d701420805a12d81277cc1a70397c835
4
+ data.tar.gz: dce801ccabb6cb708c70b0989f7455f553c8d5be
5
5
  SHA512:
6
- metadata.gz: a762879b2330d8383afa7645d7538130a29bf6ffbd586db494b159e75e21d0fc7d169d018c05fa6e46a7698f918864e82a467ca5cc39d1f8ef5275d6a9dc9284
7
- data.tar.gz: 1eaaa12909726e39e30a02b1e760c57c38411ca525b7e1b5c76624884cba6a8e37af07e13d25f599f12bbf728bbddcf4418471e8c713fbc5418dd86723dbe901
6
+ metadata.gz: f8b9db68df3b7619c262a26040e6ebfdbd9006cb791173d902e0f35515aae1c7d19a09eccf8527fbcc55783d9b76c44310158a2453fb3215fb2d457e2671599d
7
+ data.tar.gz: 81d4562b13878de058aacec7046350a059fe5b1ac56f2168d80d2b4fe88419427e55d2cb7c2e757bc0940d0caad1fbeac7726487fea4d177faa72d8a1bd76ed6
data/README.md CHANGED
@@ -47,32 +47,59 @@ client = FortyTwo::Client.new({ api_key: YOUR_API_KEY, api_secret: YOUR_API_SECR
47
47
  Responses from the API are all parsed and converted into Ruby objects. This way, you're able to access information using dot notation.
48
48
 
49
49
  ```ruby
50
- response = client.user("bsaget")
50
+ response = client.user("mfernand")
51
51
  user = response.user
52
52
 
53
- user.id #=>
54
- user.first_name #=> Bob
55
- user.last_name #=> Saget
56
- user.cursus_users.first.level #=> 12.3
57
-
58
- user.instance_variables
59
- # [:@id, :@email, :@login, :@first_name, :@last_name, :@url, :@phone, :@displayname, :@image_url,
60
- # :@staff, :@correction_point, :@pool_month, :@pool_year, :@location, :@wallet, :@groups,
61
- # :@cursus_users, :@projects_users, :@achievements, :@titles, :@partnerships, :@patroned,
62
- # :@patroning, :@expertises_users, :@campus]
63
-
64
- user.cursus_users.first.instance_variables
65
- # [:@id, :@begin_at, :@end_at, :@grade, :@level, :@skills, :@cursus_id, :@user, :@cursus]
66
-
67
- user.projects_users.first.instance_variables
68
- # [:@id, :@occurrence, :@final_mark, :@status, :@validated, :@current_team_id, :@project, :@cursus_ids]
69
-
70
- user.expertises_users.first.instance_variables
71
- # [:@id, :@expertise_id, :@interested, :@value, :@contact_me, :@created_at, :@user_id]
72
-
73
- user.campus.first.instance_variables
74
- # [:@id, :@name, :@time_zone, :@language, :@users_count, :@vogsphere_id]
75
-
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
+
71
+ user.cursus_users.first.id #=> 14121
72
+ user.cursus_users.first.begin_at #=> "2016-09-19T22:00:00.000Z"
73
+ user.cursus_users.first.end_at #=> nil
74
+ user.cursus_users.first.grade #=> "Midshipman"
75
+ user.cursus_users.first.level #=> 3.91
76
+ user.cursus_users.first.skills #=> nil
77
+
78
+ user.cursus_users.first.cursus_id #=> 1
79
+ user.cursus_users.first.cursus.id #=> 1
80
+ user.cursus_users.first.cursus.created_at #=> "2014-11-02T16:43:38.480Z"
81
+ user.cursus_users.first.cursus.name #=> "42"
82
+ user.cursus_users.first.cursus.slug #=> "42"
83
+
84
+ user.projects_users.first.id #=> 405588
85
+ user.projects_users.first.occurence #=> nil
86
+ user.projects_users.first.final_mark #=> 115
87
+ user.projects_users.first.status #=> "finished"
88
+ user.projects_users.first.validated #=> true
89
+ user.projects_users.first.current_team_id #=> 1434665
90
+ user.projects_users.first.cursus_ids #=> [1]
91
+
92
+ user.projects_users.first.project.id #=> 1
93
+ user.projects_users.first.project.name #=> "Libft"
94
+ user.projects_users.first.project.slug #=> "libft"
95
+
96
+ user.expertises_users.first.id #=> 7696
97
+ user.expertises_users.first.expertise_id #=> 29
98
+ user.expertises_users.first.interested #=> true
99
+ user.expertises_users.first.value #=> 2
100
+ user.expertises_users.first.contact_me #=> false
101
+ user.expertises_users.first.created_at #=> "2016-10-15T02:05:37.861Z"
102
+ user.expertises_users.first.user_id #=> 19619
76
103
 
77
104
  ```
78
105
 
@@ -1,3 +1,3 @@
1
1
  module FortyTwo
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fortytwo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Fernandez