mondo 0.2.0 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0eadcfb7260e06e44c4838adf6d68466d28f3fe
4
- data.tar.gz: 5082e8edfd785314ce5fa6d48780a0791804cccc
3
+ metadata.gz: c71119ea0e7317e34acc4ad8706fbedd08042e78
4
+ data.tar.gz: 144a39673e41b1a17904210b24af879069d8aef8
5
5
  SHA512:
6
- metadata.gz: 02bc42ce75e5091103eb61be994bf3f01e6f81873a269b69b2f75c8b1c673d98f740e6f09db596e7bb36798f1faf4c2340744a98390c3987967b2305a5abf2f2
7
- data.tar.gz: 6e852e2fb918493528192a72838e6fddc65566bda7b0e19111ff763d65bed9178ca82cc4cac088accfd3593408a92bce6c75dd8c5b27df1374a2f2dc8e827d94
6
+ metadata.gz: 5f1ed37b2026761c907f6609e367cb0cce8647780410abd8f058682aa52998a05c17ff2c977f0e54e7afeea88a578104e1f860df396931fbe2dc46ae62b5fa13
7
+ data.tar.gz: 9f27014ed8548da91e46cc25038079e0d5dfa33067c3a34d8c95b184ca2194813479c67764ac531a911035ff2e8533d85d41a2711b38015633411edc8900ef91
@@ -0,0 +1,26 @@
1
+ module Mondo
2
+ class FeedItem < Resource
3
+
4
+ attr_accessor :title,
5
+ :image_url,
6
+ :background_color,
7
+ :body
8
+
9
+
10
+ # temporary fix until the API accepts data in the request body
11
+ def save
12
+ self.client.request(:post, "/feed", params: self.create_params)
13
+ end
14
+
15
+ def create_params
16
+ {
17
+ account_id: self.client.account_id,
18
+ type: "image",
19
+ title: self.title,
20
+ image_url: self.image_url,
21
+ background_color: self.background_color,
22
+ body: self.body,
23
+ }
24
+ end
25
+ end
26
+ end
data/lib/mondo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mondo
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
data/lib/mondo.rb CHANGED
@@ -1,12 +1,14 @@
1
1
  module Mondo
2
- require './lib/mondo/version'
3
- require './lib/mondo/client'
4
- require './lib/mondo/response'
5
- require './lib/mondo/resource'
6
- require './lib/mondo/errors'
7
- require './lib/mondo/utils'
2
+
3
+ require 'mondo/client'
4
+ require 'mondo/version'
8
5
 
9
- require './lib/mondo/transaction'
10
- require './lib/mondo/feed_item'
6
+ require 'mondo/response'
7
+ require 'mondo/resource'
8
+ require 'mondo/errors'
9
+ require 'mondo/utils'
10
+
11
+ require 'mondo/transaction'
12
+ require 'mondo/feed_item'
11
13
 
12
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mondo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Blomfield
@@ -113,6 +113,7 @@ files:
113
113
  - lib/mondo.rb
114
114
  - lib/mondo/client.rb
115
115
  - lib/mondo/errors.rb
116
+ - lib/mondo/feed_item.rb
116
117
  - lib/mondo/resource.rb
117
118
  - lib/mondo/response.rb
118
119
  - lib/mondo/transaction.rb