twitty 0.1.1 → 0.1.2
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 +4 -4
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile.lock +1 -1
- data/lib/twitty/constants.rb +31 -1
- data/lib/twitty/payload.rb +16 -1
- data/lib/twitty/version.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94a8d618eb91b2e104f808cdb3b4a1bd32663f2b03f03317c5113de4f4a8639c
|
4
|
+
data.tar.gz: ea116a4b5eaee3fca8b968dac8ac5dc658602df2b049427a4e78aa870f5bb4cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c66cfe86a7100d07d318e09917327b5fb2e36478b577f768167afa86eb27e1672a55c4915ea546bc4850a88c115f01a985b4edade96fc42e8297d2d5e45aeded
|
7
|
+
data.tar.gz: bd8afc3e729fecd14527e07d8c56853df82d587278b7eb3203e43025b78fb51b551652d0aadf5e8529282298b0350482d99c46f99a553397c73a356acafefa26
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
55
55
|
## Enforcement
|
56
56
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at
|
58
|
+
reported by contacting the project team at hello@chatwoot.com. All
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
data/Gemfile.lock
CHANGED
data/lib/twitty/constants.rb
CHANGED
@@ -61,7 +61,37 @@ module Twitty
|
|
61
61
|
method: :post,
|
62
62
|
endpoint: '/oauth/access_token',
|
63
63
|
required_params: [:oauth_token, :oauth_verifier]
|
64
|
+
},
|
65
|
+
|
66
|
+
destroy_tweet: {
|
67
|
+
method: :post,
|
68
|
+
endpoint: '/1.1/statuses/destroy/%{tweet_id}.json',
|
69
|
+
required_params: [:tweet_id]
|
70
|
+
},
|
71
|
+
|
72
|
+
retweet: {
|
73
|
+
method: :post,
|
74
|
+
endpoint: '/1.1/statuses/retweet/%{tweet_id}.json',
|
75
|
+
required_params: [:tweet_id]
|
76
|
+
},
|
77
|
+
|
78
|
+
unretweet: {
|
79
|
+
method: :post,
|
80
|
+
endpoint: '/1.1/statuses/unretweet/%{tweet_id}.json',
|
81
|
+
required_params: [:tweet_id]
|
82
|
+
},
|
83
|
+
|
84
|
+
like_tweet: {
|
85
|
+
method: :post,
|
86
|
+
endpoint: '/1.1/favorites/create.json',
|
87
|
+
required_params: [:tweet_id]
|
88
|
+
},
|
89
|
+
|
90
|
+
unlike_tweet: {
|
91
|
+
method: :post,
|
92
|
+
endpoint: '/1.1/favorites/destroy.json',
|
93
|
+
required_params: [:tweet_id]
|
64
94
|
}
|
65
|
-
|
95
|
+
}.freeze
|
66
96
|
end
|
67
97
|
end
|
data/lib/twitty/payload.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Twitty
|
2
4
|
module Payload
|
3
|
-
EMPTY_PAYLOAD_ACTIONS = %w[fetch_webhooks register_webhook unregister_webhook fetch_subscriptions
|
5
|
+
EMPTY_PAYLOAD_ACTIONS = %w[fetch_webhooks register_webhook unregister_webhook fetch_subscriptions
|
6
|
+
create_subscription remove_subscription destroy_tweet retweet unretweet].freeze
|
4
7
|
|
5
8
|
EMPTY_PAYLOAD_ACTIONS.each do |action|
|
6
9
|
define_method "#{action.to_s}_payload" do
|
@@ -48,5 +51,17 @@ module Twitty
|
|
48
51
|
oauth_verifier: @payload[:oauth_verifier]
|
49
52
|
}
|
50
53
|
end
|
54
|
+
|
55
|
+
def like_tweet_payload
|
56
|
+
{
|
57
|
+
"id": @payload[:tweet_id]
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
def unlike_tweet_payload
|
62
|
+
{
|
63
|
+
"id": @payload[:tweet_id]
|
64
|
+
}
|
65
|
+
end
|
51
66
|
end
|
52
67
|
end
|
data/lib/twitty/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Subin T P
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
|
-
rubygems_version: 3.
|
128
|
+
rubygems_version: 3.2.3
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Twitter API wrapper
|