create account

Social Meal - social application - Add another user rating by piach

View this thread on: hive.blogpeakd.comecency.com
· @piach · (edited)
$66.24
Social Meal - social application - Add another user rating
Hello, today I want to show you my next feature in my Social Meal API.  I had added possibility to rate another user. I also fixed some bug in event resource

### New Features
- In this contribution I want to show You new feature, it is rating another users. Rating is very important feature in this application, because person who is organising event see who want to join to this event. The organiser will check rating this person, if everything is ok, he will accept this person, if the user has bad rating it is mean, that this user is no a good candidate for participate in this event. The rating will be displaying as stars, maximum 5 stars and minimum 0 star. 
- One user can rate another user only once, but he can change rate. User can not rate yourself.
- What is more I changed connected with rating user profile, change displaying rating in user profile, I changed BasicUserResource, whitch is responsible for returning basic user data.
- I made also separate model for address for events.

![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1517356517/tjwcksqjxmouwqfujprx.png)

### The implementation contains:
- added new domain class for address, add this address to event, add fluent API
- added address resources and mapping with address domain model
- added rating domain model with functions, fluent API and change migrations
- added rating resource and mapping with rating domain model
- added rating controller, service and error codes for invalid rating
- unit test for rating service

- screen with commits from github:
<center>![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1517356692/lds4j5htgkmxvppxziok.png)
</center>
    

