Commit cd5685ca8ce14ff4dbff6ada5e5a8b90808ae3d1
Exists in
master
and in
4 other branches
Merge pull request #4115 from bke-drewb/apidocs
Update api docs and remove old attribute from 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 | 14 | "username": "john_smith", |
| 15 | 15 | "email": "john@example.com", |
| 16 | 16 | "name": "John Smith", |
| 17 | - "blocked": false, | |
| 17 | + "state": "active", | |
| 18 | 18 | "created_at": "2012-05-23T08:00:58Z", |
| 19 | 19 | "bio": null, |
| 20 | 20 | "skype": "", |
| 21 | 21 | "linkedin": "", |
| 22 | 22 | "twitter": "", |
| 23 | - "dark_scheme": false, | |
| 24 | 23 | "extern_uid": "john.smith", |
| 25 | 24 | "provider": "provider_name", |
| 26 | 25 | "theme_id": 1 |
| 26 | + "color_scheme_id": 2 | |
| 27 | 27 | }, |
| 28 | 28 | { |
| 29 | 29 | "id": 2, |
| 30 | 30 | "username": "jack_smith", |
| 31 | 31 | "email": "jack@example.com", |
| 32 | 32 | "name": "Jack Smith", |
| 33 | - "blocked": false, | |
| 33 | + "state": "blocked", | |
| 34 | 34 | "created_at": "2012-05-23T08:01:01Z", |
| 35 | 35 | "bio": null, |
| 36 | 36 | "skype": "", |
| 37 | 37 | "linkedin": "", |
| 38 | 38 | "twitter": "", |
| 39 | - "dark_scheme": true, | |
| 40 | 39 | "extern_uid": "jack.smith", |
| 41 | 40 | "provider": "provider_name", |
| 42 | 41 | "theme_id": 1 |
| 42 | + "color_scheme_id": 3 | |
| 43 | 43 | } |
| 44 | 44 | ] |
| 45 | 45 | ``` |
| ... | ... | @@ -63,16 +63,16 @@ Parameters: |
| 63 | 63 | "username": "john_smith", |
| 64 | 64 | "email": "john@example.com", |
| 65 | 65 | "name": "John Smith", |
| 66 | - "blocked": false, | |
| 66 | + "state": "active", | |
| 67 | 67 | "created_at": "2012-05-23T08:00:58Z", |
| 68 | 68 | "bio": null, |
| 69 | 69 | "skype": "", |
| 70 | 70 | "linkedin": "", |
| 71 | 71 | "twitter": "", |
| 72 | - "dark_scheme": false, | |
| 73 | 72 | "extern_uid": "john.smith", |
| 74 | 73 | "provider": "provider_name", |
| 75 | 74 | "theme_id": 1 |
| 75 | + "color_scheme_id": 2 | |
| 76 | 76 | } |
| 77 | 77 | ``` |
| 78 | 78 | |
| ... | ... | @@ -156,14 +156,14 @@ GET /user |
| 156 | 156 | "email": "john@example.com", |
| 157 | 157 | "name": "John Smith", |
| 158 | 158 | "private_token": "dd34asd13as", |
| 159 | - "blocked": false, | |
| 159 | + "state": "active", | |
| 160 | 160 | "created_at": "2012-05-23T08:00:58Z", |
| 161 | 161 | "bio": null, |
| 162 | 162 | "skype": "", |
| 163 | 163 | "linkedin": "", |
| 164 | 164 | "twitter": "", |
| 165 | - "dark_scheme": false, | |
| 166 | 165 | "theme_id": 1 |
| 166 | + "color_scheme_id": 2 | |
| 167 | 167 | "is_admin": false, |
| 168 | 168 | "can_create_group" : true, |
| 169 | 169 | "can_create_team" : true, | ... | ... |
lib/api/entities.rb
| ... | ... | @@ -2,7 +2,7 @@ module API |
| 2 | 2 | module Entities |
| 3 | 3 | class User < Grape::Entity |
| 4 | 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 | 6 | end |
| 7 | 7 | |
| 8 | 8 | class UserSafe < Grape::Entity | ... | ... |