README.md in freefeed-client-0.1.0 vs README.md in freefeed-client-1.1.0
- old
+ new
@@ -1,10 +1,10 @@
# freefeed-client
Ruby wrapper for [Freefeed API](https://fetsh.github.io/freefeed-api).
-[![Gem Version](https://badge.fury.io/rb/feefeed-client.svg)](http://badge.fury.io/rb/freefeed-client)
+[![Gem Version](https://badge.fury.io/rb/freefeed-client.svg)](https://badge.fury.io/rb/freefeed-client)
## Installation
Add following line to your Gemfile:
@@ -42,16 +42,14 @@
feeds: ['yourusername']
}
}
)
-post_resource = Freefeed::Post.new(client: client)
-
-post_resource.create(post)
+Freefeed::Post.create(client, post)
```
-You can skip instantiating resource, but I'm not sure if this is a good practice:
+You can achive the same result without addressing `Freefeed::Post` class directly:
```ruby
require 'freefeed'
client = Freefeed::Client.new('yourFreefeedAPIToken')
@@ -65,26 +63,26 @@
feeds: ['yourusername']
}
}
)
-client.posts.create(post)
+client.posts_create(post)
```
-You can even skip instantiating post type, but you will lose some validation:
+You can even skip instantiating `PostCreate` type, but you will lose some validation:
```ruby
require 'freefeed'
client = Freefeed::Client.new('yourFreefeedAPIToken')
-client.posts.create({post: {body: 'Hello World!'}, meta: {feeds: ['yourusername']}})
+client.posts_create({post: {body: 'Hello World!'}, meta: {feeds: ['yourusername']}})
```
## Logging
-By default, `freefeed-client` logs everything to STDOUT. You can change this behavior and provide your own logger class with someo ptions. See example below:
+By default, `freefeed-client` logs everything to STDOUT. You can change this behavior and provide your own logger class with some options. See example below:
```ruby
client = Freefeed::Client.new(
'yourFreefeedAPIToken',
logger: Logger.new('log.txt'),