lib/rongcloud/service/user.rb in rongcloud-0.1.3 vs lib/rongcloud/service/user.rb in rongcloud-0.1.4
- old
+ new
@@ -13,8 +13,17 @@
}
res = Rongcloud::Service.req_post(post)
self.token = res[:token]
res[:token]
end
+
+ #刷新用户信息
+ def refresh
+ post = {uri: Rongcloud::Service::API_URI[:USER_REFRESH],
+ params: optional_params({userId: self.user_id, name: self.name, portraitUri: self.portrait_uri})
+ }
+ res = Rongcloud::Service.req_post(post)
+ res[:code]==200
+ end
end
end
end
\ No newline at end of file