jyte 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +1 -0
- data/Rakefile +2 -1
- data/lib/jyte/base.rb +2 -2
- data/lib/jyte/rss.rb +29 -0
- data/lib/jyte/version.rb +1 -1
- metadata +3 -2
data/Manifest.txt
CHANGED
data/Rakefile
CHANGED
data/lib/jyte/base.rb
CHANGED
@@ -14,7 +14,7 @@ module Jyte
|
|
14
14
|
# end
|
15
15
|
class Base
|
16
16
|
attr_reader :options
|
17
|
-
|
17
|
+
def base_url; 'http://jyte.com/api/'; end
|
18
18
|
|
19
19
|
# Takes all arguments and redefine itself with the url.
|
20
20
|
# Only to be used in sub-classes
|
@@ -28,7 +28,7 @@ module Jyte
|
|
28
28
|
# end
|
29
29
|
# end
|
30
30
|
def url(*args)
|
31
|
-
meta_def :url do;
|
31
|
+
meta_def :url do; base_url + args.join("/") + "/"; end
|
32
32
|
end
|
33
33
|
|
34
34
|
# Sets default queries.
|
data/lib/jyte/rss.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# A module which return the url of RSS-feeds
|
2
|
+
module Jyte::RSSUrls
|
3
|
+
# Class for fetching RSS-urls for claims
|
4
|
+
class << Claims = Class.new
|
5
|
+
BASE_URL = 'http://jyte.com/rss/'
|
6
|
+
URLS = {
|
7
|
+
:recent => BASE_URL + 'claims',
|
8
|
+
:featured => BASE_URL + 'claims/featured'
|
9
|
+
}
|
10
|
+
|
11
|
+
def recent(tag = nil)
|
12
|
+
return URLS[:recent] + '?tag=' + tag if tag
|
13
|
+
URLS[:recent]
|
14
|
+
end
|
15
|
+
|
16
|
+
def featured(tag = nil)
|
17
|
+
return URLS[:featured] + '?tag=' + tag if tag
|
18
|
+
URLS[:featured]
|
19
|
+
end
|
20
|
+
|
21
|
+
def about(openid)
|
22
|
+
URLS[:recent] + '?about=' + openid
|
23
|
+
end
|
24
|
+
|
25
|
+
def by(openid)
|
26
|
+
URLS[:recent] + '?by=' + openid
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/jyte/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: jyte
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2007-
|
6
|
+
version: 1.0.1
|
7
|
+
date: 2007-03-24 00:00:00 +01:00
|
8
8
|
summary: Simple libary for the Jyte API
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- lib/jyte/base.rb
|
38
38
|
- lib/jyte/contact.rb
|
39
39
|
- lib/jyte/group.rb
|
40
|
+
- lib/jyte/rss.rb
|
40
41
|
- lib/jyte/version.rb
|
41
42
|
- lib/jyte.rb
|
42
43
|
- test/test_helper.rb
|