Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

love

A system to share your appreciation

Subscribe to updates I use love


Statistics on love

Number of watchers on Github 106
Number of open issues 14
Average time to close an issue about 21 hours
Main language Python
Average time to merge a PR about 9 hours
Open pull requests 2+
Closed pull requests 4+
Last commit over 1 year ago
Repo Created over 3 years ago
Repo Last Updated over 1 year ago
Size 1.22 MB
Organization / Authoryelp
Contributors4
Page Updated
Do you use love? Leave a review!
View open issues (14)
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating love for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Build Status

Yelp Love

Yelp Love

Yelp Love lets you show others your appreciation for something they've done. Did they make you laugh in your darkest hour? Did they save your ass? Did they help fix that bug? Send them love!

Features

  • Send love to one or more recipients (publicly or privately)
  • Email notifications when users receive love
  • Viewing the most recent 20 loves sent or received by any user
  • Leaderboard with the top 20 users who sent and received love
  • API that allows external applications to send and retrieve love data
  • Manual or automated synchronization between Yelp Love and your employee data
  • Admin section to manage aliases and API keys

To get an idea what Yelp Love looks like go and check out the screenshots.

Installation

Yelp Love runs on Google App Engine. In order to install Yelp Love you will need a Google account and the Google App Engine SDK for Python. We recommend installing this via Homebrew if you don't already have it:

$ brew install google-app-engine

Create a new project

Login to Google Cloud Platform and create a new project and give it a project name. Optionally you can specify a project id - a unique identifier for your project. If you dont specify a project id Google will create a random one for you. This id can not be changed once the project is created.

Prepare for deployment

Before you can deploy the application for the first time and start sending love you have to modify app.yaml and worker.yaml. Please edit these files and replace the application placeholder with your project id.

Copy the example config file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.

Initial deployment

Finally, run

$ make deploy

This will open a browser window for you to authenticate yourself with your Google account and will upload your local application code to Google App Engine.

Once the deployment succeeds open your browser and navigate to your application URL, normally https://project_id.appspot.com.

Import employee data

CSV

Create a file employees.csv in the import directory, add all your employee data, and deploy it. Weve put an example csv file in that directory so you can get an idea of which fields Yelp Love requires for an employee.

Once the CSV file is deployed point your browser to https://project_id.appspot.com/employees/import. and follow the instructions.

JSON via Amazon S3

Create a file employees.json, add all your employee data, and save it in an S3 bucket. Weve put an example JSON file in the import directory so you can get an idea of which fields Yelp Love requires for an employee.

The S3 bucket name must be configured in config.py.

In order to access the S3 bucket you have to save AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY using the Secret model. Locally you can open up the interactive console and execute the following code:

from models import Secret

Secret(id='AWS_ACCESS_KEY_ID', value='change-me').put()
Secret(id='AWS_SECRET_ACCESS_KEY', value='change-me').put()

In production you can either use the Datastore UI or the Remote API.

To kick off the final import you have to run:

from logic import employee
employee.load_employees()

You can also setup a cronjob to keep employee data up to date. Checkout cron.yaml for further details.

Development

Prerequisites

Before you can run Yelp Love on your local machine please install the Google App Engine SDK for Python. You can get it from Google directly or use your favorite packet manager.

Running the application locally

  • Check out the application code: git clone git@github.com:Yelp/love.git
  • Follow the Prepare for deployment section
  • Run the app: make run-dev will start both Yelp Love as well as the Admin server
  • Follow the CSV import section to locally import user data
  • Make your changes

Deployment

Once you've made your code changes and want to deploy them, you must bump the app version. If you don't, your deployment will overwrite the active version of the app on App Engine. The version number must be updated in 2 or possibly 3 places, depending on the nature of your changes.

You will absolutely want to bump the version in setup.py and app.yaml. These versions should always match e.g., 1.3.10 in setup.py and 1-3-10 in app.yaml.

If you modified worker.yaml then you will also need to bump the version of worker.yaml. This version number is specific to the worker module and is independent of the main app version.

When you bumped versions in the appropriate files you can deploy your changes by running make deploy.

If you are seeing the following error:

Error 404: --- begin server output ---
This application does not exist (project_id=u'PROJECT-ID'). To create an App Engine application in this project, run "gcloud app create" in your console.

