postman_mta 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/postman_mta/attachments_controller.rb +13 -0
- data/app/controllers/postman_mta/conversations_controller.rb +4 -0
- data/app/models/postman_mta/attachment.rb +13 -0
- data/app/models/postman_mta/conversation.rb +5 -1
- data/config/routes.rb +4 -1
- data/lib/postman_mta/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9938693c472befa38327970aaf030b2e9503c3ce
|
4
|
+
data.tar.gz: 348e6ddb3215d6729219d91e690cf2b3c47bc53e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fba7a9a4fb3a8e42d2ba379b5b525591ab0834196cdb7678e5b7b650041815cd6acffb2317c68bab77d572687674c62a5f3e508aaa6e8538f37b18f45a035627
|
7
|
+
data.tar.gz: 38bbdf1a06e0a7384aaabfdb6caa068debb7971d08aa06aafb3505c0570f14e4b1d1b62e3f448aac0b1d331fff406a33f82f3e7d67a9e9ace7086200383cb9aa
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module PostmanMta
|
2
|
+
class Attachment < ApplicationModel
|
3
|
+
attr_reader :message_token
|
4
|
+
|
5
|
+
def initialize(message_token)
|
6
|
+
@message_token = message_token
|
7
|
+
end
|
8
|
+
|
9
|
+
def find(uuid)
|
10
|
+
get("/api/v1/messages/#{message_token}/attachments/#{uuid}")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -21,7 +21,11 @@ module PostmanMta
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def mark_as_read(params = {})
|
24
|
-
patch('/api/v1/conversations/
|
24
|
+
patch('/api/v1/conversations/mark', body: params.merge(event: 'mark_as_read'))
|
25
|
+
end
|
26
|
+
|
27
|
+
def mark_as_unread(params = {})
|
28
|
+
patch('/api/v1/conversations/mark', body: params.merge(event: 'mark_as_unread'))
|
25
29
|
end
|
26
30
|
|
27
31
|
def move(params = {})
|
data/config/routes.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
PostmanMta::Engine.routes.draw do
|
2
|
-
resources :messages, only: [:show, :create], param: :token
|
2
|
+
resources :messages, only: [:show, :create], param: :token do
|
3
|
+
resources :attachments, only: :show, param: :uuid
|
4
|
+
end
|
3
5
|
|
4
6
|
resources :conversations, only: [:index, :show, :destroy] do
|
5
7
|
[:inbox, :sent, :spam, :trash].each do |folder|
|
@@ -8,6 +10,7 @@ PostmanMta::Engine.routes.draw do
|
|
8
10
|
|
9
11
|
match :starred, on: :collection, via: :get, to: 'conversations#index'
|
10
12
|
match :read, on: :collection, via: [:put, :patch]
|
13
|
+
match :unread, on: :collection, via: [:put, :patch]
|
11
14
|
match :move, on: :collection, via: [:put, :patch]
|
12
15
|
|
13
16
|
resources :labels, only: [:create, :destroy]
|
data/lib/postman_mta/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postman_mta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Malinovskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- README.md
|
120
120
|
- Rakefile
|
121
121
|
- app/controllers/postman_mta/application_controller.rb
|
122
|
+
- app/controllers/postman_mta/attachments_controller.rb
|
122
123
|
- app/controllers/postman_mta/conversations_controller.rb
|
123
124
|
- app/controllers/postman_mta/labels_controller.rb
|
124
125
|
- app/controllers/postman_mta/messages_controller.rb
|
@@ -126,6 +127,7 @@ files:
|
|
126
127
|
- app/controllers/postman_mta/stats/messages_controller.rb
|
127
128
|
- app/controllers/postman_mta/tags_controller.rb
|
128
129
|
- app/models/postman_mta/application_model.rb
|
130
|
+
- app/models/postman_mta/attachment.rb
|
129
131
|
- app/models/postman_mta/conversation.rb
|
130
132
|
- app/models/postman_mta/label.rb
|
131
133
|
- app/models/postman_mta/message.rb
|