brew install mongodb
Set up launchctl to auto start mongod
$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)
| <?php | |
| /* | |
| * Plugin Name: LearnPress to WP Rest API | |
| * Plugin URI: https://www.webapp.bg/wp-extensions/learnpress-rest-api | |
| * Description: A plugin to add endpoints for LearnPress to WP REST API | |
| * Version: 1.0 | |
| * Author: Marin Stoyanov | |
| * Author URI: https://www.webapp.bg/ | |
| * License: GPL2 | |
| */ |
| # An easy way to get the recommendations from goodreads because there isn't an API to get the information | |
| require 'mechanize' | |
| require 'yaml' | |
| require 'goodreads' | |
| keys = YAML.load_file ENV['HOME']+'/.goodreads' | |
| client = Goodreads::Client.new(:api_key => keys["developer_key"], :api_secret => keys["developer_secret"]) | |
| agent = Mechanize.new | |
| page = agent.get 'http://www.goodreads.com/recommendations/' |