ritetag_analysis 1.0.1
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/lib/ritetag_analysis.rb +44 -0
- metadata +46 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 674fadb0a6d8faf1d4bb9cf1332de121b4e297b9
|
4
|
+
data.tar.gz: 6e43e2fedae76634198d29963c2a063f01d5cd1f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e84f68b7d3c6e8f9549ebf8b91d36fd9ad554fa5d27a477764dfe787c235b502ac5dc906beb6d1480c943266f67198943d677dff4ce2df37e3e85eefd0bbb8f8
|
7
|
+
data.tar.gz: abb5027d38d6de7a6d55ffda7490d99bc3c9c8cd05b9b3ee7c4e7b7c85c563de16343a0e318811428de26d86730456d4215c045831a07ce783abf162e98c024d
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'oauth'
|
2
|
+
require 'json'
|
3
|
+
require 'rest_client'
|
4
|
+
|
5
|
+
class RiteTag_Analysis
|
6
|
+
|
7
|
+
def initialize(auth)
|
8
|
+
@auth = auth
|
9
|
+
@consumer=OAuth::Consumer.new @auth['consumer_key'], @auth['consumer_secret'], {:site=>"http://ritetag.com/api/v2"}
|
10
|
+
|
11
|
+
@access_token = OAuth::AccessToken.new(@consumer, @auth['token'], @auth['token_secret'])
|
12
|
+
end
|
13
|
+
|
14
|
+
def statistics(query)
|
15
|
+
response = RestClient.get 'https://ritetag.com/api/v2.2/data/stats/#{query}'
|
16
|
+
response_json = JSON.pase(respone)
|
17
|
+
puts response_json["stats"]
|
18
|
+
end
|
19
|
+
|
20
|
+
def formatted_stat(hashtag, parameter = "associatedHashtags", term = 1, section = "tags")
|
21
|
+
response = RestClient.get 'https://ritetag.com/api/v2.2/data/stats/#{hashtag}'
|
22
|
+
response_json = JSON.pase(respone)
|
23
|
+
puts response_json["associatedHashtags"][1]["tags"]
|
24
|
+
end
|
25
|
+
|
26
|
+
def trending(query1 = 'green', query2)
|
27
|
+
response = RestClient.get 'https://ritetag.com/api/v2.2/data/trending/?#{query1}=0&#{query2}=0'
|
28
|
+
response_json = JSON.pase(respone)
|
29
|
+
puts response_json
|
30
|
+
end
|
31
|
+
|
32
|
+
def influencers(query)
|
33
|
+
response = RestClient.get 'https://ritetag.com/api/v2.2/influencers/#{query}'
|
34
|
+
response_json = JSON.pase(respone)
|
35
|
+
puts response_json
|
36
|
+
end
|
37
|
+
|
38
|
+
def history(query)
|
39
|
+
response = RestClient.get 'https://ritetag.com/api/v2.2/history/#{query}'
|
40
|
+
response_json = JSON.pase(respone)
|
41
|
+
puts response_json
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ritetag_analysis
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Aditya Chatterjee
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A gem for hashtag analysis for social media optimization
|
14
|
+
email: aditianhacker@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/ritetag_analysis.rb
|
20
|
+
homepage: http://rubygems.org/gems/ritetag_analysis
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.2.3
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: The ritetag_analysis gem provides the ruby interface required for extensive
|
44
|
+
hashtag analysis for effective social media optimization. It is based upon the ritetag
|
45
|
+
API.
|
46
|
+
test_files: []
|