Commit 07fd95f3840908018cb3712162a441e63409bc31

Authored by Drew Blessing
1 parent d58aca06

Update api docs and remove old attribute from User entity.

The API docs incorrectly referenced a few attributes associated with users. The 'blocked' attribute has been replaced with 'state'. Also, 'dark_scheme' seems to no longer be available in the User model so it should be removed from the exposed attributes in the API User entity.

Add color scheme ID to API User entity
Showing 2 changed files with 9 additions and 9 deletions   Show diff stats
doc/api/users.md
@@ -14,32 +14,32 @@ GET /users @@ -14,32 +14,32 @@ GET /users
14 "username": "john_smith", 14 "username": "john_smith",
15 "email": "john@example.com", 15 "email": "john@example.com",
16 "name": "John Smith", 16 "name": "John Smith",
17 - "blocked": false, 17 + "state": "active",
18 "created_at": "2012-05-23T08:00:58Z", 18 "created_at": "2012-05-23T08:00:58Z",
19 "bio": null, 19 "bio": null,
20 "skype": "", 20 "skype": "",
21 "linkedin": "", 21 "linkedin": "",
22 "twitter": "", 22 "twitter": "",
23 - "dark_scheme": false,  
24 "extern_uid": "john.smith", 23 "extern_uid": "john.smith",
25 "provider": "provider_name", 24 "provider": "provider_name",
26 "theme_id": 1 25 "theme_id": 1
  26 + "color_scheme_id": 2
27 }, 27 },
28 { 28 {
29 "id": 2, 29 "id": 2,
30 "username": "jack_smith", 30 "username": "jack_smith",
31 "email": "jack@example.com", 31 "email": "jack@example.com",
32 "name": "Jack Smith", 32 "name": "Jack Smith",
33 - "blocked": false, 33 + "state": "blocked",
34 "created_at": "2012-05-23T08:01:01Z", 34 "created_at": "2012-05-23T08:01:01Z",
35 "bio": null, 35 "bio": null,
36 "skype": "", 36 "skype": "",
37 "linkedin": "", 37 "linkedin": "",
38 "twitter": "", 38 "twitter": "",
39 - "dark_scheme": true,  
40 "extern_uid": "jack.smith", 39 "extern_uid": "jack.smith",
41 "provider": "provider_name", 40 "provider": "provider_name",
42 "theme_id": 1 41 "theme_id": 1
  42 + "color_scheme_id": 3
43 } 43 }
44 ] 44 ]
45 ``` 45 ```
@@ -63,16 +63,16 @@ Parameters: @@ -63,16 +63,16 @@ Parameters:
63 "username": "john_smith", 63 "username": "john_smith",
64 "email": "john@example.com", 64 "email": "john@example.com",
65 "name": "John Smith", 65 "name": "John Smith",
66 - "blocked": false, 66 + "state": "active",
67 "created_at": "2012-05-23T08:00:58Z", 67 "created_at": "2012-05-23T08:00:58Z",
68 "bio": null, 68 "bio": null,
69 "skype": "", 69 "skype": "",
70 "linkedin": "", 70 "linkedin": "",
71 "twitter": "", 71 "twitter": "",
72 - "dark_scheme": false,  
73 "extern_uid": "john.smith", 72 "extern_uid": "john.smith",
74 "provider": "provider_name", 73 "provider": "provider_name",
75 "theme_id": 1 74 "theme_id": 1
  75 + "color_scheme_id": 2
76 } 76 }
77 ``` 77 ```
78 78
@@ -156,14 +156,14 @@ GET /user @@ -156,14 +156,14 @@ GET /user
156 "email": "john@example.com", 156 "email": "john@example.com",
157 "name": "John Smith", 157 "name": "John Smith",
158 "private_token": "dd34asd13as", 158 "private_token": "dd34asd13as",
159 - "blocked": false, 159 + "state": "active",
160 "created_at": "2012-05-23T08:00:58Z", 160 "created_at": "2012-05-23T08:00:58Z",
161 "bio": null, 161 "bio": null,
162 "skype": "", 162 "skype": "",
163 "linkedin": "", 163 "linkedin": "",
164 "twitter": "", 164 "twitter": "",
165 - "dark_scheme": false,  
166 "theme_id": 1 165 "theme_id": 1
  166 + "color_scheme_id": 2
167 "is_admin": false, 167 "is_admin": false,
168 "can_create_group" : true, 168 "can_create_group" : true,
169 "can_create_team" : true, 169 "can_create_team" : true,
lib/api/entities.rb
@@ -2,7 +2,7 @@ module API @@ -2,7 +2,7 @@ module API
2 module Entities 2 module Entities
3 class User < Grape::Entity 3 class User < Grape::Entity
4 expose :id, :username, :email, :name, :bio, :skype, :linkedin, :twitter, 4 expose :id, :username, :email, :name, :bio, :skype, :linkedin, :twitter,
5 - :dark_scheme, :theme_id, :state, :created_at, :extern_uid, :provider 5 + :theme_id, :color_scheme_id, :state, :created_at, :extern_uid, :provider
6 end 6 end
7 7
8 class UserSafe < Grape::Entity 8 class UserSafe < Grape::Entity