contextio 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +35 -0
  2. data/Rakefile +2 -2
  3. data/lib/contextio.rb +21 -1
  4. metadata +18 -5
@@ -0,0 +1,35 @@
1
+ Context.IO Gem Source
2
+ =====================
3
+
4
+ This repository contains the source for the Context.IO gem.
5
+
6
+ If all you want is to use the gem can install it with the following command:
7
+
8
+ gem install contextio
9
+
10
+ You can get more information at [http://context.io](http://context.io). Complete API documentation is available at [http://context.io/docs/1.1/](http://context.io/docs/1.1/).
11
+
12
+ An example
13
+ ----------
14
+
15
+ require 'contextio'
16
+ require 'json'
17
+
18
+ key = 'the key you get in your developer console'
19
+ secret = ' the secret you get in your developer console'
20
+ account = 'your account name... probably just your email'
21
+
22
+ connection = ContextIO::Connection.new(key, secret)
23
+ messages = connection.all_messages(:account => account, :since => (Time.now - 24 * 60 * 60 * 5))
24
+ puts JSON.parse(messages)['data'].first['subject']
25
+
26
+ LICENSE
27
+ -------
28
+
29
+ Copyright (C) 2011 DokDok Inc.
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
32
+
33
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
34
+
35
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -4,8 +4,8 @@ require 'rake'
4
4
  require 'rake/gempackagetask'
5
5
 
6
6
  GEM = "contextio"
7
- GEM_VERSION = "0.1.0"
8
- SUMMARY = "Provides interface for Context.io email"
7
+ GEM_VERSION = "0.3.0"
8
+ SUMMARY = "Provides interface for Context.IO email"
9
9
  AUTHOR = "Gary Haran"
10
10
  EMAIL = "gary.haran@gmail.com"
11
11
  HOMEPAGE = "http://context.io/"
@@ -2,7 +2,7 @@ require 'oauth'
2
2
  require 'net/http'
3
3
 
4
4
  module ContextIO
5
- VERSION = "1.0"
5
+ VERSION = "1.1"
6
6
 
7
7
  class ContextIO::Connection
8
8
  def initialize(key='', secret='', server='https://api.context.io')
@@ -18,6 +18,14 @@ module ContextIO
18
18
  get 'allfiles', {:since => 0}.merge(options)
19
19
  end
20
20
 
21
+ def addresses(options)
22
+ get 'addresses', options
23
+ end
24
+
25
+ def contact_search(options)
26
+ get 'contactsearch', options
27
+ end
28
+
21
29
  def contact_files(options)
22
30
  get 'contactfiles', options
23
31
  end
@@ -34,6 +42,10 @@ module ContextIO
34
42
  get 'filesearch', options
35
43
  end
36
44
 
45
+ def message_headers(options)
46
+ get 'messageheaders', options
47
+ end
48
+
37
49
  def message_info(options)
38
50
  get 'messageinfo', options
39
51
  end
@@ -58,6 +70,10 @@ module ContextIO
58
70
  get 'imap/discover', options
59
71
  end
60
72
 
73
+ def account_info(options)
74
+ get 'imap/accountinfo', options
75
+ end
76
+
61
77
  def add_account(options)
62
78
  get 'imap/addaccount', options
63
79
  end
@@ -70,6 +86,10 @@ module ContextIO
70
86
  get 'imap/removeaccount'
71
87
  end
72
88
 
89
+ def oauth_providers
90
+ get 'imap/oauthproviders'
91
+ end
92
+
73
93
  def reset_status
74
94
  get 'imap/resetstatus'
75
95
  end
metadata CHANGED
@@ -1,16 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contextio
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.1.0
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
6
11
  platform: ruby
7
12
  authors:
8
13
  - Gary Haran
14
+ - Dominik Gehl
9
15
  autorequire:
10
16
  bindir: bin
11
17
  cert_chain: []
12
18
 
13
- date: 2011-04-06 00:00:00 -04:00
19
+ date: 2011-07-08 00:00:00 -04:00
14
20
  default_executable:
15
21
  dependencies: []
16
22
 
@@ -25,6 +31,7 @@ extra_rdoc_files: []
25
31
  files:
26
32
  - lib/contextio.rb
27
33
  - Rakefile
34
+ - README.md
28
35
  - README.textile
29
36
  has_rdoc: true
30
37
  homepage: http://context.io/
@@ -40,19 +47,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
40
47
  requirements:
41
48
  - - ">="
42
49
  - !ruby/object:Gem::Version
50
+ hash: 3
51
+ segments:
52
+ - 0
43
53
  version: "0"
44
54
  required_rubygems_version: !ruby/object:Gem::Requirement
45
55
  none: false
46
56
  requirements:
47
57
  - - ">="
48
58
  - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
49
62
  version: "0"
50
63
  requirements: []
51
64
 
52
65
  rubyforge_project:
53
- rubygems_version: 1.5.1
66
+ rubygems_version: 1.3.7
54
67
  signing_key:
55
68
  specification_version: 3
56
- summary: Provides interface for Context.io email
69
+ summary: Provides interface for Context.IO email
57
70
  test_files: []
58
71