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 +4 -4
- data/lib/mondo/feed_item.rb +26 -0
- data/lib/mondo/version.rb +1 -1
- data/lib/mondo.rb +10 -8
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c71119ea0e7317e34acc4ad8706fbedd08042e78
|
4
|
+
data.tar.gz: 144a39673e41b1a17904210b24af879069d8aef8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/mondo.rb
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
module Mondo
|
2
|
-
|
3
|
-
require '
|
4
|
-
require '
|
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 '
|
10
|
-
require '
|
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.
|
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
|