OSDN Git Service

Update api docs and remove old attribute from User entity.
authorDrew Blessing <drew.blessing@buckle.com>
Tue, 28 May 2013 23:41:15 +0000 (18:41 -0500)
committerDrew Blessing <drew.blessing@buckle.com>
Wed, 29 May 2013 10:40:17 +0000 (05:40 -0500)
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

doc/api/users.md
lib/api/entities.rb

index ee5e98a..9dd35f4 100644 (file)
@@ -14,32 +14,32 @@ GET /users
     "username": "john_smith",
     "email": "john@example.com",
     "name": "John Smith",
-    "blocked": false,
+    "state": "active",
     "created_at": "2012-05-23T08:00:58Z",
     "bio": null,
     "skype": "",
     "linkedin": "",
     "twitter": "",
-    "dark_scheme": false,
     "extern_uid": "john.smith",
     "provider": "provider_name",
     "theme_id": 1
+    "color_scheme_id": 2
   },
   {
     "id": 2,
     "username": "jack_smith",
     "email": "jack@example.com",
     "name": "Jack Smith",
-    "blocked": false,
+    "state": "blocked",
     "created_at": "2012-05-23T08:01:01Z",
     "bio": null,
     "skype": "",
     "linkedin": "",
     "twitter": "",
-    "dark_scheme": true,
     "extern_uid": "jack.smith",
     "provider": "provider_name",
     "theme_id": 1
+    "color_scheme_id": 3
   }
 ]
 ```
@@ -63,16 +63,16 @@ Parameters:
   "username": "john_smith",
   "email": "john@example.com",
   "name": "John Smith",
-  "blocked": false,
+  "state": "active",
   "created_at": "2012-05-23T08:00:58Z",
   "bio": null,
   "skype": "",
   "linkedin": "",
   "twitter": "",
-  "dark_scheme": false,
   "extern_uid": "john.smith",
   "provider": "provider_name",
   "theme_id": 1
+  "color_scheme_id": 2
 }
 ```
 
@@ -156,14 +156,14 @@ GET /user
   "email": "john@example.com",
   "name": "John Smith",
   "private_token": "dd34asd13as",
-  "blocked": false,
+  "state": "active",
   "created_at": "2012-05-23T08:00:58Z",
   "bio": null,
   "skype": "",
   "linkedin": "",
   "twitter": "",
-  "dark_scheme": false,
   "theme_id": 1
+  "color_scheme_id": 2
   "is_admin": false,
   "can_create_group" : true,
   "can_create_team" : true,
index c3c351e..a8f5068 100644 (file)
@@ -2,7 +2,7 @@ module API
   module Entities
     class User < Grape::Entity
       expose :id, :username, :email, :name, :bio, :skype, :linkedin, :twitter,
-             :dark_scheme, :theme_id, :state, :created_at, :extern_uid, :provider
+             :theme_id, :color_scheme_id, :state, :created_at, :extern_uid, :provider
     end
 
     class UserSafe < Grape::Entity