This is because GAE is no longer automatically initialized, you must run gcloud app create using the Google Cloud Shell (not your terminal...I know...confusing) before deploying on App Engine for the first time. See the screenshot below: GAE cloud shell

Once your code has been uploaded to Google, you must activate the newly deployed version in the Developer Console. Then you're done!

API

Yelp Love also ships with an API which will be available under https://project_id.appspot.com/api. All data of successful GET requests is sent as JSON.

Authentication

Successful requests to the API require an API key. These can be created in the Admin section of the application. Authenticating with an invalid API key will return 401 Unauthorized.

Endpoints

All names, e.g. sender or recipient in the following examples refer to employee usernames.

Retrieve love

GET /love?sender=foo&recipient=bar&limit=20

You must provide either a sender or a recipient. The limit parameter is optional - no limiting will be applied if omitted.

Example
curl "https://project_id.appspot.com/api/love?sender=hammy&api_key=secret"
[
  {
    "timestamp": "2017-02-10T18:10:08.552636",
    "message": "New Barking Release! <3",
    "sender": "hammy",
    "recipient": "darwin"
  }
]

Send love

POST /love

Sending love requires 3 parameters: sender, recipient, and message. The recipient parameter may contain multiple comma-separated usernames.

Example
curl -X POST -F "sender=hammy" -F "recipient=john,jane" -F "message=YOLO" -F "api_key=secret"  https://project_id.appspot.com/api/love
Love sent to john, jane!

Autocomplete usernames

GET /autocomplete?term=ham

The autocomplete endpoint will return all employees which first_name, last_name, or username match the given term.

Example
curl "https://project_id.appspot.com/api/autocomplete?term=ha&api_key=secret"
[
  {
    "label": "Hammy Yo (hammy)",
    "value": "hammy"
  },
  {
    "label": "Johnny Hamburger (jham)",
    "value": "jham"
  }
]

Original Authors and Contributors

For more info check out the Authors file.

License

Yelp Love is licensed under the MIT license.

Contributing

Everyone is encouraged to contribute to Yelp Love by forking the Github repository and making a pull request or opening an issue.

love open issues Ask a question     (View All Issues)
  • over 2 years Consistent API responses
love open pull requests (View All Pulls)
  • Customize dropdown on leaderboard page
  • Link to love recipients explore page after sending love.
love questions on Stackoverflow (View All Questions)
  • How do I swap odd elements in array of a String? Eg: Input: I Love India Output will be: I voLe dnIia
  • I Created RSS FEED in php and the feed also showing on the page but they are now fatching by comment love boards, How can i fix it?
  • Was the Object superclass removed from LÖVE?
  • TCPDF doesn't show love and star symbols
  • Error in compiling, <identifier> expected.. Would love to know why is this happening and how I can fix it in the future
  • Packaging external libraries with love-android-sdl2
  • How to prevent command key's default OS behavior using Love2d (LÖVE) or Lua
  • How to draw quickly lots of filled shapes in LÖVE?
  • CSS LOVE! Animated background in blockquote on mouse over works but on mouse out doesn't
  • I have a string "I love stack overflow very much" how to remove spaces between character and make groups of 8 character?
  • I would love to shorten up this while loop in Java. Any tips on how I should do this?
  • How to write a regex to match title case sentence (Ex: I Love To Work)
  • How to implement Facebook's new emoting emojis: Love, haha, wow, sad and angry in android?
  • How can I create a tag for a product I love?
  • Having issues with css margins and div image constraints, would love some advice or tips
  • How can I "react" to a Facebook post (Love, Like, Wow, Sad) using Graph API?
  • Lua-Love program not closing devices as I expect it to
  • calling love functions in lua
  • How to install Lua Love using the luarocks manger?
  • iTunesLibrary.framework: retrieve love rating field from ITLibMediaItem
  • How does this code produce "I love you" without any characters or digits?
  • Tor Stem - To Russia With Love Connection Issues
  • Background colour in LÖVE
  • LÖVE `point` is not callable
  • How I can creat buttons for love/unlove items in tableview
  • Undefined reference errors while compiling LOVE for android using NDK
  • love letter passes for base test cases
  • How can I fix this error? This is not my code, this code is an extension for an app I love playing
  • Both these simple codes in C are identical but I am getting different outputs. Would love some introspection
  • LÖVE viewport like Libgdx
love list of languages used
Other projects in Python