README.md in loquor-0.0.1 vs README.md in loquor-0.0.2
- old
+ new
@@ -1,6 +1,6 @@
-# Loquor
+# Loquor - Meducation API Dispatcher
[![Build Status](https://travis-ci.org/meducation/loquor.png)](https://travis-ci.org/meducation/loquor)
[![Dependencies](https://gemnasium.com/meducation/loquor.png?travis)](https://gemnasium.com/meducation/loquor)
[![Code Climate](https://codeclimate.com/github/meducation/loquor.png)](https://codeclimate.com/github/meducation/loquor)
@@ -8,21 +8,19 @@
## Installation
Add this line to your application's Gemfile:
- gem 'loquor'
+```ruby
+gem 'loquor'
+```
And then execute:
$ bundle
-Or install it yourself as:
- $ gem install loquor
-
-
## Usage
You will want to set up some configuration variables.
``` ruby
Loquor.config do |config|
@@ -30,19 +28,19 @@
config.secret_key = "SecretKey1929292"
config.endpoint = "http://www.meducation.net"
end
```
-Now you make requests to get, create, update, destroy and list a range of objects, like this:
+Now you can make requests to get, create, update, destroy and list a range of objects, like this:
```ruby
-User.where(email: "jeremy@meducation.net").where(name: "Jeremy").each do |user|
+Loquor::User.where(email: "jeremy@meducation.net").where(name: "Jeremy").each do |user|
p "The user with id ##{user['id']} is #{user['name']}."
end
-User.find(2) # => {id: 2, name: "Jeremy Walker"}
+Loquor::User.find(2) # => {id: 2, name: "Jeremy Walker"}
-User.create(name: "Jeremy Walker", email: "jeremy@meducation.net") # => {id: 2, name: "Jeremy Walker", email "jeremy@meducation.net"}
+Loquor::User.create(name: "Jeremy Walker", email: "jeremy@meducation.net") # => {id: 2, name: "Jeremy Walker", email "jeremy@meducation.net"}
```
### Supported Objects
The following are currently endpoints are supported: