Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 130 lines (92 sloc) 3.911 kB
500c34c @henrikhodne Added README
henrikhodne authored
1 ContextIO - Extract data from email
2 ===================================
3
c500d52 @henrikhodne Add Travis build status to README.
henrikhodne authored
4 [![Build Status](https://secure.travis-ci.org/dvyjones/context-io.png)](http://travis-ci.org/dvyjones/context-io)
5dbcb82 @henrikhodne Add gemnasium dependency status to README.
henrikhodne authored
5 [![Dependency Status](https://gemnasium.com/dvyjones/context-io.png)](https://gemnasium.com/dvyjones/context-io)
c500d52 @henrikhodne Add Travis build status to README.
henrikhodne authored
6
bfcdf4f @henrikhodne Switch from TomDoc to YARD
henrikhodne authored
7 ## Description
500c34c @henrikhodne Added README
henrikhodne authored
8
9 ContextIO is a Ruby wrapper for the [Context.IO][contextio] web service.
10
11 Context.IO is the missing email API that makes it easy and fast
12 to integrate your user's email data in your application.
13
14 ContextIO follows the rules of [Semantic Versioning][semver] and uses
15 [TomDoc][tomdoc] for inline documentation.
16
17 [contextio]: http://context.io
18 [semver]: http://semver.org
19 [tomdoc]: http://tomdoc.org
20
21
bfcdf4f @henrikhodne Switch from TomDoc to YARD
henrikhodne authored
22 ## Installation
500c34c @henrikhodne Added README
henrikhodne authored
23
24 The best way to install ContextIO is through Rubygems:
25
bfcdf4f @henrikhodne Switch from TomDoc to YARD
henrikhodne authored
26 ```
27 $ [sudo] gem install context-io
28 ```
500c34c @henrikhodne Added README
henrikhodne authored
29
30 If you're installing from source, you can use [Bundler][bundler] to pick up all
31 the gems:
32
bfcdf4f @henrikhodne Switch from TomDoc to YARD
henrikhodne authored
33 ```
34 $ bundle install
35 ```
500c34c @henrikhodne Added README
henrikhodne authored
36
37 [bundler]: http://gembundler.org
38
bfcdf4f @henrikhodne Switch from TomDoc to YARD
henrikhodne authored
39 ## Usage
500c34c @henrikhodne Added README
henrikhodne authored
40
41 The ContextIO classes map pretty much one-to-one to the Context.IO API
42 resources, which you can find [on their documentation site][contextiodocs].
43
44 [contextiodocs]: http://context.io/docs/2.0
45
fcc7638 @henrikhodne Move some implemented features from SPEC to README.
henrikhodne authored
46 ### Authenticate
47
48 ContextIO uses two-legged [OAuth][oauth] for authentication, which means you
49 need to get an API key from [Context.IO][contextio]. The API key consists of a
50 consumer key and a consumer secret, and once you have them you can set up
51 ContextIO like this:
52
53 ```ruby
54 ContextIO.configure do |config|
55 config.consumer_key = 'consumer key'
56 config.consumer_secret = 'consumer secret'
57 end
58 ```
59
60 [oauth]: http://oauth.net/
61
62 ### Get an Account object
63
64 Once you're authenticated, you can get an `Account` object, which is what you
65 will be dealing with most of the time.
66
67 ```ruby
68 account = ContextIO::Account.all.first
69 ```
70
71 You can also find accounts matching a given email address.
72
73 ```ruby
74 account = ContextIO::Account.all(:email => 'me@example.org').first
75 ```
76
bfcdf4f @henrikhodne Switch from TomDoc to YARD
henrikhodne authored
77 ## Contributing
500c34c @henrikhodne Added README
henrikhodne authored
78
79 In the spirit of [free software][free-sw], **everyone** is encouraged to help
80 improve this project.
81
82 Here are some ways *you* can contribute:
83
84 * by using alpha, beta and prerelease versions
85 * by reporting bugs
86 * by suggesting new features
87 * by writing or editing documentation
88 * by writing specifications
89 * by writing code (**no patch is too small**: fix typos, add comments, clean up
90 inconsistent whitespace)
91 * by refactoring code
92 * by closing [issues][issues]
93 * by reviewing patches
94
bfcdf4f @henrikhodne Switch from TomDoc to YARD
henrikhodne authored
95 ### Submitting an Issue
500c34c @henrikhodne Added README
henrikhodne authored
96
97 We use the [GitHub issue tracker][issues] to track bugs and features. Before
98 submitting a bug report or feature request, check to make sure it hasn't
99 already been submitted. You can indicate support for an existing issue by
100 writing a comment saying you have the same issue (please include what version
101 of the gem you are using, as well as what version of ruby). When submitting a
102 bug report, please include a [gist][gist] that includes a stack trace and any
103 details that may be necessary to reproduce the bug, including your gem version,
104 Ruby version and operating system. Ideally, a bug report should include a pull
105 request with failing specs.
106
bfcdf4f @henrikhodne Switch from TomDoc to YARD
henrikhodne authored
107 ### Submitting a Pull Request
500c34c @henrikhodne Added README
henrikhodne authored
108
109 1. Fork the project.
110 2. Create a topic branch.
111 3. Implement your feature or bug fix.
112 4. Add documentation for your feature or bug fix.
113 5. Run `bundle exec rake rdoc`. If your changes are not 100% documented, go
114 back to step 4.
115 6. Add specs for your feature or bug fix.
116 7. Run `bundle exec rake spec`. If your changes are not 100% covered, go back
117 to step 6.
118 8. Commit your changes. If necessary, merge in upstream and rebase your
119 changes. Push your changes.
120 9. Submit a pull request. Please do not include changes to the gemspec,
121 version or history file.
122
123 [free-sw]: http://www.gnu.org/philosophy/free-sw.html
124 [issues]: https://github.com/dvyjones/context-io/issues
125
126
bfcdf4f @henrikhodne Switch from TomDoc to YARD
henrikhodne authored
127 ## Copyright
500c34c @henrikhodne Added README
henrikhodne authored
128
129 Copyright (c) 2012 Henrik Hodne. See LICENSE for details.
Something went wrong with that request. Please try again.