[Github project link: SocialMeal](https://github.com/Arkaady/SocialMeal)
[Github my profile: Arkaady/piach](https://github.com/Arkaady)

Links for commits for this features:
[1](https://github.com/Arkaady/SocialMeal/commit/6b09c8bd229aba7cc075c4abc301d89a6c8f511f)
[2](https://github.com/Arkaady/SocialMeal/commit/c2463a71ceead047f949e0ec39b093f8d6883e65)
[3](https://github.com/Arkaady/SocialMeal/commit/8eb64624be09c6f62af27fbf7cafc8d6f0f71ab0)
[4](https://github.com/Arkaady/SocialMeal/commit/c846a5332cf6b65534eb559cfaa742675cb86705)
[5](https://github.com/Arkaady/SocialMeal/commit/4cc93a8a95e2379c977cb82ba51700c05e01db43)
[6](https://github.com/Arkaady/SocialMeal/commit/7e66331bbedd923c66ceb6198fb2fd4e765b8a46)

I will keep you informed about changes. If someone want to help me, just write to me.

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@piach/social-meal-social-application-add-another-user-rating">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , ,
properties (23)
authorpiach
permlinksocial-meal-social-application-add-another-user-rating
categoryutopian-io
json_metadata{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":115513636,"name":"SocialMeal","full_name":"Arkaady/SocialMeal","html_url":"https://github.com/Arkaady/SocialMeal","fork":false,"owner":{"login":"Arkaady"}},"pullRequests":[],"platform":"github","type":"development","tags":["utopian-io","utopian-io","development","opensource"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1517356517/tjwcksqjxmouwqfujprx.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1517356692/lds4j5htgkmxvppxziok.png","https://github.com/Arkaady/SocialMeal","https://github.com/Arkaady","https://github.com/Arkaady/SocialMeal/commit/6b09c8bd229aba7cc075c4abc301d89a6c8f511f","https://github.com/Arkaady/SocialMeal/commit/c2463a71ceead047f949e0ec39b093f8d6883e65","https://github.com/Arkaady/SocialMeal/commit/8eb64624be09c6f62af27fbf7cafc8d6f0f71ab0","https://github.com/Arkaady/SocialMeal/commit/c846a5332cf6b65534eb559cfaa742675cb86705","https://github.com/Arkaady/SocialMeal/commit/4cc93a8a95e2379c977cb82ba51700c05e01db43","https://github.com/Arkaady/SocialMeal/commit/7e66331bbedd923c66ceb6198fb2fd4e765b8a46"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1517356517/tjwcksqjxmouwqfujprx.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1517356692/lds4j5htgkmxvppxziok.png"],"moderator":{"account":"helo","time":"2018-01-31T10:10:20.454Z","reviewed":true,"pending":false,"flagged":false}}
created2018-01-31 00:11:33
last_update2018-01-31 10:10:21
depth0
children9
last_payout2018-02-07 00:11:33
cashout_time1969-12-31 23:59:59
total_payout_value45.900 HBD
curator_payout_value20.340 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,678
author_reputation2,882,012,906,064
root_title"Social Meal - social application - Add another user rating"
beneficiaries
0.
accountutopian.pay
weight2,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,701,818
net_rshares12,593,433,847,392
author_curate_reward""
vote details (13)
@helo ·
$1.04
Thank you for the contribution. It has been approved.

I could not test [your swagger setup](http://35.177.178.135/me/events),  is the host temporarily up from time to time?

You can contact us on [Discord](https://discord.gg/uTyJkNm).
**[[utopian-moderator]](https://utopian.io/moderators)**
👍  
properties (23)
authorhelo
permlinkre-piach-social-meal-social-application-add-another-user-rating-20180131t101134329z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-01-31 10:11:36
last_update2018-01-31 10:11:36
depth1
children5
last_payout2018-02-07 10:11:36
cashout_time1969-12-31 23:59:59
total_payout_value0.779 HBD
curator_payout_value0.260 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length292
author_reputation121,547,934,535,311
root_title"Social Meal - social application - Add another user rating"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,819,878
net_rshares166,281,821,381
author_curate_reward""
vote details (1)
@piach ·
Thank you for aproved. No, everything is ok, You have to add authorization header with Token, because if you just write address/me/events you will get 401 response. I recomend you to use Postman. I think that good idea will be write tutorial how to test it, i will try to add it with next changes.
👍  
properties (23)
authorpiach
permlinkre-helo-re-piach-social-meal-social-application-add-another-user-rating-20180131t194559154z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-31 19:46:00
last_update2018-01-31 19:46:00
depth2
children3
last_payout2018-02-07 19:46:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length297
author_reputation2,882,012,906,064
root_title"Social Meal - social application - Add another user rating"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,934,935
net_rshares2,806,319,115
author_curate_reward""
vote details (1)
@helo ·
So I would also need a test user?
properties (22)
authorhelo
permlinkre-piach-re-helo-re-piach-social-meal-social-application-add-another-user-rating-20180131t201219829z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-01-31 20:12:18
last_update2018-01-31 20:12:18
depth3
children2
last_payout2018-02-07 20:12:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length33
author_reputation121,547,934,535,311
root_title"Social Meal - social application - Add another user rating"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,939,707
net_rshares0
@utopian.tip ·
Hey @helo, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
properties (22)
authorutopian.tip
permlinkre-re-piach-social-meal-social-application-add-another-user-rating-20180131t101134329z-20180131t234035
categoryutopian-io
json_metadata""
created2018-01-31 23:40:36
last_update2018-01-31 23:40:36
depth2
children0
last_payout2018-02-07 23:40:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length154
author_reputation238,310,597,885
root_title"Social Meal - social application - Add another user rating"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,979,093
net_rshares0
@steemitboard ·
Congratulations @piach! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/commented.png)](http://steemitboard.com/@piach) Award for the number of comments received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard)

If you no longer want to receive notifications, reply to this comment with the word `STOP`

> By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-piach-20180205t084814000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notifications.png"]}
created2018-02-05 08:48:12
last_update2018-02-05 08:48:12
depth1
children0
last_payout2018-02-12 08:48:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length694
author_reputation38,975,615,169,260
root_title"Social Meal - social application - Add another user rating"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id35,094,018
net_rshares0
@taisonvilla ·
o.o
properties (22)
authortaisonvilla
permlinkre-piach-social-meal-social-application-add-another-user-rating-20180202t025245376z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-02 02:52:45
last_update2018-02-02 02:52:45
depth1
children0
last_payout2018-02-09 02:52:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3
author_reputation102,557,953,861
root_title"Social Meal - social application - Add another user rating"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,285,817
net_rshares0
@utopian-io ·
### Hey @piach I am @utopian-io. I have just upvoted you!
#### Achievements
- You have less than 500 followers. Just gave you a gift to help you succeed!
- Seems like you contribute quite often. AMAZING!
#### Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
properties (22)
authorutopian-io
permlinkre-piach-social-meal-social-application-add-another-user-rating-20180131t150324427z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-01-31 15:03:24
last_update2018-01-31 15:03:24
depth1
children0
last_payout2018-02-07 15:03:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,081
author_reputation152,955,367,999,756
root_title"Social Meal - social application - Add another user rating"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id33,879,598
net_rshares0