seetemap-client 0.0.12 → 0.0.14

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.
Files changed (2) hide show
  1. data/README.md +64 -11
  2. metadata +4 -3
data/README.md CHANGED
@@ -1,21 +1,74 @@
1
1
  # How to use
2
2
 
3
- - Add gem 'seetemap-client' to Gemfile
4
- - bundle install
5
- - Create config/seetemap.yml
3
+ - Add the `gem 'seetemap-client'` line to your Gemfile
4
+ - `bundle install`
5
+ - Create a `config/seetemap.yml` file
6
6
 
7
7
  ## Sinatra
8
8
 
9
- - In application file add require 'seetemap\_client'
10
- - For sinatra, use middleware in rackup file (config.ru), like this: use SeetemapClient::Application
9
+ - In application file add `require 'seetemap\_client'`
10
+ - For sinatra, use middleware in rackup file (config.ru), like this: `use SeetemapClient::Application`
11
11
 
12
12
  ## Rails
13
13
 
14
- - In application.rb add config.middleware.use "SeetemapClient::Application"
14
+ - In application.rb add `config.middleware.use "SeetemapClient::Application"`
15
15
 
16
- ## Seetemap.yml
16
+ # API
17
17
 
18
- seetemap:
19
- auth_token: "account token"
20
- site_token: "api_key"
21
- keep_delay: 3600
18
+ The application provides some entries points for the `seetemap.com` website and the `/sitemap.xml` for search engines.
19
+
20
+ ## GET '/sitemap(.xml)'
21
+
22
+ When there is a hit on the server at this URL, we ask `seetemap.com` for informations about the last audits.
23
+
24
+ 1. If `seetemap.com` does not respond with a code 200, then the response will be this code.
25
+ 2. If there is no audit for the website, the response will be 204.
26
+ 3. If there is no previous cached file, cache and serve a copy of the last sitemap found on `seetemap.com`.
27
+ 4. If the cached copy is locally fresh (see the `keep_delay` configuration variable), serve it.
28
+ 5. If the cached copy have been fetched after the last audit, serve and touch it.
29
+ 6. Otherwise cache and serve a copy of the last sitemap found on `seetemap.com`.
30
+
31
+ With the version `0.0.13` (see `/seetemap/ping`), the step 4 and 5 will be the most used.
32
+
33
+ **Parameters:**
34
+
35
+ * add `force_reload` option to ignore the caching and fetch the last audit available from `seetemap.com`.
36
+
37
+
38
+ ## GET '/seetemap/'
39
+
40
+ This is the namespace for any other API calls.
41
+
42
+ ### GET '/seetemap/version'
43
+
44
+ Return 200 with the `Content-type` header set to `application/json`.
45
+
46
+ The response contains an single object containing one property: `version` and it is a string.
47
+
48
+ ```
49
+ {'version':'0.0.13'}
50
+ ```
51
+
52
+ ### GET '/seetemap/purge'
53
+
54
+ Return 200 with an empty body. When this request is received, the cached-copy of the sitemap is removed on the client side.
55
+
56
+ ### GET '/seetemap/ping'
57
+
58
+ It tells the client that `seetemap.com` have a new audit ready for being fetched. The client purge its cached copy and ask immediatly for another one.
59
+
60
+ **Parameters:**
61
+
62
+ * the `fwd_google` option is added to the request if the user selected the associated option in the website administration, the option ping Google Webmaster Tools.
63
+
64
+ # Appendix
65
+
66
+ ## The config/seetemap.yml config file
67
+
68
+ ```
69
+ development:
70
+ mount_point: "http://url.of.your.website.com"
71
+ auth_token: "account token"
72
+ site_token: "api_key"
73
+ keep_delay: 3600
74
+ ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seetemap-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-30 00:00:00.000000000 Z
12
+ date: 2013-01-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
@@ -72,8 +72,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  version: '0'
73
73
  requirements: []
74
74
  rubyforge_project:
75
- rubygems_version: 1.8.21
75
+ rubygems_version: 1.8.23
76
76
  signing_key:
77
77
  specification_version: 3
78
78
  summary: Client for seetemap.
79
79
  test_files: []
80
+ has_rdoc: