fb-messenger 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/fb-messenger.gemspec +29 -0
- data/lib/fb/messenger.rb +30 -0
- data/lib/fb/messenger/client.rb +44 -0
- data/lib/fb/messenger/configuration.rb +8 -0
- data/lib/fb/messenger/events/base.rb +24 -0
- data/lib/fb/messenger/events/delivery.rb +20 -0
- data/lib/fb/messenger/events/message.rb +19 -0
- data/lib/fb/messenger/events/postback.rb +12 -0
- data/lib/fb/messenger/receiver.rb +47 -0
- data/lib/fb/messenger/subscribers/base.rb +12 -0
- data/lib/fb/messenger/templates/button.rb +23 -0
- data/lib/fb/messenger/templates/generic.rb +26 -0
- data/lib/fb/messenger/templates/generic_item.rb +25 -0
- data/lib/fb/messenger/templates/receipt.rb +44 -0
- data/lib/fb/messenger/templates/receipt_item.rb +30 -0
- data/lib/fb/messenger/version.rb +5 -0
- metadata +153 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ef3e88424f5141101e430387f7ba07a9a25e018e
|
4
|
+
data.tar.gz: 210408a593972d4885fc7eccf1192a6c1e471408
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 639d872286b914e593480788730d67e730d21d01f498878da9378b10717a9502b4c4c1a0bd5d959ffd49b1b20b41fe0b63b0fdd176138714aa009bfbf3ac219e
|
7
|
+
data.tar.gz: 0279a3ba2119cb0a219e325316683fbc96a361489b9ecbfc19efc4e2155a74e3fd3411077ab50eb285c54955e4593b21e5c2c14fed31a87dff3495c73a590ce9
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 ccleung
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Fb::Messenger
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fb/messenger`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'fb-messenger'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install fb-messenger
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fb-messenger.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "fb/messenger"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'fb/messenger/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "fb-messenger"
|
8
|
+
spec.version = Fb::Messenger::VERSION
|
9
|
+
spec.authors = ["ccleung"]
|
10
|
+
spec.email = ["clemsquared@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Send and receive Fb messenger messages.}
|
13
|
+
spec.description = %q{Send and receive Fb messenger messages.}
|
14
|
+
spec.homepage = "https://github.com/ccleung/fb-messenger"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "rest-client", "~> 1.8"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency "factory_girl", "~> 4.7"
|
28
|
+
spec.add_development_dependency "webmock", "~> 2.1"
|
29
|
+
end
|
data/lib/fb/messenger.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rest-client'
|
2
|
+
|
3
|
+
require 'fb/messenger/version'
|
4
|
+
require 'fb/messenger/configuration'
|
5
|
+
require 'fb/messenger/client'
|
6
|
+
require 'fb/messenger/templates/button'
|
7
|
+
require 'fb/messenger/templates/generic'
|
8
|
+
require 'fb/messenger/templates/generic_item'
|
9
|
+
require 'fb/messenger/templates/receipt'
|
10
|
+
require 'fb/messenger/templates/receipt_item'
|
11
|
+
require 'fb/messenger/events/base'
|
12
|
+
require 'fb/messenger/events/message'
|
13
|
+
require 'fb/messenger/events/postback'
|
14
|
+
require 'fb/messenger/events/delivery'
|
15
|
+
require 'fb/messenger/subscribers/base'
|
16
|
+
require 'fb/messenger/receiver'
|
17
|
+
|
18
|
+
module Fb
|
19
|
+
module Messenger
|
20
|
+
class << self
|
21
|
+
def configure
|
22
|
+
yield config
|
23
|
+
end
|
24
|
+
|
25
|
+
def config
|
26
|
+
@config ||= Fb::Messenger::Configuration.new
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
BASE_URL = 'https://graph.facebook.com/v2.6'.freeze
|
4
|
+
|
5
|
+
# fb rest client
|
6
|
+
class Client
|
7
|
+
class << self
|
8
|
+
def send(payload)
|
9
|
+
RestClient.post("#{BASE_URL}/me/messages?access_token=#{Fb::Messenger.config.access_token}",
|
10
|
+
payload.to_json, content_type: :json, accept: :json)
|
11
|
+
end
|
12
|
+
|
13
|
+
def user_info(user_id)
|
14
|
+
r = RestClient.get("#{BASE_URL}/#{user_id}",
|
15
|
+
params: { access_token: Fb::Messenger.config.access_token },
|
16
|
+
accept: :json)
|
17
|
+
JSON.parse(r)
|
18
|
+
end
|
19
|
+
|
20
|
+
def send_message_template(recipient, template)
|
21
|
+
payload = {
|
22
|
+
recipient: {
|
23
|
+
id: recipient
|
24
|
+
},
|
25
|
+
message: template
|
26
|
+
}
|
27
|
+
send(payload)
|
28
|
+
end
|
29
|
+
|
30
|
+
def send_message_text(recipient, text)
|
31
|
+
payload = {
|
32
|
+
recipient: {
|
33
|
+
id: recipient
|
34
|
+
},
|
35
|
+
message: {
|
36
|
+
text: text
|
37
|
+
}
|
38
|
+
}
|
39
|
+
send(payload)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
module Event
|
4
|
+
# base event
|
5
|
+
class Base
|
6
|
+
def initialize(event_data)
|
7
|
+
@event_data = event_data
|
8
|
+
end
|
9
|
+
|
10
|
+
def timestamp
|
11
|
+
@event_data[:timestamp]
|
12
|
+
end
|
13
|
+
|
14
|
+
def sender_id
|
15
|
+
@event_data[:sender][:id]
|
16
|
+
end
|
17
|
+
|
18
|
+
def recipient_id
|
19
|
+
@event_data[:recipient][:id]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
module Event
|
4
|
+
# Delivery event
|
5
|
+
class Delivery < Base
|
6
|
+
def watermark
|
7
|
+
@event_data[:delivery][:watermark]
|
8
|
+
end
|
9
|
+
|
10
|
+
def mids
|
11
|
+
@event_data[:delivery][:mids]
|
12
|
+
end
|
13
|
+
|
14
|
+
def seq
|
15
|
+
@event_data[:delivery][:seq]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
module Event
|
4
|
+
class Message < Base
|
5
|
+
def text
|
6
|
+
@event_data[:message][:text]
|
7
|
+
end
|
8
|
+
|
9
|
+
def mid
|
10
|
+
@event_data[:message][:mid]
|
11
|
+
end
|
12
|
+
|
13
|
+
def seq
|
14
|
+
@event_data[:message][:seq]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
# handles the incoming fb webhook data
|
4
|
+
class Receiver
|
5
|
+
class << self
|
6
|
+
# expecting params[:entry]
|
7
|
+
def receive(entries, opts = {})
|
8
|
+
entries.each do |entry|
|
9
|
+
entry[:messaging].each do |msg_event|
|
10
|
+
event_type = event_type(msg_event)
|
11
|
+
unless event_type
|
12
|
+
handle_unsupported_event(msg_event)
|
13
|
+
next
|
14
|
+
end
|
15
|
+
event_class = event_type.classify
|
16
|
+
event = "Fb::Messenger::Event::#{event_class}".constantize.new(msg_event)
|
17
|
+
config[event_type].call(event, opts)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def configure
|
23
|
+
yield self
|
24
|
+
end
|
25
|
+
|
26
|
+
def subscribe(event, subscriber)
|
27
|
+
config[event] = subscriber
|
28
|
+
end
|
29
|
+
|
30
|
+
def config
|
31
|
+
@_config ||= {}
|
32
|
+
end
|
33
|
+
|
34
|
+
def event_type(msg_event)
|
35
|
+
return 'message' if msg_event[:message]
|
36
|
+
return 'postback' if msg_event[:postback]
|
37
|
+
return 'delivery' if msg_event[:delivery]
|
38
|
+
end
|
39
|
+
|
40
|
+
# TODO: log this error better
|
41
|
+
def handle_unsupported_event(msg_event)
|
42
|
+
puts ">>> unsupported event: #{msg_event}"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
module Template
|
4
|
+
class Button
|
5
|
+
attr_accessor :type, :title, :payload
|
6
|
+
|
7
|
+
def initialize(opts = {})
|
8
|
+
@type = opts[:type]
|
9
|
+
@title = opts[:title]
|
10
|
+
@payload = opts[:payload]
|
11
|
+
end
|
12
|
+
|
13
|
+
def template
|
14
|
+
{
|
15
|
+
type: type,
|
16
|
+
title: title,
|
17
|
+
payload: payload
|
18
|
+
}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
module Template
|
4
|
+
# generic template
|
5
|
+
class Generic
|
6
|
+
attr_accessor :generic_items
|
7
|
+
|
8
|
+
def initialize(opts = {})
|
9
|
+
@generic_items = opts[:generic_items] || []
|
10
|
+
end
|
11
|
+
|
12
|
+
def template
|
13
|
+
{
|
14
|
+
attachment: {
|
15
|
+
type: 'template',
|
16
|
+
payload: {
|
17
|
+
template_type: 'generic',
|
18
|
+
elements: generic_items.map(&:template)
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
module Template
|
4
|
+
class GenericItem
|
5
|
+
attr_accessor :title, :subtitle, :image_url, :buttons
|
6
|
+
|
7
|
+
def initialize(opts = {})
|
8
|
+
@title = opts[:title]
|
9
|
+
@subtitle = opts[:subtitle]
|
10
|
+
@image_url = opts[:image_url]
|
11
|
+
@buttons = opts[:buttons] || []
|
12
|
+
end
|
13
|
+
|
14
|
+
def template
|
15
|
+
{
|
16
|
+
title: title,
|
17
|
+
subtitle: subtitle,
|
18
|
+
image_url: image_url,
|
19
|
+
buttons: buttons.map(&:template)
|
20
|
+
}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
module Template
|
4
|
+
class Receipt
|
5
|
+
attr_accessor :recipient_name, :order_number, :currency
|
6
|
+
attr_accessor :payment_method, :order_url, :timestamp
|
7
|
+
attr_accessor :total_cost, :receipt_items
|
8
|
+
|
9
|
+
def initialize(opts = {})
|
10
|
+
@recipient_name = opts[:recipient_name]
|
11
|
+
@order_number = opts[:order_number]
|
12
|
+
@currency = opts[:currency]
|
13
|
+
# payment_method field cannot be nil
|
14
|
+
@payment_method = opts[:payment_method] || 'N/A'
|
15
|
+
@order_url = opts[:order_url]
|
16
|
+
@timestamp = opts[:timestamp]
|
17
|
+
@total_cost = opts[:total_cost]
|
18
|
+
@receipt_items = opts[:receipt_items] || []
|
19
|
+
end
|
20
|
+
|
21
|
+
def template
|
22
|
+
{
|
23
|
+
attachment: {
|
24
|
+
type: 'template',
|
25
|
+
payload: {
|
26
|
+
template_type: 'receipt',
|
27
|
+
recipient_name: recipient_name,
|
28
|
+
order_number: order_number,
|
29
|
+
currency: currency,
|
30
|
+
payment_method: payment_method, # required field
|
31
|
+
order_url: order_url,
|
32
|
+
timestamp: timestamp,
|
33
|
+
elements: receipt_items.map(&:template),
|
34
|
+
summary: {
|
35
|
+
total_cost: total_cost
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fb
|
2
|
+
module Messenger
|
3
|
+
module Template
|
4
|
+
class ReceiptItem
|
5
|
+
attr_accessor :title, :subtitle, :quantity
|
6
|
+
attr_accessor :price, :currency, :image_url
|
7
|
+
|
8
|
+
def initialize(opts = {})
|
9
|
+
@title = opts[:title]
|
10
|
+
@subtitle = opts[:subtitle]
|
11
|
+
@quantity = opts[:quantity]
|
12
|
+
@price = opts[:price]
|
13
|
+
@currency = opts[:currency]
|
14
|
+
@image_url = opts[:image_url]
|
15
|
+
end
|
16
|
+
|
17
|
+
def template
|
18
|
+
{
|
19
|
+
title: title,
|
20
|
+
subtitle: subtitle,
|
21
|
+
quantity: quantity,
|
22
|
+
price: price,
|
23
|
+
currency: currency,
|
24
|
+
image_url: image_url
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fb-messenger
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ccleung
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rest-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.8'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.12'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: factory_girl
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.7'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.7'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: webmock
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '2.1'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.1'
|
97
|
+
description: Send and receive Fb messenger messages.
|
98
|
+
email:
|
99
|
+
- clemsquared@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".travis.yml"
|
107
|
+
- Gemfile
|
108
|
+
- LICENSE.txt
|
109
|
+
- README.md
|
110
|
+
- Rakefile
|
111
|
+
- bin/console
|
112
|
+
- bin/setup
|
113
|
+
- fb-messenger.gemspec
|
114
|
+
- lib/fb/messenger.rb
|
115
|
+
- lib/fb/messenger/client.rb
|
116
|
+
- lib/fb/messenger/configuration.rb
|
117
|
+
- lib/fb/messenger/events/base.rb
|
118
|
+
- lib/fb/messenger/events/delivery.rb
|
119
|
+
- lib/fb/messenger/events/message.rb
|
120
|
+
- lib/fb/messenger/events/postback.rb
|
121
|
+
- lib/fb/messenger/receiver.rb
|
122
|
+
- lib/fb/messenger/subscribers/base.rb
|
123
|
+
- lib/fb/messenger/templates/button.rb
|
124
|
+
- lib/fb/messenger/templates/generic.rb
|
125
|
+
- lib/fb/messenger/templates/generic_item.rb
|
126
|
+
- lib/fb/messenger/templates/receipt.rb
|
127
|
+
- lib/fb/messenger/templates/receipt_item.rb
|
128
|
+
- lib/fb/messenger/version.rb
|
129
|
+
homepage: https://github.com/ccleung/fb-messenger
|
130
|
+
licenses:
|
131
|
+
- MIT
|
132
|
+
metadata: {}
|
133
|
+
post_install_message:
|
134
|
+
rdoc_options: []
|
135
|
+
require_paths:
|
136
|
+
- lib
|
137
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
requirements: []
|
148
|
+
rubyforge_project:
|
149
|
+
rubygems_version: 2.4.5.1
|
150
|
+
signing_key:
|
151
|
+
specification_version: 4
|
152
|
+
summary: Send and receive Fb messenger messages.
|
153
|
+
test_files: []
|