webceo 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 +15 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +54 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/webceo.rb +12 -0
- data/lib/webceo/api.rb +32 -0
- data/lib/webceo/api/client.rb +87 -0
- data/lib/webceo/api/error.rb +68 -0
- data/lib/webceo/api/request.rb +43 -0
- data/lib/webceo/api/response.rb +38 -0
- data/lib/webceo/api_methods.yml +17 -0
- data/lib/webceo/version.rb +17 -0
- data/webceo.gemspec +31 -0
- metadata +179 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2afe7cb5ced6fb5efa4b94628c9553372f512bd6
|
4
|
+
data.tar.gz: 77c587b23e92819c63feb35f4ad36752feffe890
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4a22917d19ca12c9c6e4e44e8ab418f3760143e1a9cf55759913eaa2bd04a8e1eba8a5e8f02e26757a527438a52b16edacb59ddaf1447cdd30d55595a19eb220
|
7
|
+
data.tar.gz: 7380d52ff2de4efb60c88fba54dac127c92c1338cf8ff73635ae669850b908bbaac681610cb5c9f55e738a91bf724c1191b59400f70e01cbdecabcdde671e17e
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at agnel@amuratech.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Agnel Waghela
|
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,54 @@
|
|
1
|
+
# Webceo
|
2
|
+
|
3
|
+
Integrate your ruby application with this `webceo` gem to perform the api action using your webceo account. Take a look at the [Webceo API Reference](https://www.webceo.com/api-documentation.htm).
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'webceo'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install webceo
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
# initialize an instance of the Client with your API key or
|
25
|
+
# set an Environment Variable WEBCEO_API_KEY and initialize client without passing it to the client
|
26
|
+
client = Webceo::Api::Client.new('your_api_key')
|
27
|
+
|
28
|
+
# get list of all the projects, see api reference
|
29
|
+
client.get_projects({ :id => 'my_request_id' })
|
30
|
+
# => [{:id=>'my_request_id', :data=>[{:project=>"8ady5y7e36", :domain=>"example.com", :user=>["user1@yoursite.com", "user2@yoursite.com", ... ]}, {:project=>"asg4563wef", :domain=>"example.com", :user=>["user3@yoursite.com", "user4@yoursite.com", ... ]}], :method=>"get_projects"}]
|
31
|
+
|
32
|
+
# get a single project
|
33
|
+
client.get_project({ :project => '8ady5y7e36' })
|
34
|
+
# => [{:id=>nil, :data=>{:project=>"8ady5y7e36", :domain=>"example.com", :user=>["user1@yoursite.com", "user2@yoursite.com", ... ]}, :method=>"get_projects"}]
|
35
|
+
|
36
|
+
```
|
37
|
+
|
38
|
+
## Contributing
|
39
|
+
|
40
|
+
[](https://www.codetriage.com/agnel/webceo)
|
41
|
+
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/agnel/webceo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
43
|
+
|
44
|
+
Check out the [Webceo Ruby Gem Google Group](https://groups.google.com/forum/#!forum/webceo-api-client/)
|
45
|
+
|
46
|
+
|
47
|
+
## License
|
48
|
+
|
49
|
+
Webceo is released under the [MIT License](http://opensource.org/licenses/MIT).
|
50
|
+
|
51
|
+
## Todo
|
52
|
+
|
53
|
+
- [ ] Batch Operations Support
|
54
|
+
- [ ] Specs
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "webceo"
|
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(__FILE__)
|
data/bin/setup
ADDED
data/lib/webceo.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'webceo/version'
|
2
|
+
|
3
|
+
require 'httparty'
|
4
|
+
require 'multi_json'
|
5
|
+
require 'active_support/core_ext/hash/indifferent_access'
|
6
|
+
require 'webceo/api'
|
7
|
+
require 'webceo/api/request'
|
8
|
+
require 'webceo/api/response'
|
9
|
+
require 'webceo/api/error'
|
10
|
+
require 'webceo/api/client'
|
11
|
+
|
12
|
+
module Webceo; end # end of module Webceo
|
data/lib/webceo/api.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module Webceo
|
2
|
+
|
3
|
+
API_METHODS = YAML.load_file('./lib/webceo/api_methods.yml')
|
4
|
+
|
5
|
+
#
|
6
|
+
# Module Api provides Constants and Classes for accessing the Webceo API
|
7
|
+
#
|
8
|
+
# @author Agnel Waghela <agnelwaghela@gmail.com>
|
9
|
+
#
|
10
|
+
module Api
|
11
|
+
|
12
|
+
#
|
13
|
+
# These are the response codes as mentioned on the API Reference
|
14
|
+
#
|
15
|
+
# 0 Request successfully processed
|
16
|
+
# 1 Bad request
|
17
|
+
# 4 Not found
|
18
|
+
# 5 Bad arguments
|
19
|
+
# 6 Access denied
|
20
|
+
# 10 Unknown command (method)
|
21
|
+
# 11 Scanning
|
22
|
+
# 12 Not configured
|
23
|
+
# 15 Email address has already been used to create a user account.
|
24
|
+
# 100 Site not available
|
25
|
+
# 403 Forbidden
|
26
|
+
# 500 Server Error (contact support if you get this response code)
|
27
|
+
#
|
28
|
+
# @see https://online.webceo.com/help-center/api-site/response-codes.html
|
29
|
+
#
|
30
|
+
RESPONSE_CODES = [0, 1, 4, 5, 6, 10, 11, 12, 15, 100, 403, 500]
|
31
|
+
end # end of module Api
|
32
|
+
end # end of module Webceo
|
@@ -0,0 +1,87 @@
|
|
1
|
+
module Webceo
|
2
|
+
module Api
|
3
|
+
#
|
4
|
+
# Class Client provides methods to make api requests and handle exceptions
|
5
|
+
#
|
6
|
+
# @author Agnel Waghela <agnelwaghela@gmail.com>
|
7
|
+
#
|
8
|
+
class Client
|
9
|
+
include HTTParty
|
10
|
+
base_uri 'https://online.webceo.com/api/'
|
11
|
+
format :json
|
12
|
+
headers 'Content-Type' => 'application/json'
|
13
|
+
|
14
|
+
#
|
15
|
+
# Intializes an instance of Client to make api calls
|
16
|
+
#
|
17
|
+
# It accepts an api_key or uses the one set in the environment variable WEBCEO_API_KEY
|
18
|
+
#
|
19
|
+
# @param [String] api_key Webceo API Key
|
20
|
+
#
|
21
|
+
def initialize(api_key = nil)
|
22
|
+
self.class.default_options.merge!({ api_key: (api_key || ENV['WEBCEO_API_KEY']) })
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# It lists names of all the available API methods on the Webceo API Reference
|
27
|
+
#
|
28
|
+
# @see https://online.webceo.com/help-center/api-site/seo-api-reference.html
|
29
|
+
#
|
30
|
+
# @return [Array<String>] List of API Methods
|
31
|
+
#
|
32
|
+
def list_methods
|
33
|
+
API_METHODS.values.flatten
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# This method validates if the method invoked is a valid API Method else raises Error
|
38
|
+
# For a valid API Method it builds the request, makes the api call and parses the
|
39
|
+
# response and check for any errors in response returned
|
40
|
+
#
|
41
|
+
# @param [String] method_name Name of the api method invoke
|
42
|
+
# @param [Hash] data Any arguments required to sent along with the method
|
43
|
+
#
|
44
|
+
# @return [Array<Hash>] Array of Response hashes for the request made
|
45
|
+
#
|
46
|
+
def method_missing(method_name, data = {})
|
47
|
+
if list_methods.include? method_name.to_s
|
48
|
+
request = Webceo::Api::Request.new method_name, data
|
49
|
+
response = make_request(request)
|
50
|
+
response.check_for_errors
|
51
|
+
|
52
|
+
begin
|
53
|
+
::MultiJson.load(response.body, :symbolize_keys => true)
|
54
|
+
rescue ::MultiJson::ParseError => e
|
55
|
+
e.cause
|
56
|
+
end
|
57
|
+
else
|
58
|
+
raise Webceo::Api::ClientError.new(400, nil, {"errormsg" => "Unknown command","method" => method_name.to_s,"result" => 10})
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# This method makes the actual hit to the Webceo API Server and returns the response
|
64
|
+
# wrapped with our Response class.
|
65
|
+
#
|
66
|
+
# It also raises any errors occurred when making the request
|
67
|
+
#
|
68
|
+
# @param [Webceo::Api::Request] request Api Request Object
|
69
|
+
#
|
70
|
+
# @return [Webceo::Api::Response] Api Response from server wrapped with our Response class
|
71
|
+
#
|
72
|
+
def make_request(request)
|
73
|
+
result = self.class.post('/', body: request.to_json)
|
74
|
+
|
75
|
+
if result.code >= 500
|
76
|
+
raise Webceo::Api::ServerError.new(result.code, result.body)
|
77
|
+
end
|
78
|
+
|
79
|
+
if result.code >= 400
|
80
|
+
raise Webceo::Api::ClientError.new(result.code, result.body)
|
81
|
+
end
|
82
|
+
|
83
|
+
Webceo::Api::Response.new(result.code, result.body, result.headers, result.message)
|
84
|
+
end
|
85
|
+
end # end of class Client
|
86
|
+
end # end of module Api
|
87
|
+
end # end of module Webceo
|
@@ -0,0 +1,68 @@
|
|
1
|
+
module Webceo
|
2
|
+
module Api
|
3
|
+
#
|
4
|
+
# Class Error provides customized error message based on the response sent by
|
5
|
+
# Webceo API server
|
6
|
+
#
|
7
|
+
# @author Agnel Waghela <agnelwaghela@gmail.com>
|
8
|
+
#
|
9
|
+
class Error < StandardError
|
10
|
+
attr_accessor :http_status, :response_body, :code, :message, :api_method, :request_id
|
11
|
+
def initialize(http_status, response_body, error_info = nil)
|
12
|
+
if response_body
|
13
|
+
self.response_body = response_body.strip
|
14
|
+
else
|
15
|
+
self.response_body = ''
|
16
|
+
end
|
17
|
+
self.http_status = http_status
|
18
|
+
|
19
|
+
if error_info && error_info.is_a?(String)
|
20
|
+
message = error_info
|
21
|
+
else
|
22
|
+
unless error_info
|
23
|
+
begin
|
24
|
+
error_info = MultiJson.load(response_body).first if response_body
|
25
|
+
rescue
|
26
|
+
end
|
27
|
+
error_info ||= {}
|
28
|
+
end
|
29
|
+
|
30
|
+
error_info = error_info.with_indifferent_access
|
31
|
+
|
32
|
+
self.code = error_info['result']
|
33
|
+
self.message = error_info['errormsg']
|
34
|
+
self.api_method = error_info['method']
|
35
|
+
self.request_id = error_info['id']
|
36
|
+
|
37
|
+
error_array = []
|
38
|
+
%i(code message api_method request_id).each do |key|
|
39
|
+
error_array << "#{key}: #{self.send(key)}" if self.send(key)
|
40
|
+
end
|
41
|
+
|
42
|
+
if error_array.empty?
|
43
|
+
message = self.response_body
|
44
|
+
else
|
45
|
+
message = error_array.join(', ')
|
46
|
+
end
|
47
|
+
end
|
48
|
+
message += " [HTTP #{http_status}]" if http_status
|
49
|
+
|
50
|
+
super(message)
|
51
|
+
end
|
52
|
+
end # end of class Error
|
53
|
+
|
54
|
+
#
|
55
|
+
# Class ServerError provides indication to user that its a server error
|
56
|
+
#
|
57
|
+
# @author Agnel Waghela <agnelwaghela@gmail.com>
|
58
|
+
#
|
59
|
+
class ServerError < Error; end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Class ClientError provides indication to user that its a client error
|
63
|
+
#
|
64
|
+
# @author Agnel Waghela <agnelwaghela@gmail.com>
|
65
|
+
#
|
66
|
+
class ClientError < Error; end
|
67
|
+
end # end of module Api
|
68
|
+
end # end of module Webceo
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Webceo
|
2
|
+
module Api
|
3
|
+
#
|
4
|
+
# Class Request provides wrapper for the request parameters for the api call to be made
|
5
|
+
# It also provides a to_json method to build the JSON format request to be sent as
|
6
|
+
# the body for the API call
|
7
|
+
#
|
8
|
+
# @author Agnel Waghela <agnelwaghela@gmail.com>
|
9
|
+
#
|
10
|
+
class Request
|
11
|
+
attr_accessor :method_name, :data
|
12
|
+
|
13
|
+
#
|
14
|
+
# Initializes a Request instance for use in our Client
|
15
|
+
#
|
16
|
+
# @param [String] method_name Name of the API Method to invoke
|
17
|
+
# @param [Hash] data Any arguments required to sent along with the method
|
18
|
+
#
|
19
|
+
def initialize(method_name, data = {})
|
20
|
+
@method_name = method_name
|
21
|
+
@data = data.with_indifferent_access
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# This method returns a JSON format of the complete request to be sent to
|
26
|
+
# the Webceo API server
|
27
|
+
#
|
28
|
+
# It also appends the api_key necessary for the API call to be successfull
|
29
|
+
#
|
30
|
+
#
|
31
|
+
# @return [JSON] API Request Hash
|
32
|
+
#
|
33
|
+
def to_json
|
34
|
+
MultiJson.dump({
|
35
|
+
method: @method_name.to_s,
|
36
|
+
key: Webceo::Api::Client.default_options[:api_key],
|
37
|
+
id: @data[:id],
|
38
|
+
data: @data
|
39
|
+
})
|
40
|
+
end
|
41
|
+
end # end of class Request
|
42
|
+
end # end of module Api
|
43
|
+
end # end of module Webceo
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Webceo
|
2
|
+
module Api
|
3
|
+
#
|
4
|
+
# Class Response provides a customize response instance to use in our client based
|
5
|
+
# on the response returned by the Webceo API Server
|
6
|
+
#
|
7
|
+
# @author Agnel Waghela <agnelwaghela@gmail.com>
|
8
|
+
#
|
9
|
+
class Response
|
10
|
+
attr_reader :status, :body, :headers, :message
|
11
|
+
|
12
|
+
# Creates a new Response object, which standardizes the response received for use within Webceo
|
13
|
+
def initialize(status, body, headers, message = nil)
|
14
|
+
@status = status
|
15
|
+
@body = body
|
16
|
+
@headers = headers
|
17
|
+
@message = message
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# This method checks for any errors in the response returned from the api call
|
22
|
+
#
|
23
|
+
# @see Webceo::Api::RESPONSE_CODES
|
24
|
+
#
|
25
|
+
def check_for_errors
|
26
|
+
info = MultiJson.load(self.body).first
|
27
|
+
|
28
|
+
if info['result'] && info['result'] != 0
|
29
|
+
if info['result'] == 500
|
30
|
+
raise Webceo::Api::ServerError.new(self.status.to_i, self.body)
|
31
|
+
else
|
32
|
+
raise Webceo::Api::ClientError.new(self.status.to_i, self.body)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end # end of class Response
|
37
|
+
end # end of module Api
|
38
|
+
end # end of module Webceo
|
@@ -0,0 +1,17 @@
|
|
1
|
+
backlink_quality_check_tool: ["get_competitor_metrics","get_backlinks","get_competitor_backlinks","get_competitors","get_lost_backlinks","set_competitors"]
|
2
|
+
chosen_links_watch_tool: ["add_link","set_links","del_links","get_links","get_link_ids"]
|
3
|
+
client_reporting: ["add_task","set_task","del_tasks","get_tasks","get_all_tasks","download_task_pdf","send_task_report_now","download_pdf_report"]
|
4
|
+
internal_links_optimization_tool: ['get_interlinks_link_text']
|
5
|
+
lead_generation_tool: ["add_lead","set_leads","del_leads","get_leads","download_lead_pdf","send_lead_pdf_report"]
|
6
|
+
project_management: ["get_projects","get_project","add_project","set_project","del_project","share_projects","remove_shared_projects","rescan_project","add_limit","set_limit","get_limit","get_limits","del_limit","get_billing_details"]
|
7
|
+
rank_tracking_tool: ["get_rankings","get_rankings_cached_results","get_rankings_keywords","add_rankings_keywords","set_rankings_keywords","del_rankings_keywords","get_rankings_ses","add_rankings_ses","set_rankings_ses","del_rankings_ses","get_rankings_competitors","add_rankings_competitors","set_rankings_competitors","del_rankings_competitors","get_keywords_tags","update_keywords_tags","delete_keywords_all_tags"]
|
8
|
+
scan_schedule: ["set_scan_schedule","get_scan_schedule"]
|
9
|
+
seo_checklist: ["get_todo_stages"]
|
10
|
+
sitemap_generator: ["submit_sitemap"]
|
11
|
+
social_engagement: ["get_social_metrics"]
|
12
|
+
technical_audit_&_seo_analysis_tools: ["get_site_audit_data","get_site_audit_keywords","add_site_audit_keywords","del_site_audit_keywords","set_scan_settings"]
|
13
|
+
user_management: ["add_user","set_user","del_user","share_project_group","get_user_info","get_roles","get_role_info","add_role, set_role","del_role"]
|
14
|
+
web_buzz_tool: ["get_buzz_counts","get_buzz_keywords","add_buzz_keywords","del_buzz_keywords"]
|
15
|
+
web_analytics_tool: ['get_competitor_traffic']
|
16
|
+
google_analytics_&_search_console: ["get_google_analytics_state","get_google_search_console_state"]
|
17
|
+
facebook_insights: ["get_facebook_connected_pages"]
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Webceo
|
4
|
+
# Returns the version of the currently loaded Rails as a <tt>Gem::Version</tt>
|
5
|
+
def self.gem_version
|
6
|
+
Gem::Version.new VERSION::STRING
|
7
|
+
end
|
8
|
+
|
9
|
+
module VERSION
|
10
|
+
MAJOR = 0
|
11
|
+
MINOR = 1
|
12
|
+
TINY = 0
|
13
|
+
PRE = nil # 'alpha', 'beta', 'rc1', 'rc2', nil
|
14
|
+
|
15
|
+
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
|
16
|
+
end
|
17
|
+
end
|
data/webceo.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'webceo/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "webceo"
|
8
|
+
spec.version = Webceo.gem_version
|
9
|
+
spec.authors = ["Agnel Waghela"]
|
10
|
+
spec.email = ["agnelwaghela@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{API Client for accessing WebCEO API - http://www.webceo.com/}
|
13
|
+
spec.homepage = "http://agnelwaghela.in/project/webceo-api-client"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.bindir = "exe"
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.14'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
|
+
spec.add_development_dependency 'airborne', '~> 0.2.7'
|
27
|
+
|
28
|
+
spec.add_dependency 'httparty', '~> 0.14', '>= 0.14.0'
|
29
|
+
spec.add_dependency 'multi_json', '~> 1.12', '>= 1.12.2'
|
30
|
+
spec.add_dependency 'activesupport', '~> 4.2', '>= 4.2.3'
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: webceo
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Agnel Waghela
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-03-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.14'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.14'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: airborne
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.2.7
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.2.7
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: httparty
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.14'
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 0.14.0
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0.14'
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 0.14.0
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: multi_json
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.12'
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 1.12.2
|
99
|
+
type: :runtime
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '1.12'
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 1.12.2
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: activesupport
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '4.2'
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 4.2.3
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '4.2'
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 4.2.3
|
129
|
+
description:
|
130
|
+
email:
|
131
|
+
- agnelwaghela@gmail.com
|
132
|
+
executables: []
|
133
|
+
extensions: []
|
134
|
+
extra_rdoc_files: []
|
135
|
+
files:
|
136
|
+
- ".gitignore"
|
137
|
+
- ".rspec"
|
138
|
+
- ".travis.yml"
|
139
|
+
- CODE_OF_CONDUCT.md
|
140
|
+
- Gemfile
|
141
|
+
- LICENSE.txt
|
142
|
+
- README.md
|
143
|
+
- Rakefile
|
144
|
+
- bin/console
|
145
|
+
- bin/setup
|
146
|
+
- lib/webceo.rb
|
147
|
+
- lib/webceo/api.rb
|
148
|
+
- lib/webceo/api/client.rb
|
149
|
+
- lib/webceo/api/error.rb
|
150
|
+
- lib/webceo/api/request.rb
|
151
|
+
- lib/webceo/api/response.rb
|
152
|
+
- lib/webceo/api_methods.yml
|
153
|
+
- lib/webceo/version.rb
|
154
|
+
- webceo.gemspec
|
155
|
+
homepage: http://agnelwaghela.in/project/webceo-api-client
|
156
|
+
licenses:
|
157
|
+
- MIT
|
158
|
+
metadata: {}
|
159
|
+
post_install_message:
|
160
|
+
rdoc_options: []
|
161
|
+
require_paths:
|
162
|
+
- lib
|
163
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
requirements: []
|
174
|
+
rubyforge_project:
|
175
|
+
rubygems_version: 2.6.11
|
176
|
+
signing_key:
|
177
|
+
specification_version: 4
|
178
|
+
summary: API Client for accessing WebCEO API - http://www.webceo.com/
|
179
|
+
test_files: []
|