What we'll build today

For this workshop, we'll be taking a Sinatra app that posts a simple emoji "horoscope" and adding integrations with the Wikipedia and Twitter APIs to make it more interesting.


(The template we're starting with)
To do this, we will:

  • Make a GitHub account, and clone the template from GitHub
  • Learn how to request a random article title from Wikipedia's API, and replace the emoji horoscope with that article title
  • Make a Twitter account to tweet your random horoscopes
  • Add a "post to Twitter" button to the horoscope page
  • Learn how to use OAuth, environment variables, and Twitter's API to tweet from the Sinatra app, and add this new behavior to the button

At the end, the app will look something like this:

If that doesn't sound very exciting, that's ok. There's lots of other ways you can use the Wikipedia and Twitter APIs to create something fun. This tutorial is just a starting point for you to get familiar with the process of learning a new API.

results matching ""

    No results matching ""