duwanis-rubyku 0.1.1 → 0.2.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.
data/README CHANGED
@@ -8,12 +8,13 @@ Rubyku is a ruby library for accessing data via the Jaiku API.
8
8
 
9
9
  == FEATURES/PROBLEMS:
10
10
 
11
- Rubyku 0.1.0: Bringing home the [user]bacon
11
+ Rubyku 0.2.0: Talk to me!
12
12
 
13
- Users are now fully functional (woo!). Messages still need some work
14
- done to them, and then after that we still need to work on being able
15
- to post. But you should be able to read anything you've ever wanted to
16
- read from a user now.
13
+ Basic functionality: complete! You can now post to Jaiku from Rubyku.
14
+ There are still some nice functionalities that need to be added in,
15
+ like support for icons, generated posts, and locations. Also it'd be
16
+ nice if we had some means of responding to posts... the API doesn't
17
+ allow for that just yet, but we may be able to do something.
17
18
 
18
19
  == EXAMPLE:
19
20
 
@@ -27,7 +28,8 @@ Just to whet your appetite:
27
28
  user = Rubyku::User.fetch 'duwanis' #and now we're off to the races
28
29
  user.updates # => a list of Rubyku::Messages representing my latest updates
29
30
  user.stream # => a list of Rubyku::Messages representing my contacts' latest updates
30
-
31
+ Rubyku::Request.update "I'm Rubykutacular!" # posts "I'm Rubykutacular!" to your Jaiku stream.
32
+
31
33
  etc. Have fun :)
32
34
 
33
35
  == REQUIREMENTS:
@@ -12,8 +12,6 @@ module Rubyku
12
12
  #
13
13
  # raises:
14
14
  # - Rubyku::Error if there is a problem communicating with the servers.
15
- # - Rubyku::UpdateError if there was an error within Jaiku attempting to
16
- # parse the update.
17
15
  #
18
16
  def retrieve_json_object(url_path, jaiku_credentials = Rubyku::Settings.jaiku_credentials)
19
17
  log = Rubyku::Settings.logger
@@ -31,16 +29,26 @@ module Rubyku
31
29
  JSON(res.body)
32
30
  end
33
31
 
34
- def update(message, generated = false, icon = 300,
35
- jaiku_credentials = Rubyku::Settings.jaiku_credentials)
32
+ ##
33
+ #
34
+ # This method will update the presence for the specified user credentials.
35
+ #
36
+ # returns: +nil+
37
+ #
38
+ # raises:
39
+ # - Rubyku::Error if there was a problem communicating with the Jaiku servers.
40
+ # - Rubyku::UpdateError if there was an error within Jaiku attempting to
41
+ # parse the update.
42
+ #
43
+ # TODO: Still need to add support for generated posts, icons, and locations.
44
+ #
45
+ def update(message, jaiku_credentials = Rubyku::Settings.jaiku_credentials)
36
46
  log = Rubyku::Settings.logger
37
47
  log.info("Attempting to update with message #{message}")
38
48
  url = URI.parse('http://api.jaiku.com/json')
39
49
  res = Net::HTTP.post_form(url,
40
50
  {'method'=> 'presence.send',
41
- 'message'=> message,
42
- 'icon'=> icon,
43
- 'generated' => generated,
51
+ 'message'=> message,
44
52
  'user' => jaiku_credentials.username,
45
53
  'personal_key' => jaiku_credentials.api_key})
46
54
  unless res.code == "200"
@@ -1,7 +1,7 @@
1
1
  module Rubyku #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 1
4
+ MINOR = 2
5
5
  TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duwanis-rubyku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tommy Morgan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-29 00:00:00 -07:00
12
+ date: 2008-06-04 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency