From c322d74fcd018ae35bb56d60a7b7e7b0b638bfc3 Mon Sep 17 00:00:00 2001 From: scicco Date: Wed, 24 Jun 2020 12:19:58 +0200 Subject: [PATCH 1/2] moving POST /messages under page for SendAPI support --- VERSION | 2 +- lib/fb_graph2/edge/messages.rb | 5 ----- lib/fb_graph2/edge/send_api.rb | 10 ++++++++++ lib/fb_graph2/page.rb | 1 + 4 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 lib/fb_graph2/edge/send_api.rb diff --git a/VERSION b/VERSION index 8cfbc90..8428158 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.1 \ No newline at end of file +1.1.2 \ No newline at end of file diff --git a/lib/fb_graph2/edge/messages.rb b/lib/fb_graph2/edge/messages.rb index 77de45a..fe0dc27 100644 --- a/lib/fb_graph2/edge/messages.rb +++ b/lib/fb_graph2/edge/messages.rb @@ -18,11 +18,6 @@ module FbGraph2 Message.new(message[:id], message).authenticate self.access_token end end - - def message!(params = {}) - message = self.post params, edge: :messages - Message.new(message[:id], params.merge(message)).authenticate self.access_token - end end end end diff --git a/lib/fb_graph2/edge/send_api.rb b/lib/fb_graph2/edge/send_api.rb new file mode 100644 index 0000000..9d7ccf6 --- /dev/null +++ b/lib/fb_graph2/edge/send_api.rb @@ -0,0 +1,10 @@ +module FbGraph2 + class Edge + module SendApi + def message!(params = {}) + message = self.post params, edge: :messages + Message.new(message[:message_id], params.merge(message)).authenticate self.access_token + end + end + end +end diff --git a/lib/fb_graph2/page.rb b/lib/fb_graph2/page.rb index 2685c5b..3160881 100644 --- a/lib/fb_graph2/page.rb +++ b/lib/fb_graph2/page.rb @@ -4,6 +4,7 @@ module FbGraph2 include Edge::Albums include Edge::Blocked include Edge::Conversations + include Edge::SendApi include Edge::Events include Edge::Feed include Edge::GlobalBrandChildren From fa78ae0907426932214ae84193743552244a3d93 Mon Sep 17 00:00:00 2001 From: scicco Date: Wed, 24 Jun 2020 12:48:52 +0200 Subject: [PATCH 2/2] travis ruby version bumped --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a742b12..a76835c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ before_install: - gem install bundler rvm: - - 2.2.2 # NOTE: 2.2.1 or lower aren't supported by activesupport 5.0, CI isn't needed for such legacy versions. - - 2.2.6 - 2.3.3 - - 2.4.0 \ No newline at end of file + - 2.4.0 + - 2.5.6 + - 2.6.4 \ No newline at end of file