Handle all your company's notifications with a Yo
Posted on December 17, 2015
Learn how to integrate the Yo API to simplify your daily notifications.
Here at Connaxis we get notifications every day from several different sources. New client requesting work? That may be an email to email@example.com. Someone is asking about a job opening? Try firstname.lastname@example.org. There’s a new design contest on Choosa (one of our companies), maybe there’s a payment from Stripe or Paypal.
I like to have quick notifications without having to go into my email, or opening a dashboard or panel. With Yo, I can receive a message on my smartphone that quickly tells me what happened. Plus, Yo is fun! Follow me as I show you how I integrate Yo notifications into my daily workflow.
Create a Yo Account
Go to https://dev.justyo.co/ and create a new account or login with your existing one. Click on + Add Account button. Name it something descriptive for the notification you’re looking for (I use CONNAXIS_CLIENT, CONNAXIS_EMAIL, CHOOSA_STRIPE, CHOOSA_PAYPAL). Simple, one or two word names that tell me exactly what happened. You can upload a photo as well if you like. Type your email address so you can recover the account in case you forget the password. The other fields are not mandatory and we can leave them blank for now. When you create the account, you’ll have access to its API key. We’ll need that key in order to send a Yo as that username.
Integrate the Yo API into your programs
We use a lot of PHP internally, so I created a couple of open source libraries to help me send Yos.
Yo-PHP is a simple script to send a Yo in a couple of lines of code. You can get it here: https://github.com/nanexcool/yo-php. We also use CakePHP for some of our projects, so I created a Yo plugin for CakePHP. You can find it at https://github.com/nanexcool/yo-plugin-cakephp although we’ll not be using it here. Now, in the backend of our website, whenever someone applies for a job position, in the code that sends emails, saves to the database, updates Salesforce, etc., I can do something like this:
// Agregar el archivo
// Consigue tu llave API en dev.justyo.co
$apiKey = 'YOUR_API_KEY';
$yo = new Yo($apiKey);
// Enviar un Yo a un usuario
// Enviar un Yo con un link a un usuario
$link = 'http://www.connaxis.com/job_applications/12345';
Very simple! If the API key is for a user CONNAXIS_CV and my username is MARIANO, the first $yo->user(‘MARIANO’) will send me a simple Yo that I’ll see as sent from CONNAXIS_CV. Immediately I can see that a new job application was sent.
If I want to send more data I can send a link along with the Yo. In this case, I can attach the URL for me to see exactly that job application. If I receive that Yo and tap on it, I’ll be sent to my mobile browser to the correct URL.
There’s a lot more you can do with a Yo. You can send location data instead of a URL. By combining different account names with link data or location data, a simple Yo can carry a whole lot more information.
Let me know if you’ve found a great use for Yo!