This repository contains a bare-bones Flashcards app to demonstrate how to integrate an app with the OpenMinds API. The project will evolve over time to showcase more features of the API and to highlight best practices when integrating with OpenMinds.
A demo of the app is available at http://root-1.github.com/flashcards/.
To run the app yourself, you will need to clone the repository and make the directory available through a web server like Apache.
- Clone the repository into the
~/Sites
directory. - Open System Preference and click the "Sharing" icon.
- Turn on "Web Sharing".
- You can now access the app at
http://localhost/~YOUR_USERNAME/flashcards
, where YOUR_USERNAME is your Mac user name. Note that you will not be able to connect to OpenMinds until completing the steps in "Registering the App".
-
Install and run a webserver. We'll use Apache for this example. 1a. Your webserver should be able to access a "UserHome" directory. See [detailed instructions here] (./Windows_Webserver_Instructions.md)
-
Clone the flashcards repository as a sub-directory in your UserHome directory.
-
Restart the webserver (Mandatory after making any config changes)
-
You can now access the app at
http://localhost/~YOUR_USERNAME/flashcards
, where YOUR_USERNAME is your Windows user name. Note that you will not be able to connect to OpenMinds until completing the steps in "Registering the App".
- Visit the Applications Endpoint in the OpenMinds API Explorer.
- In the "JSON Body", enter JSON with the listed properties. In particular, you must supply
name
,url
, andformats
.- Use your localhost URL above for the url
- Use
["vocabulary"]
for formats.
- Click "Submit". The Responses tab should open and show you the id of your app.
- Copy the app id and paste it as the value of APP_ID in flashcards.js.
- Replace REDIRECT_URI with your apps URL. Include
/oauth_redirect.html
at the end. - You should now be able to connect to OpenMinds and load data through the OpenMinds API.